By Zhaoyang Wang, Haiyong Chen, Binyi Su, Shijie Wang, and Amal Altaezi.
This repository contains the implementation accompanying our paper FDDA: A Feature Disentangling Domain Adaptation Method for Robust Industrial Defect Detection.
If you find it helpful for your research, please consider citing:
@ARTICLE{fdda,
author={Zhaoyang Wang, Haiyong Chen, Binyi Su, Shijie Wang, and Amal Altaezi},
journal={IEEE Transactions on Automation Science and Engineering},
title={FDDA: A Feature Disentangling Domain Adaptation Method for Robust Industrial Defect Detection},
year={-},
volume={-},
pages={-}}
Our FDDA implementation is bulit upon detrex.
Please refer to Installation Instructions for the details of installation.
Please refer to Getting Started with detrex for the basic usage of detrex. We also provides other tutorials for:
- Learn about the config system of detrex
- How to convert the pretrained weights from original detr repo into detrex format
- Visualize your training data and testing results on COCO dataset
- Analyze the model under detrex
- Download and initialize with the pretrained backbone weights
- Frequently asked questions
- A simple onnx convert tutorial provided by powermano
- Simple training techniques: Model-EMA, Mixed Precision Training, Activation Checkpoint
- Simple tutorial about custom dataset training
Although some of the tutorials are currently presented with relatively simple content, we will constantly improve our documentation to help users achieve a better user experience.
Please see documentation for full API documentation and tutorials.
- First, make sure you have installed the detrex project properly, which can be used for training and inference.
- Download the ELES, TTD and MHHS datasets and convert the annotation files into COCO-format annotations.
(1) For the Feature Disentangled Pre-traning (FDP):
python tools/fdp.py --config-file projects/fdda/configs/models/dino_fdda.py train.output_dir outputs/fdda_fdp
(2) For the Domain Prompt Adaptation (DPA):
python tools/dpa.py --config-file projects/fdda/configs/models/dino_fdda.py train.init_checkpoint outputs/fdda_fdp/model_final.pth
(3) For the Domain Prompt Adaptation (DPA):
python tools/dpa.py --config-file projects/fdda/configs/fdda_dino_dpa_12ep.py --eval-only
(1) TEPG Module:
detrex/modeling/backbones/tepg.py
(2) TDCS Module:
detrex/modeling/backbones/tdcs.py
(3) FDDA Detector:
projects/fdda/modeling/fdda.py
(4) Loss Function:
detrex/modeling/criterion/fdda_criterion.py
This project is released under the Apache 2.0 license.
- detrex is an open-source toolbox for Transformer-based detection algorithms created by researchers of IDEACVR. We appreciate all contributions to detrex!
- detrex is built based on Detectron2 and part of its module design is borrowed from MMDetection, DETR, and Deformable-DETR.