Skip to content

This is the code repository of my master's thesis titled "Adversarially Learned Anomaly Detection using Generative Adversarial Networks"

License

Notifications You must be signed in to change notification settings

yigitozgumus/Polimi_Thesis

Repository files navigation

Politecnico di Milano - Thesis Repository

This is the code repository of my master's thesis titled "Adversarially Learned Anomaly Detection using Generative Adversarial Networks"

Project Structure

The project and the hierarchy of the files are structured using this Github Project.

Instructions

  • If you don't have the data folder, in the first run model will download and create the dataset.
  • All the experiment configurations and model parameters can be changed from the related config files.
  • To create the same environment used in the project:
conda create --name myenv -f environment.yml
  • To run the model:
python3 run.py -c ./configs/<CONFIG_FILE> -e <EXPERIMENT_NAME> --train
  • To perform tests with the model from a specific experiment
python3 run.py -c ./configs/<CONFIG_FILE> -e <EXPERIMENT_NAME> --test
  • Using the save_generated_images function in the base_train.py you can create gifs from the GAN generations. You should get the generated image with an inference mode and use the function to save to generated folder (or you can rename that folder). Then use the create_gif.py in the scripts folder like this:
python3 create_gif.py -e <EXPERIMENT_NAME> -n <GIF_NAME> -r <TOTAL_IMG>

If you create only 5x5 or 6x6 pictures, use the total number of images for that case

Model Overview

Generation samples of Generator Network

Anomaly detection examples from the dataset

Releases

No releases published

Packages

No packages published