G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection [AAAI24 Paper]
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.
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
...
We train our models on a V100 GPU platform.
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
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
Please refer to the inference instructions for evaluating the saved model from the augment stage.
Note: All results are running with FPN.
Full results in LaTeX format available here.
@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}
}