π‘ This is the official implementation of the paper "Weakly Supervised Anomaly Detection for Chest X-Ray Image".
WSCXR is a weakly supervised anomaly detection framework for Chest X-Ray (CXR) image. WSCXR can effectively leverage medical cues from few-shot real anomalous images for anomaly detection, thereby improving the modelβs anomaly detection performance. Additionally, WSCXR employs a linear mixing strategy to augment the anomaly features, facilitating the training of anomaly detector with few-shot anomaly images.
To run experiments, first clone the repository and install requirements.txt
.
$ git clone https://github.com/IamCuriosity/WSCXR.git
$ cd WSCXR
$ pip install -r requirements.txt
Download the following datasets:
- ZhangLab [Baidu Cloud] or [Google Drive]
- CheXpert [Baidu Cloud] or [Google Drive]
Unzip them to the data
. Please refer to data/README.
To train the WSCXR on the ZhangLab dataset:
$ python train.py --dataset_name zhanglab
To test the WSCXR on the ZhangLab dataset:
$ python test.py --dataset_name zhanglab
If this work is helpful to you, please cite it as:
@misc{ni2023weakly,
title={Weakly Supervised Anomaly Detection for Chest X-Ray Image},
author={Haoqi Ni and Ximiao Zhang and Min Xu and Ning Lang and Xiuzhuang Zhou},
year={2023},
eprint={2311.09642},
archivePrefix={arXiv},
primaryClass={eess.IV}
}