Search code examples
tensorflowobject-detectionobject-detection-api

Object detection and object counting


I am trying to figure out how to count objects in an image. I need to count the number of eggs in bird nests and bird houses.

I want to use the object detection api in tensorflow and then just retrain the final layer to recognize eggs. The thing is I already have a lot of tagged images, but only with the information about the total egg count, not where the eggs are located.

Is it possible to somehow retrain the network just by providing the images with the corresponding egg count? Or do I need to manually tag the location of individual eggs?

I was thinking about solving it as a classification problem, in which the different egg counts would be different categories (0, 1, 2, ... - there is never more than 8 eggs in total). What do you think?


Solution

  • In the end I chose to use the object detection api in Tensorflow, so I had to manually tag the location of individual eggs in a lot of images to retrain the neural network. The results are surprisingly good.

    Here is my solution if anyone runs into the same problem: https://github.com/havluj/EggDetector.