Skip to content

Liuzhengfa88/FLDMN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLDMN: Feature and Label Distributions Matching Networks for Cross-domain Object Detection

This repository is the official PyTorch implementation of paper FLDMN: Feature and Label Distributions Matching Networks for Cross-domain Object Detection. (The work has been submitted to AAAI2021)

Main requirements

  • torch == 1.0.0
  • torchvision == 0.2.0
  • Python 3

Environmental settings

This repository is developed using python 3.7.6 on Ubuntu 16.04.5 LTS. The CUDA nad CUDNN version is 9.0 and 7.4.1 respectively. We use one NVIDIA 1080ti GPU card for training and testing. Other platforms or GPU cards are not fully tested.

Please follow faster-rcnn respository to setup the environment.

Datasets

Datasets Preparation

  • Cityscape and FoggyCityscape: Download the Cityscape dataset, see dataset preparation code in DA-Faster RCNN.
  • PASCAL_VOC 07+12: Please follow the instruction to prepare VOC dataset.
  • Clipart: Please follow the instruction to prepare Clipart dataset.
  • Sim10k: Download the dataset from this website.

Datasets Format

All codes are written to fit for the format of PASCAL_VOC.

Data Augmentation

We use CycleGAN to generate the transferred samples for both source and target domains, and then train the model with original and transferred images.

Data Download

Due to the size limitation of uploaded data, we will release the data before and after augmentation upon acceptance.

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:

Due to the size limitation of uploaded data, we will release the pre-trained FLDMN models upon acceptance.

Train

CUDA_VISIBLE_DEVICES=$GPU_ID \
       python da_trainval_net.py \
       --dataset source_dataset/target_dataset \
       --net vgg16/resnet101 \
       --pretrained_path path_to_pre-trained-model \
       --save_dir path_to_save-model

Test

CUDA_VISIBLE_DEVICES=$GPU_ID \
       python test_net.py \
       --dataset source_dataset/target_dataset \
       --net vgg16/resnet101  \
       --model_prefix path_to_model


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published