This is the Pytorch implementation of our paper -
Multi-Source Domain Adaptation for Object Detection with Prototype-based Mean-teacher
Atif Belal, Akhil Meethal, Francisco Perdigon Romero, Marco Pedersoli, Eric Granger
mkdir python_env
python3 -m venv python_env/
source python_env/bin/activate
pip3 install torch torchvision torchaudio
Follow the INSTALL.md to install Detectron2.
BDD100K - Download the dataset from BDD100K page
Cityscapes - Follow the instruction on DA-Faster-RCNN
Kitty - Download the dataset from Kitty
MS COCO - Download the dataset from COCO
Synscapes - Follow the instruction on Synscapes
PMTeacher/
└── datasets/
└── Daytime/
├── Annotations/
├── Imagesets/
├── JPEGImages/
└── Night/
├── Annotations/
├── Imagesets/
├── JPEGImages/
└── DuskDawn/
├── Annotations/
├── Imagesets/
├── JPEGImages/
└── Kitty/
├── Annotations/
├── Imagesets/
├── JPEGImages/
└── Cityscapes/
├── annotations/
├── gtFine/
├── leftIm8bits
└── Synscapes/
├── img/
├── meta/
└── Coco/
├── annotations/
├── train2017/
Train the PMT under Daytime, Night (source) and DuskDawn (target)
python train_net.py \
--num-gpus 4 \
--config configs/crosstime.yaml \
OUTPUT_DIR output/crosstime
Train the PMT under Cityscapes, Kitty (source) and Daytime (target)
python train_net.py \
--num-gpus 4 \
--config configs/crosscamera.yaml \
OUTPUT_DIR output/crosscamera
python train_net.py \
--resume \
--num-gpus 4 \
--config configs/crosstime.yaml \
MODEL.WEIGHTS <your weight>.pth
python train_net.py \
--eval-only \
--num-gpus 4 \
--config configs/crosstime.yaml \
MODEL.WEIGHTS <your weight>.pth
Crosstime Setting - Model
Crosscamera Setting - Model