Skip to content

[T-CSVT 2021] Domain Contrast for Domain Adaptive Object Detection

License

Notifications You must be signed in to change notification settings

LiewFeng/Domain-Contrast

Repository files navigation

Domain Contrast

Code of Domain Contrast for Domain Adaptive Object Detection, accepted in IEEE Transactions on Circuits and Systems for Video Technology(TCSVT),2021.

The code is built based on the faster-rcnn. Please follow original project respository to set up the environment.

Data Preparation

  • PASCAL_VOC 07+12: Please refer py-faster-rcnn for constructing PASCAL VOC Datasets.
  • Clipart, Comic, WaterColor: Please refer Cross Domain Detection .
  • SIM10k: Please refer website SIM10k
  • Cityscape:Please refer website Cityscape, see dataset preparation code in DA-Faster RCNN
  • Transferred Datasets: We use CycleGAN to generate transferred images.We trained CycleGAN with a learning rate of 2e-4 for the first ten epochs and a linear decaying rate to zero over the next ten epochs.

All codes are written to fit for the Data format of Pascal VOC. After downloading/generating the data, creat softlinks in the folder data/.

Pretrained Model

In our experiments, we used two pre-trained models on ImageNet, i.e., VGG16 and ResNet101. Please download these two models from:

Download them and put them into the data/pretrained_model/.

Train and Test

All specific hyperparameters are in the shell scripts. Run with the following commands and you will get the results. Pascal2Clipart:

bash pascal2clipart.sh

Pascal2Comic:

bash pascal2comic_vgg16.sh
bash pascal2comic_resnet101.sh

Pascal2Watercolor:

bash pascal2watercolor.sh

SIM10K2Cityscape:

bash sim10k2city.sh

Results

Task Backbone mAP
Pascal2Clipart Resnet101 43.2
Pascal2Comic VGG16 36.9
Pascal2Watercolor Resnet101 53.7
SIM10K2Cityscape VGG16 41.6