Git Product home page Git Product logo

novelty-detection's Introduction

Latent Space Autoregression for Novelty Detection

This repository contains Pytorch code to replicate experiments in the CVPR19 paper "Latent Space Autoregression for Novelty Detection".

Please cite with the following BibTeX:

@inproceedings{abati2019latent,
  title={{Latent Space Autoregression for Novelty Detection}},
  author={Abati, Davide and Porrello, Angelo and Calderara, Simone and Cucchiara, Rita},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision and Pattern Recognition},
  year={2019}
}

sample results

Specifically, performs:

  • one class classification on MNIST.
  • one class classification on CIFAR-10.
  • video anomaly detection on UCSD Ped2.
  • video anomaly detection on ShanghaiTech.

0 - Clone this repo

First things first, clone this repository locally via git.

git clone https://github.com/cvpr19-858/novelty-detection.git
cd novelty-detection

1 - Environment

This code runs on Python 3.6. The easiest way to set up the environment is via pip and the file requirements.txt:

pip install -r requirements.txt

2 - Datasets

MNIST and CIFAR-10 will be downloaded for you by torchvision.

You still need to download UCSD Ped and ShanghaiTech. After download, please unpack them into the data folder as follows

tar -xzvf <path-to-UCSD_Anomaly_Dataset.tar.gz> -C data
tar -xzvf <path-to-shanghaitech.tar.gz> -C data

3 - Model checkpoints

Checkpoints for all trained models are available here.

Please untar them into the checkpoints folder as follows:

tar -xzvf <path-to-tar.gz> -C checkpoints

4 - Run!

Once your setup is complete, running tests is as simple as running test.py.

Usage:

usage: test.py [-h]

positional arguments:
              The name of the dataset to perform tests on.Choose among
              `mnist`, `cifar10`, `ucsd-ped2`, `shanghaitech`

optional arguments:
  -h, --help  show this help message and exit

Example:

python test.py ucsd-ped2

novelty-detection's People

Contributors

angpo avatar cvpr19-858 avatar davidea avatar

Watchers

 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.