The system analyses a pig’s body shape and estimates its weight within several seconds. Photos: Lemberg Solutions
The system analyses a pig’s body shape and estimates its weight within several seconds. Photos: Lemberg Solutions

How a computer vision system can completely replace manual pig weighing

Solutions
27-08-2024 | Updated on 16-08 | |
The system analyses a pig’s body shape and estimates its weight within several seconds. Photos: Lemberg Solutions
The system analyses a pig’s body shape and estimates its weight within several seconds. Photos: Lemberg Solutions

Most farms still use the old-school method – manually weighing pigs with stationary scales. This process requires several farm workers to transport each pig to the scale and hold it still to get the numbers. In an industry challenged by labour shortages, this process is not only physically draining and time-consuming, but also stressful for both workers and animals.

“When you stress the pigs, they lose a little bit of growth. So in one way, you decrease the parameters that are important for the profitability of the farm,” explains Sylvain Longchamps, head of Animals Development of Barkom Ltd, a prominent agricultural company specialised in growing pigs and cattle.

However, the rapid evolution of agritech solutions provides a promising path to making the weighing process more stress-free, automated, and accurate than ever before. One such breakthrough technology is computer vision.

Benefits computer vision brings to the weighing process

Computer vision technology makes the weighing process completely contactless. Farm workers no longer have to carry heavy animals to the scales; all they need is a camera and smart algorithms. As the process is completely non-invasive, the animals are not stressed by the weighing, which also significantly enhances their well-being and even the quality of the meat.

“The computer vision technology can help determine whether the animal’s weight is high or too low,” said Lou Dutko, chief technology officer of Lemberg Solutions, who shares how the technology can ensure better control over the livestock’s growth.

This level of visibility supports farmers in adjusting nutrition or spotting health issues. Also, for some markets, animals should be in a specific weight range to be sent to the slaughterhouse, so that the farm can gain a bigger profit. Having access to real-time weight data simplifies the selection of pigs that meet market requirements, allowing farmers to plan shipments to slaughterhouses more efficiently.

With a portable computer vision device, tasks that previously required multiple people can now be done by one farmer, cutting the weighing time 24 times. The technology allows farm workers to weigh animals in just seconds, significantly freeing time and easing the workload – an especially valuable benefit at a time when the industry is struggling with a labour shortage.

Also, the solution makes on-farm veterinary care easier. Equipped with the device, veterinarians can approach a pig alone without any assistance, measuring the specific pig’s weight to calculate the needed amount of medication more quickly.

How does computer vision-based pig weighing work?

Here we take a closer look at how a computer vision-based portable device can work in real farm conditions. At the core of the system is a powerful camera, which captures 3D images of animals in one click, ensuring they are high-quality, regardless of poor lighting or animal movement. Since the solution is portable, farmers do not need to move animals to a specific place – they can carry device with them all the time and take a picture of the pig from anywhere on the farm.

The captured images are then sent from the device to a server to be analysed by a custom weight recognition algorithm. Using a combination of non-iterative neural networks with a custom image recognition solution, the system analyses a pig’s body shape and estimates its weight within several seconds. After analysis, the system returns the number to the device with only a 1-2% margin of error.

At the core of the system is a powerful camera, which captures 3D images of animals in one click, ensuring they are high-quality, regardless of poor lighting or animal movement.
At the core of the system is a powerful camera, which captures 3D images of animals in one click, ensuring they are high-quality, regardless of poor lighting or animal movement.

The accuracy of such estimation relies on the quality and volume of the database used to train the algorithms. For data collection, a stationary hardware device was created and placed in a specific spot in the pen above the waterer, which had been put on the scale. When the pigs went to drink the water, the camera took a picture of the animal’s body and the number on the scale, thus creating a base of 17TB of real data used to provide the 98% accuracy of the solution.

“We observed how animals behave and adapted the equipment to find the moment for data measurement and collection that would be the best and most accurate,” said Lou Dutko, commenting on the data collection process setup.

What makes this weighing solution practical is its ability to be integrated into any existing farm infrastructure without disrupting any established processes.

“Weighing animals is not the most interesting task for farm workers to do, and it is very difficult. Every time you save them time on a task like that, your best people can focus on more crucial tasks, like overseeing the well-being of animals. This approach can improve the efficiency of the farm in general,” concludes Sylvain Longchamps.

Solutions
Lemberg Solutions

Lemberg Solutions is a trusted agritech software and hardware development company with over 15 years of experience, helping to streamline farms' daily workflows with IoT, AI, embedded systems, and cloud integration. Lemberg Solutions provides a full spectrum of services, including solution discovery, end-to-end development, and post-launch maintenance. More about Lemberg Solutions   

Solutions
Lemberg Solutions

Lemberg Solutions is a trusted agritech software and hardware development company with over 15 years of experience, helping to streamline farms' daily workflows with IoT, AI, embedded systems, and cloud integration. Lemberg Solutions provides a full spectrum of services, including solution discovery, end-to-end development, and post-launch maintenance. More about Lemberg Solutions