Skip to content

Latest commit

 

History

History
130 lines (112 loc) · 4.84 KB

README.md

File metadata and controls

130 lines (112 loc) · 4.84 KB

Unsupervised Domain Adaptation Architecture Search with Self-Training for Land Cover Mapping

We proposed a simple UDA-NAS framework to search for lightweight neural networks for land cover mapping tasks under domain shift. The framework integrates Markov random field neural architecture search into a self-training UDA scheme to search for efficient and effective networks under a limited computation budget.

The paper is accepted at 2024 CVPR Workshop.

 

framework fig

Requirements

The source code depends on the packages in the requirements.txt file.

Run the command below to install the packages.

pip install -r requirements.txt

Datasets

  • Download the OpenEarthMap dataset and based on the regional-wise UDA settings in the paper organise the folder structure as follows:
data
|- OpenEarthMap
|  |- images
|  |  |- aachen 
|  |  |- abancay
|  |  |- ...
|  |  |- ...
|  |  |- ...
|  |  |- zachodniopomorskie
|  |  |- zanzibar
|  |- labels
|  |  |- aachen 
|  |  |- abancay
|  |  |- ...
|  |  |- ...
|  |  |- ...
|  |  |- zachodniopomorskie
|  |  |- zanzibar
|  |- splits
|  |  |- source.txt
|  |  |- target_train.txt
|  |  |- target_test.txt
|  |  |- target_val.txt
data
|- FLAIR1
|  |- images
|  |  |  |- D006_2020 
|  |  |  |- D008_2019
|  |  |  |- ...
|  |  |  |- ...
|  |  |  |- ...
|  |  |  |- D083_2020
|  |  |  |- D085_2019
|  |- labels
|  |  |  |- D006_2020 
|  |  |  |- D008_2019
|  |  |  |- ...
|  |  |  |- ...
|  |  |  |- ...
|  |  |  |- D083_2020
|  |  |  |- D085_2019
|  |- splits
|  |  |- source.txt
|  |  |- target_train.txt
|  |  |- target_test.txt
|  |  |- target_val.txt

Usage

Searching
  • Learning pairwise MRF.
  python tools/train.py configs/nas_uda/search_oem_nas_uda_mrf_unet.py 
  • Inference over the learnt MRF for different architecture choices config.
 python tools/inference.py --ckp-path /path/to/search/checkpoint.pth
Training

Training the found architectures to select optimal solution. Modify the architecture choices config in the config file and run the commands below to train the network.

python tools/train.py configs/nas_uda/ \
    train_oem_nas_uda_mrf_unet_confidence_based.py

python tools/train.py configs/nas_uda/ \
    train_flair_nas_uda_mrf_unet_confidence_based.py
Testing and Pretrained network

Download pretrained weights of the found networks on OpenEarthMap and FLAIR #1, unzip them into the pretrained folder and run the commands below.

python tools/test.py \
    configs/nas_uda/test_oem_nas_uda_mrf_unet_confidence_based.py \
    pretrained/openearthmap/net_c_1.pth \
    --test-set --eval mIoU --show-dir results

python tools/test.py \
    configs/nas_uda/test_flair_nas_uda_mrf_unet_confidence_based.py \
    pretrained/openearthmap/net_c_1.pth \
    --test-set --eval mIoU --show-dir results

Citation

@InProceedings{Broni-Bediako_2024_CVPR,
    author    = {Broni-Bediako, Clifford and Xia, Junshi and Yokoya, Naoto},
    title     = {Unsupervised Domain Adaptation Architecture Search with Self-Training for Land Cover Mapping},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2024},
    pages     = {543-553}
}

Acknowledgement

This code is heavily borrowed from MRF-UNet and DAFormer. Thanks to the authors for making their code publically available.

License

This work is licensed under the MIT License, however, please refer to the licences of the MRF-UNet and DAFormer if you are using this code for commercial matters.