Domain Adaptive Faster R-CNN in Detectron
Branch: master
Clone or download
Latest commit aacb74a Jan 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake original Detectron@8181a32 Dec 19, 2018
configs Migrate URLs to dl.fbaipublicfiles.com Jan 9, 2019
demo original Detectron@8181a32 Dec 19, 2018
detectron reduce log for debug Jan 9, 2019
docker
projects/GN Migrate URLs to dl.fbaipublicfiles.com Jan 9, 2019
tools
.gitignore Add Domain Adaptive Faster RCNN Dec 19, 2018
CMakeLists.txt
CODE_OF_CONDUCT.md original Detectron@8181a32 Dec 19, 2018
CONTRIBUTING.md original Detectron@8181a32 Dec 19, 2018
FAQ.md original Detectron@8181a32 Dec 19, 2018
GETTING_STARTED.md original Detectron@8181a32 Dec 19, 2018
INSTALL.md original Detectron@8181a32 Dec 19, 2018
LICENSE original Detectron@8181a32 Dec 19, 2018
MODEL_ZOO.md Migrate URLs to dl.fbaipublicfiles.com Jan 9, 2019
Makefile original Detectron@8181a32 Dec 19, 2018
NOTICE original Detectron@8181a32 Dec 19, 2018
README.md Migrate URLs to dl.fbaipublicfiles.com Jan 9, 2019
requirements.txt original Detectron@8181a32 Dec 19, 2018
setup.py

README.md

Domain Adaptive Faster R-CNN in Detectron

This is a Caffe2 implementation of 'Domain Adaptive Faster R-CNN for Object Detection in the Wild', implemented by Haoran Wang(haowang@student.ethz.ch). The original paper can be found here. This implementation is built on Detectron @ 5ed75f9.

If you find this repository useful, please cite the oringinal paper:

@inproceedings{chen2018domain,
  title={Domain Adaptive Faster R-CNN for Object Detection in the Wild},
      author =     {Chen, Yuhua and Li, Wen and Sakaridis, Christos and Dai, Dengxin and Van Gool, Luc},
      booktitle =  {Computer Vision and Pattern Recognition (CVPR)},
      year =       {2018}
  }

and Detectron:

@misc{Detectron2018,
  author =       {Ross Girshick and Ilija Radosavovic and Georgia Gkioxari and
                  Piotr Doll\'{a}r and Kaiming He},
  title =        {Detectron},
  howpublished = {\url{https://github.com/facebookresearch/detectron}},
  year =         {2018}
}

Installation

Please follow the instruction in Detectron to install and use Detectron-DomainAdaptive-Faster-RCNN.

Usage Example

An example of adapting from Sim10k dataset to Cityscapes dataset is provided:

  1. Download the Cityscapes datasets from here and Sim10k datasets from here.

  2. Convert the labels of Cityscapes datasets and labels of Sim10k datasets to coco format using the scripts 'tools/convert_cityscapes_to_caronly_coco.py' and 'tools/convert_sim10k_to_coco.py'.

  3. Convert ImageNet-pretrained VGG16 Caffe model to Detectron format with 'tools/pickle_caffe_blobs.py' or use my converted VGG16 model in here

  4. Train the Domain Adaptive Faster R-CNN:

    cd $DETECTRON
    python2 tools/train_net.py --cfg configs/da_faster_rcnn_baselines/e2e_da_faster_rcnn_vgg16-sim10k.yaml
    
  5. Test the trained model:

    cd $DETECTRON
    python2 tools/test_net.py --cfg configs/da_faster_rcnn_baselines/e2e_da_faster_rcnn_vgg16-sim10k.yaml TEST.WEIGHTS /<path_to_trained_model>/model_final.pkl NUM_GPUS 1
    

Pretrained Model & Results

Pretrained model with image+instance+consistency domain adaptation for Sim10k->Cityscapes task.

image instsnace consistency car AP
Faster R-CNN 32.58
DA Faster R-CNN
36.13
DA Faster R-CNN
36.73
DA Faster R-CNN
37.39
DA Faster R-CNN
38.28

Other Implementation

da-faster-rcnn based on Caffe. (original code by paper authors)