sea123321 / IDF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exploring Implicit Domain-invariant Features for Domain Adaptive Object Detection (IEEE TCSVT)

(IEEE Transactions on Circuits and Systems for Video Technology)

A Pytorch Implementation of Implicit Domain-invariant Faster R-CNN (IDF) for Domain Adaptive Object Detection.

Introduction

Please follow faster-rcnn respository to setup the environment. In this project, we use Pytorch 1.0.1 and CUDA version is 10.0.130.

Datasets

Datasets Preparation

  • Cityscape and FoggyCityscape: Download the Cityscape dataset, see dataset preparation code in DA-Faster RCNN.
  • KITTI: Download the dataset from this website to prepare KITTI dataset.
  • Sim10k: Download the dataset from this website.

Datasets Format

All codes are written to fit for the format of PASCAL_VOC.
If you want to use this code on your own dataset, please arrange the dataset in the format of PASCAL, make dataset class in lib/datasets/, and add it to lib/datasets/factory.py, lib/datasets/config_dataset.py. Then, add the dataset option to lib/model/utils/parser_func.py.

Implied Transferable Samples and Target Pseudo Label

You should use CycleGAN to generate the implied transferable samples. And the implied transferable target sample used to train a Faster R-CNN. Then the detection results of this model can be the target pseudo label.

Models

Pre-trained Models

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 write the path in __C.VGG_PATH and __C.RESNET_PATH at lib/model/utils/config.py.

Train

CUDA_VISIBLE_DEVICES=$GPU_ID \
       python trainval_idf.py \
       --dataset source_dataset --dataset_t target_dataset \
       --net vgg16/resnet101 

Test

CUDA_VISIBLE_DEVICES=$GPU_ID \
       python test_idf.py \
       --dataset source_dataset --dataset_t target_dataset \
       --net vgg16/resnet101  \
       --load_name path_to_model

Citation

If you find this repository useful, please cite our paper:

@ARTICLE{9927485,
  author={Lang, Qinghai and Zhang, Lei and Shi, Wenxu and Chen, Weijie and Pu, Shiliang},
  journal={IEEE Transactions on Circuits and Systems for Video Technology}, 
  title={Exploring Implicit Domain-invariant Features for Domain Adaptive Object Detection}, 
  year={2022},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TCSVT.2022.3216611}}

About


Languages

Language:Python 75.5%Language:Cuda 10.3%Language:C 9.6%Language:C++ 2.2%Language:Cython 2.1%Language:MATLAB 0.3%Language:Shell 0.1%