Giter Site home page Giter Site logo

youtang1993 / da-faster-rcnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuhuayc/da-faster-rcnn

0.0 2.0 0.0 7.41 MB

An implementation of our CVPR 2018 work 'Domain Adaptive Faster R-CNN for Object Detection in the Wild'

License: Other

CMake 1.42% Makefile 0.31% HTML 0.10% CSS 0.12% Jupyter Notebook 47.57% C++ 38.16% Shell 0.37% Python 8.03% Cuda 2.81% MATLAB 0.96% C 0.13% Objective-C 0.01% M 0.01%

da-faster-rcnn's Introduction

Domain Adaptive Faster R-CNN for Object Detection in the Wild

This is the implementation of our CVPR 2018 work 'Domain Adaptive Faster R-CNN for Object Detection in the Wild'. The aim is to improve the cross-domain robustness of object detection, in the screnario where training and test data are drawn from different distributions. The original paper can be found here.

If you find it helpful for your research, please consider citing:

@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}
}

If you encounter any problems with the code, please contact me at yuhua[dot]chen[at]vision[dot]ee[dot]ethz[dot]ch

Acknowledgment

The implementation is built on the python implementation of Faster RCNN rbgirshick/py-faster-rcnn

Usage

  1. Build Caffe and pycaffe (see: Caffe installation instructions)

  2. Build the Cython modules

    cd $FRCN_ROOT/lib
    make
    
  3. Follow the instrutions of rbgirshick/py-faster-rcnn to download related data.

  4. Prepare the dataset, source domain data should start with the filename 'source_', and target domain data with 'target_'.

  5. To train the Domain Adaptive Faster R-CNN:

    cd $FRCN_ROOT
    ./tools/train_net.py --gpu {GPU_ID} --solver models/da_faster_rcnn/solver.prototxt --weights data/imagenet_models/VGG16.v2.caffemodel --imdb voc_2007_trainval --iters  {NUM_ITER}  --cfg  {CONFIGURATION_FILE}
    

Example

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

  1. Download the datasets from here. Specifically, we will use gtFine_trainvaltest.zip, leftImg8bit_trainvaltest.zip and leftImg8bit_trainvaltest_foggy.zip.

  2. Prepare the data using the scripts in 'prepare_data/prepare_data.m'.

  3. Train the Domain Adaptive Faster R-CNN:

    cd $FRCN_ROOT
    ./tools/train_net.py --gpu {GPU_ID} --solver models/da_faster_rcnn/solver.prototxt --weights data/imagenet_models/VGG16.v2.caffemodel --imdb voc_2007_trainval --iters  70000  --cfg  models/da_faster_rcnn/faster_rcnn_end2end.yml
    
  4. Test the trained model:

    cd $FRCN_ROOT
    ./tools/test_net.py --gpu {GPU_ID} --def models/da_faster_rcnn/test.prototxt --net output/faster_rcnn_end2end/voc_2007_trainval/vgg16_da_faster_rcnn_iter_70000.caffemodel --imdb voc_2007_test --cfg models/da_faster_rcnn/faster_rcnn_end2end.yml
    

Other Implementation

Detectron-DA-Faster-RCNN in Caffe2(Detectron)

Domain-Adaptive-Faster-RCNN-PyTorch in PyTorch

da-faster-rcnn's People

Contributors

yuhuayc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.