Skip to content

Computer-Vision-Dhankar-Rohit/DA-MRCNN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

DA-MRCNN: Domain Adaptive Mask R-CNN

Detectron2 implementation of Domain Adaptive Mask R-CNN

Installation

Follow the guide on Detectron2's documentation to install Detectron2.

Then replace detectron2/modeling/meta_arch/rcnn.py with our DA-MRCNN/rcnn.py, and detectron2/modeling/backbone/fpn.py with our DA-MRCNN/fpn.py.

Data Preparation

We use COCO format to register the dataset.

register_coco_instances("dataset_name_source_training",{},"path_annotations","path_images")
register_coco_instances("dataset_name_source_validation",{},"path_annotations","path_images")
register_coco_instances("dataset_name_source_domain_adaptation_training",{},"path_annotations","path_images")
register_coco_instances("dataset_name_source_domain_adaptation_validation",{},"path_annotations","path_images")

register_coco_instances("dataset_name_target_test",{},"path_annotations","path_images")
register_coco_instances("dataset_name_target_domain_adaptation_training",{},"path_annotations","path_images")
register_coco_instances("dataset_name_target_domain_adaptation_validation",{},"path_annotations","path_images")

Pretrained weight

A pretrained model is recommended. It can be prepared from ReGion-Based Detector (RGBD).

Train

tools/trainer.py

Remarks: If the last checkpoint is 30000 iteration (e.g. from the pretrained weight above), the MAX_ITER must be greater than 30000.

Evaluation

tools/evaluate.py uses COCO AP evaluations.

Inference

tools/inference.py

Reference

[1] Pasqualino, G., Furnari, A., Signorello, G., Farinella, G. M. (2021). An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites. Image and Vision Computing, 107, 104098.

[2] Chuang, S. J. et al (2021). On-site Rebar Spacing Inspection using Deep-learning-based Image Segmentation. Comput Aided Civ Inf, 2021;00:1–9.

[3] Wu, Y., Kirillov, A., Massa, F., Lo, W.-Y., & Girshick, R. (2019). Detectron2.

About

Detectron2 implementation of DA-MRCNN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%