Coder Social home page Coder Social logo

ahmedgh970 / autoencoders_adversarial_training_uad Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 62 KB

Adversarially Training of Autoencoders for Unsupervised Anomaly Segmentation

License: GNU General Public License v3.0

Jupyter Notebook 54.05% Python 45.95%
deep-neural-networks autoencoders variational-autoencoder convolutional-autoencoder anomaly-segmentation unsupervised-learning reconstruction mri-brain-segmentation flair pgd-adversarial-attacks

autoencoders_adversarial_training_uad's Introduction

Adversarially Training of Autoencoders for Unsupervised Anomaly Segmentation

This repo contains a method to adversarially train Autoencoders (AEs) (Dense AE and Variational AE) for unsupervised anomaly segmentation task on brain MR Images.

Tags

Adversarial Training, Autoencoders, Anomaly Segmentation, Unsupervised, Brain MR Images, TensorFlow, Keras

Requirements

  • Python >= 3.6

All packages used in this repository are listed in requirements.txt. To install those, run:

pip3 install -r requirements.txt

Folder Structure

Autoencoders_Adversarial_Training_UAD/
│
├── Autoencoders_Adversarial_Training_UAD.ipynb - Jupyter notebook to work on Google Colab
│
├── data/  - Data folder
│   ├── data_descriptions.txt
│   └── ...
│
├── models/  - Models defining and training
│   └── Autoencoders/
│       └── DCAE.py
│   └── Latent Variable models/
│       └── VAE.py
│
├── saved/  - Saving folder
│   └── ...
│
└── scripts/  - Utility scripts for evaluation and adversarial crafting
    ├── adversarial_crafting.py
    ├── eval_brats.py
    ├── eval_mslub.py
    ├── ...
    └── utils.py

Usage

CLI Usage

Every model can be trained and evaluated individually using the scripts which are provided in the models/* and scripts/* folders.

Google Colab Usage

Training can be started by importing Autoencoders_Adversarial_Training_UAD.ipynb in Google Colab. This github repository is linked and can directly loaded into the notebook. However, the datasets have to be stored so that Google Colab can access them. Either uploading by a zip-file or uploading it to Google Drive and mounting the drive.

Adversarial Robustness Toolbox Installation

The most recent version of ART can be downloaded or cloned from this repository:

git clone https://github.com/Trusted-AI/adversarial-robustness-toolbox

Install ART with the following command from the project folder adversarial-robustness-toolbox: Using pip:

pip install .

Disclaimer

Please do not hesitate to open an issue to inform of any problem you may find within this repository.

Reference

For more details about the unsupervised anomaly segmentation method, you can find our published paper on MIDL 2022 Conference Transformers for Unsupervised Anomaly Segmentation in Brain MR Images.

@article{ahghorbe2022,
  title = {Transformer based Models for Unsupervised Anomaly Segmentation in Brain MR Images},
  author = {Ghorbel, Ahmed and Aldahdooh, Ahmed and Hamidouche, Wassim and Albarqouni, Shadi},
  booktitle={Medical Imaging with Deep Learning},
  year = {2022}
}

For more details about the adversarial training procedure, you can read the paper on ARAE: Adversarially robust training of autoencoders improves novelty detection.

@article{salehi2021arae,
  title={Arae: Adversarially robust training of autoencoders improves novelty detection},
  author={Salehi, Mohammadreza and Arya, Atrin and Pajoum, Barbod and Otoofi, Mohammad and Shaeiri, Amirreza and Rohban, Mohammad Hossein and Rabiee, Hamid R},
  journal={Neural Networks},
  volume={144},
  pages={726--736},
  year={2021},
  publisher={Elsevier}
}

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for more details

autoencoders_adversarial_training_uad's People

Contributors

ahmedgh970 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.