/WSCXR

Primary LanguagePythonMIT LicenseMIT

WSCXR

πŸ’‘ 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.

πŸ”§ Installation

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

Data preparation

Download the following datasets:

Unzip them to the data. Please refer to data/README.

πŸš€ Experiments

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  

πŸ”— Citation

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