cxliu0 / OA-MIL

[ECCV 2022] Robust Object Detection With Inaccurate Bounding Boxes
MIT License
34 stars 3 forks source link
noisy-labels object-detection

OA-MIL

This repository includes the official implementation of the paper:

Robust Object Detection With Inaccurate Bounding Boxes

European Conference on Computer Vision (ECCV), 2022

Chengxin Liu1, Kewei Wang1, Hao Lu1, Zhiguo Cao1, and Ziming Zhang2

1Huazhong University of Science and Technology, China

2Worcester Polytechnic Institute, USA

Paper | Supplementary

Highlights

Installation

Python Pytorch

# env
conda create -n oamil python=3.7
conda activate oamil

# install pytorch
conda install pytorch==1.10.0 torchvision==0.11.0 -c pytorch -c conda-forge
# clone 
git clone https://github.com/cxliu0/OA-MIL.git
cd OA-MIL

# install dependecies
pip install -r requirements/build.txt

# install mmcv (will take a while to process)
cd mmcv
MMCV_WITH_OPS=1 pip install -e . 

# install OA-MIL
cd ..
pip install -e .

Data Preparation

OA-MIL
├── data
│    ├── VOCdevkit
│    │    ├── VOC2007
│    │        ├── Annotations
│    │        ├── ImageSets
│    │        ├── JPEGImages
│    ├── coco
│        ├── train2017
│        ├── val2017
│        ├── annotations
│            ├── instances_train2017.json
│            ├── instances_val2017.json
├── configs
├── mmcv
├── ...
# generate noisy VOC2007 (e.g., 40% noise)
python ./utils/gen_noisy_voc.py --box_noise_level 0.4

# generate noisy COCO (e.g., 40% noise)
python ./utils/gen_noisy_coco.py --box_noise_level 0.4

Training

All models of OA-MIL are trained with a total batch size of 16.

sh train_voc07.sh

Please refer to faster_rcnn_r50_fpn_voc_oamil.py for model configuration

sh train_coco.sh

Please refer to faster_rcnn_r50_fpn_coco_oamil.py for model configuration

Inference

/path/to/model_config: modify it to the path of model config, e.g., ./configs/faster_rcnn/faster_rcnn_r50_fpn_1x_voc_oamil.py

/path/to/model_checkpoint: modify it to the path of model checkpoint

FAQ

Citation

If you find this work or code useful for your research, please consider citing:

@inproceedings{liu2022oamil,
  title={Robust Object Detection With Inaccurate Bounding Boxes},
  author={Liu, Chengxin and Wang, Kewei and Lu, Hao and Cao, Zhiguo and Zhang, Ziming},
  booktitle={Proceeding of European Conference on Computer Vision (ECCV)},
  year={2022}
}

Acknowledgement

This repository is based on mmdetection.