Keras: Object Detection using Keras

Created on 29 Dec 2016  路  14Comments  路  Source: keras-team/keras

Can you please advice how to to do Object Detection using Keras?

stale

Most helpful comment

@bstriner
I need to get bounding boxes for different objects from different classes in a single image.

All 14 comments

What problem exactly are you looking at? There seems to be a useful post about object recognition here:

http://machinelearningmastery.com/object-recognition-convolutional-neural-networks-keras-deep-learning-library/

Are you trying to get bounding boxes, multiple labels, or just single labels? What is your training set?

Cheers,
Ben

@bstriner
I need to get bounding boxes for different objects from different classes in a single image.

@Walid-Ahmed you got any resource?

@santoshgsk
I got a dataset of 20,000 images.

@Walid-Ahmed you'll want to start with looking around sites like arxiv to see what some of the latest models are. If you find something specific you want to implement someone can help you.

Some interesting ideas:
https://arxiv.org/pdf/1312.2249v1.pdf
https://pdfs.semanticscholar.org/713f/73ce5c3013d9fb796c21b981dc6629af0bd5.pdf

Predicting multiple boxes normally involves some post-processing to count the boxes from the neural network activations. A relatively simple approach is to just train a CNN to predict pixel or superpixel labels, and draw a box around the pixels. Another simple approach is to train a sliding window at multiple scales. You then select local maxima, or some other subset of windows.

Multiclass multiple boxes can get trickier. In one example, you train a network to not only produce masks, but label left, right, up and down. This helps disambiguate touching objects.

Cheers

The Overfeat paper is certainly interesting in this context (I hope somebody wants to write a summary?)

@Walid-Ahmed Any luck with the bounding box approach?

Take a look at the below. Probably what you are looking for.
https://github.com/yhenon/keras-frcnn

@iamsiva11
I am now using the code from
https://github.com/rykov8/ssd_keras

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

How does one go about handling variable number of objects per image for this problem of object detection?

We have to have a fixed model to train, so I'm stumped

@gauravk97 The region proposal network used in object detection has a fixed number of candidate bounding boxes in which objects can be found so the network structure can still be fixed.

Tensorflow's object detection API is the best resource available online to do object detection. I have a small blog post that explains how to integrate Keras with the object detection API, with this small trick you will be able to convert any classification model trained in Keras to an object detection model using the API.

Can you please advice how to to do single label Object Detection and localization using Keras?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nryant picture nryant  路  3Comments

farizrahman4u picture farizrahman4u  路  3Comments

rantsandruse picture rantsandruse  路  3Comments

harishkrishnav picture harishkrishnav  路  3Comments

amityaffliction picture amityaffliction  路  3Comments