- Notifications
You must be signed in to change notification settings - Fork9
The Official PyTorch Implementation of DiscoBox.
License
NVlabs/DiscoBox
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
We quit maintaining this project. Please check our new work,Mask Auto-labeler for more powerful models
DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision.
Shiyi Lan,Zhiding Yu,Chris Choy,Subhashree Radhakrishnan,Guilin Liu,Yuke Zhu,Larry Davis,Anima Anandkumar
International Conference on Computer Vision (ICCV) 2021
This repository contains the official Pytorch implementation of training & evaluation code and pretrained models forDiscoBox.DiscoBox is a state of the art framework that can jointly predict high quality instance segmentation and semantic correspondence from box annotations.
We useMMDetection v2.10.0 as the codebase.
All of our models are trained and tested usingautomatic mixed precision, which leverages float16 for speedup and less GPU memory consumption.
This implementation is based onPyTorch==1.9.0,mmcv==1.3.13, andmmdetection==2.10.0
Please refer toget_started.md for installation.
Or you can download the docker image fromour dockerhub repository.
Backbone | Weights | AP | AP@50 | AP@75 | AP@Small | AP@Medium | AP@Large |
---|---|---|---|---|---|---|---|
ResNet-50 | download | 30.7 | 52.6 | 30.6 | 13.3 | 34.1 | 45.6 |
ResNet-101-DCN | download | 35.3 | 59.1 | 35.4 | 16.9 | 39.2 | 53.0 |
ResNeXt-101-DCN | download | 37.3 | 60.4 | 39.1 | 17.8 | 41.1 | 55.4 |
We also evaluate the models in the sectionResults on COCO val 2017
with thesame weights on COCO test-dev.
Backbone | Weights | AP | AP@50 | AP@75 | AP@Small | AP@Medium | AP@Large |
---|---|---|---|---|---|---|---|
ResNet-50 | download | 32.0 | 53.6 | 32.6 | 11.7 | 33.7 | 48.4 |
ResNet-101-DCN | download | 35.8 | 59.8 | 36.4 | 16.9 | 38.7 | 52.1 |
ResNeXt-101-DCN | download | 37.9 | 61.4 | 40.0 | 18.0 | 41.1 | 53.9 |
ResNet-50 (8 GPUs):
bash tools/dist_train.sh \ configs/discobox/discobox_solov2_r50_fpn_3x.py 8
ResNet-101-DCN (8 GPUs):
bash tools/dist_train.sh \ configs/discobox/discobox_solov2_r101_dcn_fpn_3x.py 8
ResNeXt-101-DCN (8 GPUs):
bash tools/dist_train.sh \ configs/discobox/discobox_solov2_x101_dcn_fpn_3x.py 8
ResNet-50 (4 GPUs):
bash tools/dist_train.sh \ configs/discobox/discobox_solov2_voc_r50_fpn_6x.py 4
ResNet-101 (4 GPUs):
bash tools/dist_train.sh \ configs/discobox/discobox_solov2_voc_r101_fpn_6x.py 4
ResNet-50 (8 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_r50_fpn_3x.py \ work_dirs/coco_r50_fpn_3x.pth 8 --eval segm
ResNet-101-DCN (8 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_r101_dcn_fpn_3x.py \ work_dirs/coco_r101_dcn_fpn_3x.pth 8 --eval segm
ResNeXt-101-DCN (GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_x101_dcn_fpn_3x_fp16.py \ work_dirs/coco_x101_dcn_fpn_3x.pth 8 --eval segm
You can useDiscoBox
for autolabeling given images and tight bounding boxes. We call this box-conditioned inference. Here is an example of box-conditioned inference on COCO val2017 withx101_dcn_fpn
arch:
bash tools/dist_test.sh \ config/discobox/boxcond_discobox_solov2_x101_dcn_fpn_3x.py \ work_dirs/x101_dcn_fpn_coco_3x.pth 8 \ --format-only \ --options "jsonfile_prefix=work_dirs/coco_x101_dcn_fpn_results.json"
ResNet-50 (4 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_voc_r50_fpn_3x_fp16.py \ work_dirs/voc_r50_6x.pth 4 --eval segm
ResNet-101 (4 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_voc_r101_fpn_3x_fp16.py \ work_dirs/voc_r101_6x.pth 4 --eval segm
Step 1: generate results
ResNet-50 (4 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_voc_r50_fpn_3x_fp16.py \ work_dirs/voc_r50_6x.pth 4 \ --format-only \ --options "jsonfile_prefix=work_dirs/voc_r50_results.json"
ResNet-101 (4 GPUs):
bash tools/dist_test.sh \ configs/discobox/discobox_solov2_voc_r101_fpn_3x_fp16.py \ work_dirs/voc_r101_6x.pth 4 \ --format-only \ --options "jsonfile_prefix=work_dirs/voc_r101_results.json"
Step 2: format conversion
ResNet-50:
python tools/json2mat.py work_dirs/voc_r50_results.json work_dirs/voc_r50_results.mat
ResNet-101:
python tools/json2mat.py work_dirs/voc_r101_results.json work_dirs/voc_r101_results.mat
Step 3: evaluation
Please visitBBTP for the evaluation code written in Matlab.
Please visitthis repository.
ResNeXt-101
python tools/test.py configs/discobox/discobox_solov2_x101_dcn_fpn_3x.py coco_x101_dcn_fpn_3x.pth --show --show-dir discobox_vis_x101
Please check the LICENSE file. DiscoBox may be used non-commercially, meaning for research orevaluation purposes only. For business inquiries, please contactresearchinquiries@nvidia.com.
@article{lan2021discobox,title={DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision},author={Lan, Shiyi and Yu, Zhiding and Choy, Christopher and Radhakrishnan, Subhashree and Liu, Guilin and Zhu, Yuke and Davis, Larry S and Anandkumar, Anima},journal={arXiv preprint arXiv:2105.06464},year={2021}}