Skip to content

FeliMe/feature-autoencoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unsupervised Anomaly Localization with Structural Feature Autoencoders

This repository contains the code to reproduce the experiments from the paper “Unsupervised Anomaly Localization with Structural Feature Autoencoders”

In this work, we propose to combine working in a multi-channel feature space with Structural Similarity loss to significantly improve the localization performance of anomalies that are not necessarily hyperintense.

Overview of our pipeline (Figure 2 from the paper)

Usage

Download this repository by running

git clone https://github.com/FeliMe/feature-autoencoder

in your terminal.

Environment

Create and activate the Anaconda environment:

conda env create -f environment.yml
conda activate anomaly_detection

Additionally, you need to install the repository as a package:

python3 -m pip install --editable .

To be able to use Weights & Biases for logging, set the environment variables $WANDBNAME and $WANDBPROJECT.

Data

We use the Cambridge Centre for Ageing and Neuroscience (Cam-CAN) dataset for training (https://camcan-archive.mrc-cbu.cam.ac.uk/dataaccess/index.php) and the Multimodal Brain Tumor Image Segmentation Benchmark (BraTS) for evaluation (ipp.cbica.upenn.edu 2020 version).

You can preprocess the data by running

python3 fae/data/prepare_data.py --dataset CamCAN --weighting t1
python3 fae/data/prepare_data.py --dataset BraTS --weighting t1

Run Experiments

To generate the results from Section 4 (Table 1, MOOD Dataset), run:

bash fae/run_mood.sh

To generate the results from Section 4 (Figure 3, Comparison with the Baselines), run:

bash fae/run_comparison.sh

Results from running fae/run_comparison.sh (Figure 3 from the paper)

About

Anomaly localization using autoencoder models in the feature space of a ResNet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published