Code Monkey home page Code Monkey logo

uadan's Introduction

Uncertainty-Aware Unsupervised Domain Adaptation in Object Detection

Updates

Paper

Uncertainty-Aware Unsupervised Domain Adaptation in Object Detection
Dayan Guan1, Jiaxing Huang1, Xiao Aoran1, Shijian Lu1, Yanpeng Cao2

1School of Computer Science Engineering, Nanyang Technological University, Singapore
2School of Mechanical Engineering, Zhejiang University, Hangzhou, China.

IEEE Transactions on Multimedia, 2021.

If you find this code useful for your research, please cite our paper:

@article{guan2021uncertainty,
  title={Uncertainty-aware unsupervised domain adaptation in object detection},
  author={Guan, Dayan and Huang, Jiaxing and Xiao, Aoran and Lu, Shijian and Cao, Yanpeng},
  journal={IEEE Transactions on Multimedia},
  year={2021},
  publisher={IEEE}
}

Abstract

Unsupervised domain adaptive object detection aims to adapt detectors from a labelled source domain to an unlabelled target domain. Most existing works take a two-stage strategy that first generates region proposals and then detects objects of interest, where adversarial learning is widely adopted to mitigate the inter-domain discrepancy in both stages. However, adversarial learning may impair the alignment of well-aligned samples as it merely aligns the global distributions across domains. To address this issue, we design an uncertainty-aware domain adaptation network (UaDAN) that introduces conditional adversarial learning to align well-aligned and poorly-aligned samples separately in different manners. Specifically, we design an uncertainty metric that assesses the alignment of each sample and adjusts the strength of adversarial learning for well-aligned and poorly-aligned samples adaptively. In addition, we exploit the uncertainty metric to achieve curriculum learning that first performs easier image-level alignment and then more difficult instance-level alignment progressively. Extensive experiments over four challenging domain adaptive object detection datasets show that UaDAN achieves superior performance as compared with state-of-the-art methods.

Installation

conda env create -f environment.yaml
conda activate uadan
python setup.py build develop
pip install torchvision==0.2.1

Prepare Dataset

  • Pascal VOC: Download Pascal VOC dataset at UaDAN/dataset/voc
  • Clipart1k: Download Clipart1k dataset at UaDAN/dataset/clipart and unzip it (Clipart1k dataset contains 1,000 comical images, in which 800 for training and 200 for validation.)
mv tools/dataset/clipart/ImageSets dataset/clipart

Pre-trained models

Pre-trained models can be downloaded here and put in UaDAN/pretrained_models

Evaluation

python tools/test_net.py --config-file "configs/UaDAN_Voc2Clipart.yaml" MODEL.WEIGHT "pretrained_models/UaDAN_Voc2Clipart.pth"
python tools/test_net.py --config-file "configs/UaDAN_City2Vistas.yaml" MODEL.WEIGHT "pretrained_models/UaDAN_City2Vistas.pth"

Training

python tools/train_net.py --config-file "configs/UaDAN_voc2clipart.yaml"
python tools/test_net_all.py --config-file "configs/UaDAN_voc2clipart.yaml"

Acknowledgements

This codebase is heavily borrowed from maskrcnn-benchmark and Domain-Adaptive-Faster-RCNN-PyTorch

Contact

If you have any questions, please contact: [email protected]

uadan's People

Contributors

dayan-guan avatar khanh-moriaty avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.