raghav
raghav

Reputation: 121

Can inception model be used for object counting in an image?

I have already gone through the image classification part in Inception model, but I require to count the objects in the image.

Considering the flowers data-set, one image can have multiple instances of a flower, so how can I get that count?

Upvotes: 12

Views: 1309

Answers (3)

SACn
SACn

Reputation: 1924

Any classification model like inception model will identify the object like flower in your case. However, when multiple items are there classifications won't work (get confused in simple language).

Thus:

You've to segment main image into child images with one object per image and use classification on each segment. This is termed as image segmentation in image processing.

Upvotes: 0

Thomas Pinetz
Thomas Pinetz

Reputation: 7148

indraforyou answered the question in how to solve the problem you are having. I want to add something for the inception model specifically. In https://arxiv.org/pdf/1312.6229.pdf they propose a regressor network trained on the output of a model trained on the imagenet dataset like the inception model. This regressor model then is used to propose object boundaries for you to use for counting. The advantage of this approach is that you do not have to annotate any training examples and you can just use the ImageNet dataset for training.

If you do not want to train anything I would propose a heuristic in finding object boundaries. Literature in image segmentation https://en.wikipedia.org/wiki/Image_segmentation should help you find a suitable heuristic. I do think using a heuristic will decrease your accuracy though.

Last but not least this is an open problem in computer vision research. You should not expect to get 100% accuracy or even 95% accuracy on counting. Many very smart people have tried this and reported mixed results. Still some very cool things can be accomplished.

Upvotes: 1

indraforyou
indraforyou

Reputation: 9099

What you describe is known to research community as Instance-Level Segmentation.

In last year itself there have been a significant spike in papers addressing this problem.

Here are some of the papers:

As you see in these papers simple object classification network won't solve the problem.

If you search github you will find a few repositories with basic frameworks, you can build on top of them.

Upvotes: 5

Related Questions