rdcolema / keras-image-classification

Using Kaggle cats vs dogs dataset
98 stars 61 forks source link

Environment Specifications to run this code #1

Closed Pranjaljn closed 7 years ago

Pranjaljn commented 7 years ago

Hey, Could you please tell the environment specifications you used to run this code, because when I'm trying to run this with keras 2.0 and updated theano libraries, I am getting errors.

rdcolema commented 7 years ago

Hey Pranjal,

Can you let me know which errors you're getting? This repo is a bit old so I don't remember the exact Keras and Theano versions I was running at the time, but I might be able to help debug the errors you're seeing.

Pranjaljn commented 7 years ago

Hello Robert,

First of all, thanks a lot for your valuable time. I was actually using the old code with Keras2.0 API, which is why I was getting error messages. I updated my code with the implementation of few more arguments, It's working fine now. A big thanks to you and all others helping and guiding learners.

Apart from that, I am still to figure out how to predict classes with updated keras API, all I am able to do now is predict probabilities using predict_generator/predict function.

Also, I am working on logo detection problem, where I have to detect whether a particular brand logo exists in an image or not. I have trained my model with extended Flickr dataset, but it is giving very less probabilities since logos appear in very small parts of image, I still need to perform Image segmentation for object proposal. I am trying to find out a code which I can integrate with my present code for logo detection. It will be extremely helpful if you could suggest me something or guide me through this. Any kind of help is valuable to me. Thanks in advance.

Warm Regards,

Pranjal Jain 3rd year Undergraduate Student Chemical Engineering Department IIT Kharagpur Contact - +918145875464

On Sat, May 20, 2017 at 6:10 PM, Robert Coleman notifications@github.com wrote:

Closed #1 https://github.com/rdcolema/keras-image-classification/issues/1.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rdcolema/keras-image-classification/issues/1#event-1090526181, or mute the thread https://github.com/notifications/unsubscribe-auth/AURJMo0C2pydsn0asERbMEP0w9BAM-Xoks5r7t8igaJpZM4NdZ1o .

rdcolema commented 7 years ago

Hey Pranjal,

Glad you got it working! Regarding the question about predicting classes, in most cases you should be able to use a simple argmax function on the prediction arrays to get the index of the highest class probability.

For example, if your classes are ['cat', 'dog'] and your predicted probabilities are [0.2, 0.8] then taking the argmax of the prediction array would give you the index corresponding to 'dog'.

As far as logo detection I would look into U-nets, rCNNs, or fully convolutional networks as a starting point -- I'm less versed in segmentation / object detection, but I believe those are among the more popular methods for doing that sort of thing currently.

-RC

Pranjaljn commented 7 years ago

Hello Robert,

Big thanks for helping out. I will use argmax in my model and study these models you suggested for logo detection.

Thanks again!

Pranjal Jain 3rd year Undergraduate Student Chemical Engineering Department IIT Kharagpur Contact - +918145875464

On Mon, May 22, 2017 at 6:16 PM, Robert Coleman notifications@github.com wrote:

Hey Pranjal,

Glad you got it working! Regarding the question about predicting classes, in most cases you should be able to use a simple argmax function on the prediction arrays to get the index of the highest class probability.

For example, if your classes are ['cat', 'dog'] and your predicted probabilities are [0.2, 0.8] then taking the argmax of the prediction array would give you the index corresponding to 'dog'.

As far as logo detection I would look into U-nets, rCNNs, or fully convolutional networks as a starting point -- I'm less versed in segmentation / object detection, but I believe those are among the more popular methods for doing that sort of thing currently.

-RC

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rdcolema/keras-image-classification/issues/1#issuecomment-303089744, or mute the thread https://github.com/notifications/unsubscribe-auth/AURJMn-DVExnyhG-xqoTb3or-wU2IUkpks5r8YOsgaJpZM4NdZ1o .