Skip to content

imatif17/ACIA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attention-based Class-Conditioned Alignment for Multi-Source Domain Adaptation of Object Detectors

This is the Pytorch implementation of our paper -

Attention-based Class-Conditioned Alignment for Multi-Source Domain Adaptation of Object Detectors
Atif Belal, Akhil Meethal, Francisco Perdigon Romero, Marco Pedersoli, Eric Granger

[WACV2025][arXiv]

Installation

Prerequisites

  • Linux or macOS with Python ≥ 3.8
  • PyTorch ≥ 1.5 and torchvision that matches the PyTorch installation.
  • Detectron2

Create Python environment and Install PyTorch

mkdir python_env
python3 -m venv python_env/
source python_env/bin/activate
pip3 install torch torchvision torchaudio

Build Detectron2 from Source

Follow the INSTALL.md to install Detectron2.

Dataset download

  1. Download the datasets

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

  1. Organize the dataset as following:
ACIA/
└── 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/

Training

Train the ACIA under Daytime, Night (source) and DuskDawn (target)

python train_net.py \
      --num-gpus 4 \
      --config configs/cross_time.yaml \
      OUTPUT_DIR output/cross_time

Train the ACIA under Cityscapes, Kitty (source) and Daytime (target)

python train_net.py \
      --num-gpus 4 \
      --config configs/cross_camera.yaml \
      OUTPUT_DIR output/cross_camera

Resume Training

python train_net.py \
      --resume \
      --num-gpus 4 \
      --config configs/cross_time.yaml \
      MODEL.WEIGHTS <your weight>.pth

Evaluation

python train_net.py \
      --eval-only \
      --num-gpus 4 \
      --config configs/crosstime.yaml \
      MODEL.WEIGHTS <your weight>.pth

Pre-trained Models

Crosstime Setting - Coming Soon

Crosscamera Setting - Coming Soon

Mixed Setting - Coming Soon

Detection Visualization

Result comparison on the Crosstime and Crosscamera Setting

Result comparison on the Mixed Setting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages