Skip to content

CityU-AIM-Group/SFPolypDA

Repository files navigation

A Source-free Domain Adaptive Polyp Detection Framework with Style Diversification Flow

📌 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

💡 Installation

Please check INSTALL.md for installation instructions.

🔥 Get Started

Step 1: Data Preparation

Option 1: Download data from official data link and convert to detection format.

  1. Download datasets from the following sources:

    Source Domain: CVC-ClinicDB Target Domain: Abnormal Symptoms ETIS-Larib KID

  2. Change the masks to coco style. Please refer to this link or write a script.

Option 2: Use our preprocessed data

  1. Download datasets and corresponding coco format annotations in the following links:

    Source Domain:

    CVC-ClinicDB: gDrive

    Target Domain:

    Abnormal Symptoms: gDrive ETIS-Larib: gDrive

Change the dataset dir

Change the dataset dir to your downloaded data path in here.

Step 2: Prepare the source-only model

Download the Source-only model from gDrive.

Step 3: Training SMPT/SMPT++

# 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

Step 4: Testing the trained model

# 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$

📝 Citation

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}
}

🤞 Acknowledgement

The code is based on FCOS. Thanks for the excellent framework. For enquiries please contact xinyuliu@link.cuhk.edu.hk.

About

[TMI'22] A Source-free Domain Adaptive Polyp Detection Framework with Style Diversification Flow

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published