Inspiration

Automatizing hard and tedious processes is a challenging task, and nowadays everything is possible with AI and Data Science technologies. We wanted to use state-of-the-art technologies in the field AI to overcome the problem of automatizing object detection and counting.

What it does

We developed a web application in React that allows users to upload photos of yellow sticky insect traps in order to automatically count the number of insects that appear in the image. The tool displays the processed image showing the retections and counting performed (distinguishing between small and big insects).

How we built it

We used a deep learning object recognition model pre-trained with thousands of images, called YOLOR (a recent and improved version of the YOLO model). We tweaked the model to detect insects given the slight similarity that they have with birds. The web application has been developed with React for the front-end and Django for the backend.

Challenges we ran into

We wanted to improve the detections and we found out the model precision strongly depends on the image resolution used for inference. We used super-resolution tools to upsample the photos to have greater resolution and it turned out to be a significant improvement for the detection, concluding that it is important to provide HQ images to the model if we want to get good results. Also, giving an accuracy metric for our problem is quite hard since we don't exactly know the number of insects in each photo (it's also hard to determine for experts), so we had to show qualitative results of the detections to evaluate the model performance.

Accomplishments that we're proud of

The model gives a really good estimation in most of the provided images. We managed to implement a complete deep learning-based solution with a user interface that is able to predict the number of insects for any given image.

What we learned

We are astonished by the versatility of Deep Learning models and the potential they have to adapt to different tasks.

What's next for Insect Counting with Deep Learning

Re-train the network with annotated data, to improve the model detection.

Share this project:

Updates