Skip to content

An official implementation of CVPR 2022 paper "Label Matching Semi-Supervised Object Detection".

License

Notifications You must be signed in to change notification settings

hikvision-research/SSOD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMDetection-based Toolbox for Semi-Supervised Object Detection

Supported algorithms

Preparation

Prerequisites

pip install -r requirements.txt
  • Linux with Python >= 3.6
  • We use mmdet=2.10.0, pytorch=1.6.0

Data Preparation

Please refer to prepare_data.md.

Usage

Training

1. Use labeled data to train a baseline

Before training,please download the pretrained backbone (resnet50) to pretrained_model/backbone.

# |---------------------|--------|------|---------|---------|
# | xonsh train_gpu2.sh | config | seed | percent | dataset |
# |---------------------|--------|------|---------|---------|
cd examples/train/xonsh
## ---dataset: coco-standard---
xonsh train_gpu2.sh ./configs/baseline/baseline_ssod.py 1 1 coco-standard
## ---dataset: voc---
# xonsh train_gpu2.sh ./configs/baseline/baseline_ssod.py 1 1 voc
## ---dataset: coco-additional---
# xonsh train_gpu8.sh ./configs/baseline/baseline_ssod.py 1 1 coco-additional
  • In our implementation, we use 2-gpus to train except coco-additional.

  • After training, we organize the pretrained baseline to pretrained_model/baseline as follows:

    pretrained_model/
    	└── baseline/
            ├── instances_train2017.1@1.pth
            ├── instances_train2017.1@5.pth
            ├── ...
            ├── voc.pth
            └── coco.pth
    • You can also change the load_from information in config file in step 2.

2. Use labeled data + unlabeled data to train detector

## note: dataset is set to none in this step.
cd examples/train/xonsh
xonsh train_gpu8.sh ./configs/labelmatch/labelmatch_standard.py 1 1 none
  • In our implementation, we use 8-gpus to train.
  • You can also run bash train_ssod.sh in examples/train/bash

Evaluation

# please change "config" and "checkpoint" in 'eval.sh' scripts to support different dataset and trained model
cd examples/eval
xonsh eval.sh

Performance

LabelMatch

Model Supervision AP Config Model Weights
R50-FPN 1% 25.81±0.28 labelmatch_standard_paper labelmatch-1-1-40k
R50-FPN 5% 32.70±0.18 labelmatch_standard_paper labelmatch-1-5-40k
R50-FPN 10% 35.49±0.17 labelmatch_standard_paper labelmatch-1-10-40k

Extension to Domain adaptive object detection

Please refer to UDA

Citation

If you use LabelMatch in your research or wish to refer to the results published in the paper, please consider citing out paper.

@inproceedings{Chen2022LabelMatching,
    title={Label Matching Semi-Supervised Object Detection},
    author={Binbin Chen, Weijie Chen, Shicai Yang, Yunyi Xuan, JieSong, Di Xie, Shiliang Pu, Mingli Song, Yueting Zhuang.},
    booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
    year={2022},
}

License

This project is released under the Apache 2.0 license. Other codes from open source repository follows the original distributive licenses.

Acknowledgement

If you have any problem about this work, please feel free to contact Binbin Chen (chenbinbin8-at-hikvision.com) and Weijie Chen (chenweijie5-at-hikvision.com).

About

An official implementation of CVPR 2022 paper "Label Matching Semi-Supervised Object Detection".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published