This project hosts the code for the implementation of Unsupervised Domain Adaptive Detection with Network Stability Analysis (ICCV 2023).
Domain adaptive detection aims to improve the generality of a detector, learned from the labeled source domain, on the unlabeled target domain. In this work, drawing inspiration from the concept of stability from the control theory that a robust system requires to remain consistent both externally and internally regardless of disturbances, we propose a novel framework that achieves unsupervised domain adaptive detection through stability analysis. In specific, we treat discrepancies between images and regions from different domains as disturbances, and introduce a novel simple but effective Network Stability Analysis (NSA) framework that considers various disturbances for domain adaptation. Particularly, we explore three types of perturbations including heavy and light image-level disturbances and instancelevel disturbance. For each type, NSA performs external consistency analysis on the outputs from raw and perturbed images and/or internal consistency analysis on their features, using teacher-student models. By integrating NSA into Faster R-CNN, we immediately achieve state-of-the-art results. In particular, we set a new record of 52.7% mAP on Cityscapes-to-FoggyCityscapes, showing the potential of NSA for domain adaptive detection. It is worth noticing, our NSA is designed for general purpose, and thus applicable to one-stage detection model (e.g., FCOS) besides the adopted one, as shown by experiments.
The implementation of our anchor-based detector is heavily based on Faster-RCNN (#f0a9731).
Install NSA:
pip install imgaug==0.4.0
Click the links below to download the checkpoint for the corresponding model type:
Adaptation Type | Detector | mAP | model |
---|---|---|---|
Cityscapes->FoggyCityscapes | Faster-RCNN | 0.527 | model |
Cityscapes->RainCityscapes | Faster-RCNN | 0.587 | model |
Sim10k->Cityscapes | Faster-RCNN | 0.563 | model |
KITTI->Cityscapes | Faster-RCNN | 0.556 | model |
Cityscapes->BDD100k | Faster-RCNN | 0.355 | model |
The trained model can be evaluated by the following command.
python -m torch.distributed.launch --nproc_per_node=2 --master_port=2800 dis_test-nsa.py --config-file configs/NSA/city/adv_vgg16_cityscapes_2_foggy_nsa_s1.yaml --resume /your_path/ --test-only
Please consider citing our paper in your publications if the project helps your research.
@InProceedings{Zhou_2023_ICCV_NSA,
author = {Zhou, Wenzhang and Heng, Fan and Luo, Tiejian and Zhang, Libo},
title = {Unsupervised Domain Adaptive Detection with Network Stability Analysis},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
year = {2023}
}