All Projects → fpv-iplab → DA-RetinaNet

fpv-iplab / DA-RetinaNet

Licence: other
Official Detectron2 implementation of DA-RetinaNet of our Image and Vision Computing 2021 work 'An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites'

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to DA-RetinaNet

Seg Uncertainty
IJCAI2020 & IJCV 2020 🌇 Unsupervised Scene Adaptation with Memory Regularization in vivo
Stars: ✭ 202 (+551.61%)
Mutual labels:  cityscapes, domain-adaptation
Deeplabv3plus Pytorch
DeepLabv3, DeepLabv3+ and pretrained weights on VOC & Cityscapes
Stars: ✭ 337 (+987.1%)
Mutual labels:  pascal-voc, cityscapes
RetinaNet Tensorflow
Focal Loss for Dense Object Detection.
Stars: ✭ 52 (+67.74%)
Mutual labels:  pascal-voc, retinanet
ACAN
Code for NAACL 2019 paper: Adversarial Category Alignment Network for Cross-domain Sentiment Classification
Stars: ✭ 23 (-25.81%)
Mutual labels:  domain-adaptation, unsupervised-domain-adaptation
multiclass-semantic-segmentation
Experiments with UNET/FPN models and cityscapes/kitti datasets [Pytorch]
Stars: ✭ 96 (+209.68%)
Mutual labels:  cityscapes, cityscapes-dataset
domain-adaptation-capls
Unsupervised Domain Adaptation via Structured Prediction Based Selective Pseudo-Labeling
Stars: ✭ 43 (+38.71%)
Mutual labels:  domain-adaptation, unsupervised-domain-adaptation
Edgenets
This repository contains the source code of our work on designing efficient CNNs for computer vision
Stars: ✭ 331 (+967.74%)
Mutual labels:  pascal-voc, cityscapes
DST-CBC
Implementation of our paper "DMT: Dynamic Mutual Training for Semi-Supervised Learning"
Stars: ✭ 98 (+216.13%)
Mutual labels:  pascal-voc, cityscapes
Robust Detection Benchmark
Code, data and benchmark from the paper "Benchmarking Robustness in Object Detection: Autonomous Driving when Winter is Coming" (NeurIPS 2019 ML4AD)
Stars: ✭ 128 (+312.9%)
Mutual labels:  pascal-voc, cityscapes
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (+145.16%)
Mutual labels:  pascal-voc, cityscapes
CADA
Attending to Discriminative Certainty for Domain Adaptation
Stars: ✭ 17 (-45.16%)
Mutual labels:  domain-adaptation, unsupervised-domain-adaptation
publications-arruda-ijcnn-2019
Cross-Domain Car Detection Using Unsupervised Image-to-Image Translation: From Day to Night
Stars: ✭ 59 (+90.32%)
Mutual labels:  cyclegan, unsupervised-domain-adaptation
ganslate
Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
Stars: ✭ 17 (-45.16%)
Mutual labels:  domain-adaptation, cyclegan
Combogan
Stars: ✭ 134 (+332.26%)
Mutual labels:  domain-adaptation, cyclegan
Pytorch Auto Drive
Segmentation models (ERFNet, ENet, DeepLab, FCN...) and Lane detection models (SCNN, SAD, PRNet, RESA, LSTR...) based on PyTorch 1.6 with mixed precision training
Stars: ✭ 32 (+3.23%)
Mutual labels:  pascal-voc, cityscapes
cityscapes-to-coco-conversion
Cityscapes to CoCo Format Conversion Tool for Mask-RCNN and Detectron
Stars: ✭ 40 (+29.03%)
Mutual labels:  cityscapes, cityscapes-dataset
IAST-ECCV2020
IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Stars: ✭ 84 (+170.97%)
Mutual labels:  cityscapes, domain-adaptation
avatars4all
Live real-time avatars from your webcam in the browser. No dedicated hardware or software installation needed. A pure Google Colab wrapper for live First-order-motion-model, aka Avatarify in the browser. And other Colabs providing an accessible interface for using FOMM, Wav2Lip and Liquid-warping-GAN with your own media and a rich GUI.
Stars: ✭ 187 (+503.23%)
Mutual labels:  google-colab
semantic-segmentation
SOTA Semantic Segmentation Models in PyTorch
Stars: ✭ 464 (+1396.77%)
Mutual labels:  cityscapes
wsddn.pytorch
Implementation of Weakly Supervised Deep Detection Networks using the latest version of PyTorch
Stars: ✭ 39 (+25.81%)
Mutual labels:  pascal-voc

