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
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.
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/nas_sd/search/gnas_search_faster-rcnn_r101_fpn_1x_coco.py
# multiple gpus
CUDA_VISIBLE_DEVICES=0,1 bash tools/dist_train.sh configs/nas_sd/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/nas_sd/augment/gnas_augment_faster-rcnn_r101_fpn_1x_coco.py
# multiple gpus
CUDA_VISIBLE_DEVICES=0,1 bash tools/dist_train.sh configs/nas_sd/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.
@inproceedings{wu2023gnas,
title = {G-NAS: Generalizable Neural Architecture Search for Single Domain Generalization Object Detection},
author = {Wu, Fan and Gao, Jinling and Lanqing, HONG and Wang, Xinbing and Zhou, Chenghu and Ye, Nanyang},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
year = {2024},
}