An idea behind the project
Monitoring shrimp farms is crucial to deliver shrimps of satisfactory quality to customers, and to manage sales and contracting more effectively. Some of the indicators include shrimps’ growth rates, population size, biomass level, and health condition. However, current monitoring depends on manual sampling, which is susceptible to inaccurate measurements, stress brought on shrimps, and their physical damage.
Therefore, our goal was to develop a system to automatically estimate the number of shrimps without a need to remove them from their environment. The Proof of Concept is based on the Computer Vision deep learning models that are trained to predict the number of shrimps on an image obtained from an industrial shrimp farm setting.
In a nutshell
- Data labeling and exploratory data analysis
- Training, selection, and validation of object detector models
- Applying the density maps approach to estimate the number of shrimps
- Implementation of custom neural network layers from scratch to boost models’ performance
- Additional evaluation of out-of-distribution, independent test dataset
- Online visualization of models’ inference via the Streamlit app
More about the object counting system
Object counting on data gathered during long periodical intervals is a perfect task to automate using Computer Vision methods. Our system alleviates tedious manual shrimp counting, allowing for more accurate automated count prediction. In our Proof of Concept, we focused on algorithmic and Machine Learning aspects. We trained and tested three deep learning model types, namely: two-stage detector model (Faster R-CNN), one-stage detector model (YOLOv5), and Density Maps autoencoder models (based on U2-Net).
We put special emphasis on the quality of the labeling process and gathering a well-diversified dataset from the client’s shrimp farm. It contained images under different conditions, such as shrimp density, lightning, shrimp color and camera distance from farming tanks. We discovered that bounding-box detectors performed better than the density-based approach, with YOLOv5 and Faster-RCNN achieving a satisfactory level of relative miscount error (around 6%).
Additionally, we found out that the YOLOv5 model generalizes best to the out-of-distribution samples. Images with high density and object overlaps, where the count could exceed 200 objects per image, were particularly challenging. To mitigate this obstacle, we trained models with more aggressive augmentation techniques. The approach led to satisfactory results even with the problematic samples.
Faster R-CNN detector model
The result of object counting
Our solution counts shrimps at a satisfactory level and allows for a more accurate estimation of biomass production. These trained models will scale well into new environments and can be applied to different farm locations. Our work encouraged the client to take further steps and move from the initial proof of concept to a commercializable application.
Moreover, our concrete results in the shrimp counting domain open new promising research paths for further production process adjustments.
The project was financed by BMEL, the Ministry of Food Policy and Agriculture in Germany.