Skip to content

This repository contains the code of the pulished paper "G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection" in AAAI 2024.

License

Notifications You must be signed in to change notification settings

wufan-cse/G-NAS

Repository files navigation

G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection [AAAI24 Paper]

Algorithm framework

Installation

Our code is based on mmdetection and please follow the tutorial for installation.

Or you can just install this repository using the following commands:

conda create --name gnas python=3.8 -y
conda activate gnas
conda install pytorch torchvision -c pytorch
pip install -U openmim
mim install mmengine
mim install "mmcv>=2.0.0"
git clone https://github.com/wufan-cse/gnas.git
cd gnas
pip install -v -e .

Notably, the pytorch and torchvision installation in the third line better follow the official instructions.

Datasets

Download the Daytime-Sunny, Daytime-Foggy, Dusk-Rainy, Night-Sunny and Night-Rainy datasets from this link.

国内用户可以通过OpenDataLab下载。

Unzip and format the datasets as follows:

dataset_root_path/
    /daytime_clear
        /VOC2007
            /Annotations
            /ImageSets
                /Main
            /JPEGImages
    /daytime_foggy
    ...

Training

We train our models on a V100 GPU platform.

1. Search stage

Set the variable DATA_ROOT in gnas_search_faster-rcnn_r101_fpn_1x_coco.py to the dataset path, for example, DATA_ROOT='dataset_root_path/daytime_clear'.

# single gpu
python tools/train.py configs/gnas/search/gnas_search_faster-rcnn_r101_fpn_1x_coco.py

# multiple gpus
CUDA_VISIBLE_DEVICES=0,1 bash tools/dist_train.sh configs/gnas/search/gnas_search_faster-rcnn_r101_fpn_1x_coco.py 2
2. Augment stage

Similarly, set the variable DATA_ROOT in gnas_augment_faster-rcnn_r101_fpn_1x_coco.py to your dataset path.

# single gpu
python tools/train.py configs/gnas/augment/gnas_augment_faster-rcnn_r101_fpn_1x_coco.py

# multiple gpus
CUDA_VISIBLE_DEVICES=0,1 bash tools/dist_train.sh configs/gnas/augment/gnas_augment_faster-rcnn_r101_fpn_1x_coco.py 2

Evaluation

Please refer to the inference instructions for evaluating the saved model from the augment stage.

New Results

Note: All results are running with FPN.

Result table

Full results in LaTeX format available here.

Citation

@inproceedings{wu2024g,
  title={G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection},
  author={Wu, Fan and Gao, Jinling and Hong, Lanqing and Wang, Xinbing and Zhou, Chenghu and Ye, Nanyang},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  number={6},
  pages={5958--5966},
  year={2024}
}

About

This repository contains the code of the pulished paper "G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection" in AAAI 2024.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages