Giter VIP home page Giter VIP logo

ddad-asr's Introduction

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: [email protected]

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

ddad-asr's People

Contributors

caiyu6666 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.