machengcheng2016 / CrossRectify-SSOD

Official code of "CrossRectify: Leveraging Disagreement for Semi-supervised Object Detection" (PR'2023)
https://arxiv.org/abs/2201.10734
13 stars 4 forks source link
object-detection semi-supervised-learning semi-supervised-object-detection

CrossRectify-SSOD

0. Introduction

Official code of "CrossRectify: Leveraging Disagreement for Semi-supervised Object Detection".

This repo includes training SSD300 on Pascal VOC, training Faster-RCNN-FPN on Pascal VOC, and training Faster-RCNN-FPN on MS-COCO.

The scripts about training SSD300 are based on ssd.pytorch, contained in SSD300.

The scripts about training Faster-RCNN-FPN on Pascal VOC are based on the official Detectron2 (v0.4) repo, contained in detectron2.

The scripts about training Faster-RCNN-FPN on MS-COCO are based on the official MMDetection (v2.17.0) repo, contained in mmdetection.

1. Environment

Python = 3.6.8

CUDA Version = 10.1

Pytorch Version = 1.6.0

detectron2 = 0.4 (training Faster-RCNN-FPN on Pascal VOC)

mmdetection = 2.17.0 (training Faster-RCNN-FPN on MS-COCO)

2. Prepare Dataset

Download and extract the Pascal VOC dataset.

For training SSD300 on Pascal VOC, go into the SSD300 subdirectory and specify the VOC_ROOT variable in data/voc0712.py and data/voc07_consistency.py as /path/to/dataset/VOCdevkit/

For training Faster-RCNN-FPN on Pascal VOC, go into the detectron2 subdirectory and set the environmental variable in this way: export DETECTRON2_DATASETS=/path/to/dataset/VOCdevkit/

Download and extract the MS-COCO dataset.

For training Faster-RCNN-FPN on MS-COCO, go into the mmdetection subdirectory and follow the instructions here.

3. Instructions

3.1 Reproduce Table. 1

Go into the SSD300 subdirectory, then run the following scripts to train detectors.

To eval the trained SSD300 on the Pascal VOC test set, run the following script:

3.2 Reproduce Table. 2

Go into the SSD300 subdirectory, then run the following scripts.

To eval the trained SSD300 on the Pascal VOC test set, run the following script:

3.3 Reproduce Table.3

Go into the SSD300 subdirectory, then run the following scripts.

To eval the trained SSD300 on the Pascal VOC test set, run the following script:

Go into the detectron2 subdirectory, then run the following script.

To eval the trained Faster-RCNN-FPN on the Pascal VOC test set, run the following script:

3.4 Reproduce Table.4

Go into the mmdetection subdirectory, then run the following script.

To eval the trained Faster-RCNN-FPN on the MS-COCO test set, run the following script:

Citation

If you find this work useful, please consider citing our paper. We provide a BibTeX entry of our paper below:

@article{CrossRectify,
  title={CrossRectify: Leveraging disagreement for semi-supervised object detection},
  author={Ma, Chengcheng and Pan, Xingjia and Ye, Qixiang and Tang, Fan and Dong, Weiming and Xu, Changsheng},
  journal={Pattern Recognition},
  volume={137},
  pages={109280},
  year={2023},
  publisher={Elsevier}
}

Contact

Feel free to contact [machengcheng2016@gmail.com] if you have any questions about our paper or codes.