Skip to content

AML-project-AnomalySegmentation/AnomalySegmentation_CourseProjectBaseCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time-Anomaly-Segmentation [Course Project]

In this repository you will find the code used for the anomaly segmentation project (Project 4) for the Advanced Machine Learning course, submitted for the 27/02/2024 exam date. Group Members:

  • s308722 - Thomas Baracco
  • s310383 - Riccardo Renda
  • s314771 - Andrea Sillano

Packages

For instructions, please refer to the README in each folder:

  • train contains tools for training the network for semantic segmentation.
  • eval contains tools for evaluating/visualizing the network's output and performing anomaly segmentation.
  • imagenet Contains script and model for pretraining ERFNet's encoder in Imagenet.
  • trained_models Contains the trained models used in the papers.

Requirements:

  • The Cityscapes dataset: Download the "leftImg8bit" for the RGB images and the "gtFine" for the labels. Please note that for training you should use the "_labelTrainIds" and not the "_labelIds", you can download the cityscapes scripts and use the conversor to generate trainIds from labelIds
  • Python 3.6: If you don't have Python3.6 in your system, I recommend installing it with Anaconda
  • PyTorch: Make sure to install the Pytorch version for Python 3.6 with CUDA support (code only tested for CUDA 8.0).
  • Additional Python packages: numpy, matplotlib, Pillow, torchvision and visdom (optional for --visualize flag)
  • For testing the anomaly segmentation model: Road Anomaly, Road Obstacle, and Fishyscapes dataset. All testing images are provided here Link.

Anomaly Inference:

  • The repo provides a pre-trained ERFNet on the cityscapes dataset that can be used to perform anomaly segmentation on test anomaly datasets.
  • Anomaly Inference Command:python evalAnomaly.py --input '/home/shyam/ViT-Adapter/segmentation/unk-dataset/RoadAnomaly21/images/*.png. Change the dataset path '/home/shyam/ViT-Adapter/segmentation/unk-dataset/RoadAnomaly21/images/*.pngaccordingly.

About

Group Project AML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.4%
  • Jupyter Notebook 7.6%