Skip to content

MrGiovanni/SimSID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo provides official code for SimSID, a significant technical improvement over our previous CVPR version (SQUID) in exploring structural consistency for unsupervised anomaly detection.

logo

Anomaly detection in radiography images can be both easier and harder than photographic images. It is easier because radiography images are spatially structured due to consistent imaging protocols. It is harder because anomalies are subtle and require medical expertise to annotate.

Paper

Exploiting Structural Consistency of Chest Anatomy for Unsupervised Anomaly Detection in Radiography Images
Tiange Xiang1, Yixiao Zhang2, Yongyi Lu2, Alan L. Yuille2, Chaoyi Zhang1, Weidong Cai1, and Zongwei Zhou2
1University of Sydney, 2Johns Hopkins University
TPAMI
paper | code

SQUID: Deep Feature In-Painting for Unsupervised Anomaly Detection
Tiange Xiang1, Yixiao Zhang2, Yongyi Lu2, Alan L. Yuille2, Chaoyi Zhang1, Weidong Cai1, and Zongwei Zhou2
1University of Sydney, 2Johns Hopkins University
CVPR, 2023
paper | code

Dependencies

Please clone our environment using the following command:

conda env create -f environment.yml
conda activate simsid

File Structures

  • dataloader/: dataloaders for zhanglab, chexpert, and digitanotamy.
  • models/: models for SimSID, inpainting block, all kinds of memory, basic modules, and discriminator.
  • configs/: configure files for different experiments, based on the base configure class.

Usage

Data

ZhangLab Chest X-ray

Please download the offical training/testing and our validation splits from google drive, and unzip it to anywhere you like.

Stanford ChexPert

Please download the offical training/validation and our testing splits from google drive, and unzip it to anywhere you like.

Configs

Different experiments are controlled by configure files, which are in configs/.

All configure files are inherited from the base configure file: configs/base.py, we suggest you to take a look at this base file first, and change the dataset root path in your machine.

Then, you can inherite the base configure class and change settings as you want.

We provide our default configures for ZhangLab: configs/zhang_dev.py, CheXpert: configs/chexpert_best.py, and COVIDx: configs/covidx_dev.py.

The path to a configure file needs to be passed to the program for training.

Training

We provide a training script main.py. This script can be used to train an unsupervised anomaly detection model on a dataset (ZhangLab, CheXpert or COVIDx) by specifying a model config:

python main.py --config zhang_dev.py --exp experiment_name

All the configs can be found in the configs subfolder.

Test

You can test with our pre-trained SimSID models with eval.py. Weights for our pre-trained SimSID models can be found in the checkpoints subfolder.

python eval.py --exp experiment_name

Contact Us

Yixiao Zhang: yixiao.zhang.2023@gmail.com Zongwei Zhou: giovanni.z.zhou@gmail.com

Citation

If you find this work useful for your research, please consider citing it.

@article{xiang2024exploiting,
  title={Exploiting Structural Consistency of Chest Anatomy for Unsupervised Anomaly Detection in Radiography Images},
  author={Xiang, Tiange and Zhang, Yixiao and Lu, Yongyi and Yuille, Alan and Zhang, Chaoyi and Cai, Weidong and Zhou, Zongwei},
  journal={arXiv preprint arXiv:2403.08689},
  year={2024}
}

@article{xiang2023painting,
  title={In-painting Radiography Images for Unsupervised Anomaly Detection},
  author={Xiang, Tiange and Liu, Yongyi and Yuille, Alan L and Zhang, Chaoyi and Cai, Weidong and Zhou, Zongwei},
  journal={IEEE/CVF Converence on Computer Vision and Pattern Recognition},
  year={2023}
}

Acknowledgements

This work was supported by the Lustgarten Foundation for Pancreatic Cancer Research and the Patrick J. McGovern Foundation Award.

About

[IEEE TPAMI] Anomaly Detection in Chest X-ray

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages