Skip to content

[MedIA 2023] Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images

License

Notifications You must be signed in to change notification settings

caiyu6666/DDAD-ASR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images

Yu Cai, Hao Chen, Xin Yang, Yu Zhou, Kwang-Ting Cheng

Visualization on Med-AD

From top to bottom: original image, , DDAD-, DDAD-, DDAD-.

Data Preparation

Option 1

Download the well-processed Med-AD benchmark from: Google Drive | OneDrive.
(The benchmark is organized using 4 public datasets, and should be only applied for academic research.)

Option 2

Organize the Med-AD benchmarks manually follow the guidance.

Environment

  • NVIDIA GeForce RTX 3090
  • Python 3.10
  • Pytorch 1.12.1

Packages

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch -c nvidia
pip install pillow
pip install joblib
pip install pydicom
pip install opencv-python
pip install scikit-learn
pip install tensorboard
pip install matplotlib 
pip install tqdm

Train and Evaluate

All scripts are available in scripts/, and configuration files are in cfgs/. Train and evaluate the method on RSNA dataset using AE as the backbone: ./scripts/run_rsna_ae.sh

python main.py --config cfgs/RSNA_AE.yaml --mode a;
python main.py --config cfgs/RSNA_AE.yaml --mode a;
python main.py --config cfgs/RSNA_AE.yaml --mode a;  # ensemble 3 networks for module a (UDM)
python main.py --config cfgs/RSNA_AE.yaml --mode b;
python main.py --config cfgs/RSNA_AE.yaml --mode b;
python main.py --config cfgs/RSNA_AE.yaml --mode b;  # ensemble 3 networks for module b (NDM)
python main.py --config cfgs/RSNA_AE.yaml --mode eval;
python main.py --config cfgs/RSNA_AE.yaml --mode r;
python main.py --config cfgs/RSNA_AE.yaml --mode eval_r;

Similarly, for training/evaluating on other datasets using other backbones, the following commands can be used:

./scripts/run_rsna_ae.sh
./scripts/run_rsna_memae.sh
./scripts/run_rsna_aeu.sh

./scripts/run_vin_ae.sh
./scripts/run_vin_memae.sh
./scripts/run_vin_aeu.sh

./scripts/run_brain_ae.sh
...

./scripts/run_lag_ae.sh
...

The trained models and results are available here.

Qualitative Analysis

AS histograms

Contact

If any questions, feel free to contact: yu.cai@connect.ust.hk

Acknowledgement

We really appreciate these wonderful open-source codes and datasets!

Codes

  1. https://github.com/dbbbbm/UAE
  2. https://github.com/donggong1/memae-anomaly-detection

Datasets

  1. RSNA Pneumonia Detection Challenge dataset
  2. Vin-BigData Chest X-ray Abnormalities Detection dataset (VinDr-CXR)
  3. Brain Tumor MRI dataset
  4. Large-scale Attention-based Glaucoma (LAG) dataset

Citation

If this work is helpful for you, please cite our papers:

@article{CAI2023102794,
title = {Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images},
journal = {Medical Image Analysis},
volume = {86},
pages = {102794},
year = {2023},
issn = {1361-8415},
doi = {https://doi.org/10.1016/j.media.2023.102794},
author = {Yu Cai and Hao Chen and Xin Yang and Yu Zhou and Kwang-Ting Cheng},
}

@inproceedings{cai2022dual,
  title={Dual-Distribution Discrepancy for Anomaly Detection in Chest X-Rays},
  author={Cai, Yu and Chen, Hao and Yang, Xin and Zhou, Yu and Cheng, Kwang-Ting},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={584--593},
  year={2022},
  organization={Springer}
}

About

[MedIA 2023] Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published