📌 This is an official PyTorch implementation of [TMI 2022] - A Source-free Domain Adaptive Polyp Detection Framework with Style Diversification Flow.
A Source-free Domain Adaptive Polyp Detection Framework with Style Diversification Flow
Xinyu Liu, Yixuan Yuan
The Chinese Univerisity of Hong Kong
Please check INSTALL.md for installation instructions.
-
Download datasets from the following sources:
Source Domain: CVC-ClinicDB Target Domain: Abnormal Symptoms ETIS-Larib KID
-
Change the masks to coco style. Please refer to this link or write a script.
-
Download datasets and corresponding coco format annotations in the following links:
Source Domain:
CVC-ClinicDB: gDrive
Target Domain:
Change the dataset dir to your downloaded data path in here.
Download the Source-only model from gDrive.
# Train the SMPT stage
python tools/train_net_mcd.py --config-file configs/sf/smpt_hcmus.yaml SOLVER.SFDA_STAGE 5
# Train the SSDF stage, need to modify "ann_file"(L348) in ./fcos_core/engine/trainer to the annotations of the training dataset.
python tools/train_net_mcd.py --config-file configs/sf/smpt_hcmus.yaml SOLVER.SFDA_STAGE 2
# Test the trained model
python tools/train_net_mcd.py --config-file configs/sf/$YOUR YAML FILE$ SOLVER.SFDA_STAGE 5 SOLVER.TEST_ONLY True MODEL.WEIGHT $YOUR .pth WEIGHT$
If you find this work or codebase is useful for your research, please give it a star and citation. We sincerely appreciate for your acknowledgments.
@article{liu2022source,
title={A source-free domain adaptive polyp detection framework with style diversification flow},
author={Liu, Xinyu and Yuan, Yixuan},
journal={IEEE Transactions on Medical Imaging},
volume={41},
number={7},
pages={1897--1908},
year={2022},
publisher={IEEE}
}
The code is based on FCOS. Thanks for the excellent framework. For enquiries please contact xinyuliu@link.cuhk.edu.hk.