Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caiyu6666/DDAD-ASR
[MedIA'2023] Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images
https://github.com/caiyu6666/DDAD-ASR
anomaly-detection deep-learning pytorch
Last synced: 14 days ago
JSON representation
[MedIA'2023] Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images
- Host: GitHub
- URL: https://github.com/caiyu6666/DDAD-ASR
- Owner: caiyu6666
- License: mit
- Created: 2022-08-09T03:35:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T10:31:10.000Z (over 1 year ago)
- Last Synced: 2024-07-31T20:40:46.067Z (3 months ago)
- Topics: anomaly-detection, deep-learning, pytorch
- Language: Python
- Homepage:
- Size: 6.46 MB
- Stars: 44
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dual-distribution discrepancy with self-supervised refinement for anomaly detection in medical images
Yu Cai, Hao Chen, Xin Yang, Yu Zhou, Kwang-Ting Cheng
Paper
## Visualization on Med-AD
From top to bottom: original image, ![](http://latex.codecogs.com/svg.latex?\mathcal{A}_{rec}), DDAD-![](http://latex.codecogs.com/svg.latex?\mathcal{A}_{intra}), DDAD-![](http://latex.codecogs.com/svg.latex?\mathcal{A}_{inter}), DDAD-![](http://latex.codecogs.com/svg.latex?\mathcal{R}_{dual}).
## Data Preparation
### Option 1
Download the well-processed Med-AD benchmark from: [Google Drive](https://drive.google.com/file/d/1ijdaVBNdkYP4h0ClYFYTq9fN1eHoOSa6/view?usp=sharing) | [OneDrive](https://hkustconnect-my.sharepoint.com/:u:/g/personal/ycaibt_connect_ust_hk/EdCbKrjjRMlKi-1AotcAfkoB_jmbTQ2gnQChltgh7l8xVQ?e=t17t2S).
(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](https://github.com/caiyu6666/DDAD-ASR/tree/main/data).
## 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
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](https://github.com/caiyu6666/DDAD-ASR/releases/tag/downloads).
## Qualitative Analysis
### AS histograms
## Contact
If any questions, feel free to contact: [[email protected]](mailto:[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](https://www.kaggle.com/c/rsna-pneumonia-detection-challenge)
2. [Vin-BigData Chest X-ray Abnormalities Detection dataset (VinDr-CXR)](https://www.kaggle.com/c/vinbigdata-chest-xray-abnormalities-detection)
3. [Brain Tumor MRI dataset](https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset)
4. [Large-scale Attention-based Glaucoma (LAG) dataset](https://github.com/smilell/AG-CNN)## 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}
}
```