Embedded vision prototype for livestock weight monitoring

An automated system for pig weight monitoring based on image recognition with the help of computer vision and non-iterative neural networks

 

Full case study in PDF
Download
About the client

Barkom Ltd. is a Ukrainian agricultural company that specializes in growing pigs and cattle and selling self-produced food products.

The challenge

Weight is an important indicator of a pig’s health, which makes regular weight monitoring vital to pig farming. But manual weighing is labor-intensive, especially on large farms; it takes multiple people and many hours to weigh animals one by one — not to mention doing it daily. 

This issue prompted Barkom to find a solution for automated, remote, and daily pig weight monitoring.

Delivered value

Our team of data scientists and embedded engineers have designed and built a computer vision prototype for automated weight monitoring in pig farms. 

Based on a complex of non-iterative neural networks and an innovative image recognition algorithm, our prototype allows visual estimation of an animal's weight. To train the algorithm, we’ve also designed a custom hardware system for training data collection and preprocessing. 

The process

This prototype is a first-of-a-kind system, which means that we didn’t have many market references and acquired most of the necessary knowledge through trial and error.

The main challenge we came against was a complete absence of training data. That’s why our first step was to build a hardware data collection system to place on the farm. The system included regular scales with two stereo cameras attached above. 

Our vision was that when a pig stepped on the scales, the cameras above it would take an image of the pig’s back. Then, the weight from the scales would be automatically assigned to the image, and we would have an image-weight record in the database. With enough records of this kind, we would be able to build a weight recognition algorithm.

While working on the hardware, we discovered more challenges, like pigs sleeping on the scales, multiple pigs stepping on the scales at the same time, feces that cover the scales reflecting light into the cameras and distorting images, etc. All these challenges made the hardware building process iterative and forced us to change its design multiple times. It took us several months to get the first good image. 

Once the hardware was ready, our data scientists started working on the weight recognition algorithm. We tried several approaches, including neural networks and mathematical modeling, and in the end, settled on a complex of non-iterative neural networks combined with a custom image recognition algorithm. This approach provides a near-98% recognition accuracy on manually cleaned and pre-processed data. 

Our next steps are to automate data cleaning and processing, which would allow us to start real-time training of the algorithm on raw data.

Services
Computer vision
Data collection and processing
Image recognition
Mechanical design
Electrical design
Prototype assembly
Technologies
Python
C++
OpenCV
Mask R-CNN
Mathematical modeling
TensorFlow
Industry
AgriTech
Pig weight monitor
Pig weight monitor
Pig weight monitor

How it works

Barkom Pigs scheme