Detectron2 implementation of DA-RetinaNet

This is the implementation of our Image and Vision Computing 2021 work 'An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites'. The aim is to reduce the gap between source and target distribution improving the object detector performance on the target domain when training and test data belong to different distributions. The original paper can be found here.
If you want to use this code with your dataset, please follow the following guide.

Please leave a star and cite the following paper if you use this repository for your project.

@article{PASQUALINO2021104098,
    title = "An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites",
    journal = "Image and Vision Computing",
    pages = "104098",
    year = "2021",
    issn = "0262-8856",
    doi = "https://doi.org/10.1016/j.imavis.2021.104098",
    author = "Giovanni Pasqualino and Antonino Furnari and Giovanni Signorello and Giovanni Maria Farinella",
}

DA-RetinaNet Architecture

Installation

You can use this repo following one of these three methods:
NB: Detectron2 0.2.1 is required, installing other versions this code will not work.

Detectron 2 on your PC

Follow the official guide to install Detectron2 0.2.1

Detectron2 via Dockerfile

Follow these instructions:

cd docker/
# Build 
docker build -t detectron2:v0 .

# Launch
docker run --gpus all -it --shm-size=8gb -v /home/yourpath/:/home/yourpath --name=name_container detectron2:v0

If you exit from the container you can restart it using:

docker start name_container
docker exec -it name_container /bin/bash

Google Colab

Load and run the DA-RetinaNet.ipynb on Google Colab following the instructions inside the notebook.

Dataset

Create the Cityscapes-Foggy Cityscapes dataset following the instructions available here
The UDA-CH dataset is available here

Data Preparation

If you want to use this code with your dataset arrange the dataset in the format of COCO or PASCAL VOC.
For COCO annotations, inside the script uda_train.py register your dataset using:

register_coco_instances("dataset_name_source_training",{},"path_annotations","path_images")
register_coco_instances("dataset_name_target_training",{},"path_annotations","path_images")
register_coco_instances("dataset_name_target_test",{},"path_annotations","path_images")

For PASCAL VOC annotations, inside the cityscape_train.py register your dataset using:

register_pascal_voc("city_trainS", "cityscape/VOC2007/", "train_s", 2007, ['car','person','rider','truck','bus','train','motorcycle','bicycle'])
register_pascal_voc("city_trainT", "cityscape/VOC2007/", "train_t", 2007, ['car','person','rider','truck','bus','train','motorcycle','bicycle'])
register_pascal_voc("city_testT", "cityscape/VOC2007/", "test_t", 2007, ['car','person','rider','truck','bus','train','motorcycle','bicycle'])

You need to replace the parameters inside the register_pascal_voc() function according to your dataset name and classes.

Training

Replace at the following path detectron2/modeling/meta_arch/ the retinanet.py script with our retinanet.py.
Do the same for the fpn.py file at the path detectron2/modeling/backbone/

Run the script uda_train.py for COCO annotations or cityscape_train.py for PASCAL VOC annotations.

Trained model on Cityscapes to FoggyCityscapes is available at this link:
DA-RetinaNet_Cityscapes

Trained models on the proposed UDA-CH dataset are available at these links:
DA-RetinaNet
DA-RetinaNet-CycleGAN

Testing

If you want to test the model load the new weights, set to 0 the number of iterations and rerun the same script used for the training.

Results on Cityscapes -> Foggy Cityscapes

Results adaptation between Cityscapes and Foggy Cityscapes dataset. The performance scores of the methods marked with the “*” symbol are reported from the authors of their respective papers.

Model mAP
Faster RCNN* 20.30%
DA-Faster RCNN* 27.60%
StrongWeak* 34.30%
Diversify and Match* 34.60%
RetinaNet 40.25%
DA-RetinaNet 44.87%
RetinaNet (Oracle) 53.46%

Results on the proposed dataset Synthetic -> Real

Results of DA-Faster RCNN, Strong-Weak and the proposed DA-RetinaNet combined with image-to-image translation approach.

image to image translation (CycleGAN)
Object Detector None Synthetic to Real
DA-Faster RCNN 12.94% 33.20%
StrongWeak 25.12% 47.70%
DA-RetinaNet 31.04% 58.01%

Other Works

STMDA-RetinaNet
Detectron2 implementation of DA-Faster RCNN

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].