Giter VIP home page Giter VIP logo

osdn's Introduction

OSDN

Keras implementation for the research paper "Towards Open Set Deep Networks" A Bendale, T Boult, CVPR 2016

Original Implementation: https://github.com/abhijitbendale/OSDN

This repo has Keras wrapper for the above research paper. Full code plus ipython notebook is also avaliable.

jupyter notebook Softmax.ipynb

or

open notebook with nbviewer by clicking on this link

https://nbviewer.jupyter.org/github/aadeshnpn/OSDN/blob/master/Softmax.ipynb

If you have any question feel free to create an issue.

How to run the existing code

  • Step 1: Train a CNN model for the dataset you choice
  • Step 2: Load the trained model
  • Step 3: Load the training data you trained the DNN model
  • Step 4: Create a mean activation vector (MAV) and perform weibull fit model
  • Step 5: Pass the sample to compute openmax and evaluate the output from openmax, original label, and softmax
  • Step 6: Test the trained openmax to images from different distribution

Refer to the main.py for detail implementation

osdn's People

Contributors

aadeshnpn avatar wzaielamri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

osdn's Issues

how to use pytorch to achieve the repo?

Thanks for your really good work! Is it possible to transfer form keras to pytorch? Pytorch was actually very popular, but Keras wasn't. Many advanced target detection systems are now pyTorch's domain.

Help please! "libmr.so is not found"

Hi, I'm interested in this work very much and tried to reproduce it. But unfortunately, I met this problem. How can I fix it?
image
ps: I followed your steps carefully.

How to set the threshold for openmax?

Hi, althogh I have run this project successfully, I'm still a little bit confused about the openmax threshold settings. Why you choose 10 as the openmax threshold? Could you please take minutes to explain about it?
Looking forward to your reply. Thanks!
image

steps to use.

Hi
Thanks for sharing your work , i want to use this because i think this might be worth trying, but i'm not sure how to go about this, in your jupyter notebook ,you use an already trained keras model, does it have to a keras model ? or can it be a tensorflow pb file?

Could you may be give a small description on how to use this?
I want to apply this is on a 4 class classification problem?Do i first train the model in keras?

Suggestions would be helpful.
Thanks in advance.

About the effect of the code

Hello, I tested your code on the MNIST data set and found that the effect is not so good. Can you achieve better open set recognition?

MNIST CNN keras model

Hi, thank you for sharing your results!

I tried to replicate your example by training the model again, even if the model structure appears to be the same as the one I get from MNIST_CNN.h5 and test-loss=0.069 and test-accuracy=0.99. I get different results when I test it on MNIST dataset. It would be nice if you could share the code of the CNN keras model you used to generate MNIST_CNN.h5.

I hope you will help!

Thank you!

distance

why the euclide-cosine distance is calculated as:
euclidean(mean_feature, feat)/200. + cosine(mean_feature, feat) ?
How did you decide on the factor 1/200?

Question about data processing

Dear Author,

I found that in openmax.py, the compute_activation function:
img = np.array( Image.fromarray( (np.squeeze(img)).astype(np.uint8)).resize((28, 28)))

The input image of this function is in float32 since it has divided 255. While this line would cast the image into uint8 and make the output of the model changed (since the casted image is basically all 0s) (including the score and fc8 output). Should there be another way to process the input image?

Cheers!

Getting error in get_activations()

Getting this error: ValueError: Input tensors to a Functional must come from tf.keras.Input. Received: 0 (missing previous layer metadata) inside the get_activations() function

confusion problems

Dear author! After reading the original paper and your work, I have a question: does open set recognition need to change the penultimate layer of deep learning network in the training phase?Or do you use the Softmax layer during the training phase and only change the penultimate layer of the deep learning network during the testing phase?
Looking forward to your kind reply!

Re-calibrate scores

Hello,

Please, the "channel_scores" is the feature vector of the "fc8" layer for a specific channel, then why did you loop over the "categoryid" to compute modified_fc8_score = channel_scores[categoryid] * ( 1 - wscore*ranked_alpha[categoryid] ) ?
Yet, the Len(channel_scores) is not equal to NCHANNELS.

Thank you.

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.