Skip to content

hibiat/wsad

Repository files navigation

Weakly-Supervised Anomaly Detection for CT Scans

About The Project

This project presents a novel weakly supervised anomaly detection (WSAD) algorithm for CT scans, which reduces the annotation workload while providing better performance than conventional methods.

The proposed WSAD algorithm is trained based on scan-wise normal and anomalous annotations, unlike slice-level annotations required in conventional supervised learning. The methodology is motivated by video anomaly detection tasks.

Getting Started

Requirements

  • Python 3.9
  • PyTorch 1.13.0
  • Cuda 11.7
  • Pytorch Image Models (timm)
  • Pydicom
  • OpenCV
  • pandas
  • scikit-learn

Dataset

Download the following dataasets. Both of them are publicly availablle.

  • RSNA brain hemorrhage dataset: Brain CT dataset collected from patients with intracranial hemorrhages. The data named "stage_2_train" are only required as they contain both training and testing samples.
  • COVID-CTset: Lung CT dataset collected from patients with COVID-19.

Pre-processing

Brain CT dataset

Place downloaded data in a local directory, then run the following six scripts one by one for pre-processing downloaded data. Make sure to change /path_to/rsna-intracranial-hemorrhage-detection in each script depenging on where downloaded images are saved.

Lung CT dataset

Place downloaded data in a local directory, then run the following five scripts one by one for pre-processing downloaded data. Make sure to change /path_to/COVID-CTset in each script depenging on where downloaded images are saved.

Training a model

  1. Set parameters at parameters.py

  2. Run run_train.py

Testing a model

  1. Run run_test.py

  2. A performance report will be generated.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages