Git Product home page Git Product logo

crosr's Introduction

CROSR

PyTorch implementation for "Classification-Reconstruction Learning for Open-Set Recognition" CVPR 2019. It is important to note that this repository borrows heavily from the repo - https://github.com/abhijitbendale/OSDN as far as fitting weibull distribution and computing open max scores goes. It also borrows from the original repo for the paper - https://nae-lab.org/~rei/research/crosr (which is implemented in chainer). I think thsi repository is much cleaner and flexible to accomodate newer datasets and model architectures. Some part of code works on python 3 and 2 whereas the other portion only works on python 2.7. Please follow the following steps to successfully run the code.

Usage

1) Compiling LibMR

Compile LibMR and python interface to LibMR using following commands. For pythong interfaces to work, you would require Cython to be pre-installed on your machine

cd libMR/
chmod +x compile.sh
./compile.sh

2) Train the DHRNet

python train_net.py

3) Compute the activation vectors for images

python get_model_features.py

4) Compute the MAV (mean activation vector) for each class category

python MAV_Compute.py

5) Compute the distance scores for activation features of training set

python compute_distances.py

6) Fit Weibull distribution for each category and calculate openmax scores (Note that this code needs to be run in Python 2.7.)

python compute_openmax.py

Results

The AUROC score for CIFAR-10 with 6/4 split is 71.23.

crosr's People

Contributors

saketd403 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.