Welcome to cvpods, a versatile and efficient codebase for many computer vision tasks: classification, segmentation, detection, self-supervised learning, keypoints and 3D(classification / segmentation / detection / representation learing), etc. The aim of cvpods is to achieve efficient experiments management and smooth tasks-switching.
Each sub-image denotes a task. All images are from search engine.
Table of Contents
Changelog
- Dec. 03, 2020: cvpods v0.1 released.
Install
Requirements
- Linux with Python ≥ 3.6
- PyTorch ≥ 1.3 and torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this
- OpenCV is optional and needed by demo and visualization
Build cvpods from source
Make sure GPU is available on your local machine.
# Install cvpods with GPU directly
pip install 'git+https://github.com/Megvii-BaseDetection/cvpods.git' --user
# Or, to install it with GPU from a local clone:
git clone https://github.com/Megvii-BaseDetection/cvpods.git
pip install -e cvpods --user
# Or, to build it without GPU from a local clone:
FORCE_CUDA=1 pip install -e cvpods --user
Usage
Here we demonstrate the basic usage of cvpods (Inference & Train). For more features of cvpods, please refer to our documentation or provided tutorials.
Get Start
Here we use coco object detection task as an example.
# Preprare data path
ln -s /path/to/your/coco/dataset datasets/coco
# Enter a specific experiment dir
cd playground/retinanet/retinanet.res50.fpn.coco.multiscale.1x
# Train
pods_train --num-gpus 8
# Test
pods_test --num-gpus 8 \
MODEL.WEIGHTS /path/to/your/save_dir/ckpt.pth # optional
OUTPUT_DIR /path/to/your/save_dir # optional
# Multi node training
## sudo apt install net-tools ifconfig
pods_train --num-gpus 8 --num-machines N --machine-rank 0/1/.../N-1 --dist-url "tcp://MASTER_IP:port"
Tutorials
We provide a detailed tutorial, which covers introduction, usage, and extend guides in cvpods_tutorials. For all API usages, please refer to our documentation.
Model ZOO
For all the models supported by cvpods, please refer to MODEL_ZOO. We provide 50+ methods across ~15 dataset and ~10 computer vision tasks. cvpods has also supported many research projects of MEGVII Research.
Projects based on cvpods
List is sorted by names.
- AutoAssign
- BorderDet
- DeFCN
- DisAlign
- DynamicHead
- DynamicRouting
- LearnableTreeFilterV2
- LLA
- OTA
- SelfSup
- YOLOF
Contributing
Any kind of contributions (new models / bug report / typo / docs) are welcomed. Please refer to CONTRIBUTING for more details.
License
Apache v2 © Base Detection
Acknowledgement and special thanks
cvpods adopts many components (e.g. network layers) of Detectron2, while cvpods has many advantanges in task support, speed, usability, etc. For more details about official detectron2, please check DETECTRON2
Citing cvpods
If you are using cvpods in your research or wish to refer to the baseline results published in this repo, please use the following BibTeX entry.
@misc{zhu2020cvpods,
title={cvpods: All-in-one Toolbox for Computer Vision Research},
author={Zhu*, Benjin and Wang*, Feng and Wang, Jianfeng and Yang, Siwei and Chen, Jianhu and Li, Zeming},
year={2020}
}