
SoftwareOne case study
BouMatic

Dairy cows can be milked up to two to three times a day. With 300 cows, on average, in dairy farms in the US, the time between milking must always be optimized for the farmers to maximize profits.
Challenges
The challenges in this project revolved around optimizing the ‘teat detection’ phase of milking to enhance speed, accuracy, and adaptability. Implementing Computer Vision and Neural Networks required intricate modeling and pattern recognition to adapt to variations in cows and lighting conditions.
Project summary
The project focused on using Computer Vision and Neural Networks to optimize the dairy milking process, specifically in the area of ‘teat detection.’ This innovation led to faster and more accurate milking.
Business benefits
Automation has shown a significant increase - specifically by 99% - in the efficiency and accuracy of the milking process. Additionally, the enhancements resulted in fewer ‘attachment misses’ and reduced time in the milking booth, translating to potential overall operational cost savings.

- Client
- BouMatic
- Industry
- Agriculture
- Services
- Data and AI Solutions
- Country
- United States
Enhancing the automation of cow milking through computer vision and neural networks
Improving animal welfare and creating exponential growth for a manufacturer of automated milking systemsUtilizing the advancements in Computer Vision and Neural Networks, the dairy milking process is being transformed, offering more streamlined operations.
In the US an average dairy farm accommodates about 300 cows, each milked two to three times daily. To maximize profits, the time between milkings must be strategically managed, a complex task considering the age-old history of the dairy industry, which spans over 6000 years.
With more than 36,000 dairy farms in the US generating a combined revenue of approximately USD 150 billion annually, it’s clear that a dairy farmer’s revenue correlates directly with milk production. Therefore, optimizing the milking frequency is essential, often requiring farmers to work constantly.
Since 1990, Automatic Milking systems have enabled larger farms to scale economically. The average number of dairy cows per farm in the US has grown from 30 before commercial machines were introduced to 300 in 2021, with some mega-farms having thousands of cows. At the same time, milk production per cow has doubled over the past three decades, increasing the need for cows to be milked more than twice a day.
Innovating and enhancing efficiency through Computer Vision
AlexNet – a convolutional neural network (CNN) architecture - marked a groundbreaking moment for computer vision, allowing computers to understand images via machine learning. This new technology opened doors for many sectors, including the dairy industry.
BouMatic, a US manufacturer of dairy equipment, wanted to leverage the technology to boost milk production and, consequently, revenue.
BouMatic engaged Inmeta (a formerly Crayon company), whose Big Data & Advanced Analytics team evaluated the client’s milking system to pinpoint areas for improvement. They discovered the greatest potential in ‘teat detection’ during the second milking stage.
Optimizing this step could result in quicker, more precise, and more robust milking processes. By implementing Computer Vision and Neural Networks, the system could adapt to various cow types and lighting conditions, and achieve greater overall flexibility, along with multi-factor simultaneous detection.
These findings led to a model that excels in:
- Detection speed
- Localization accuracy
- Robustness
- Multi-detection
- Pattern recognition and prediction through training
The model processes 3D images, considering depth, lighting, and coordinates. This automated teat detector learns to discern patterns to make accurate predictions. High-speed image processing allows for effective filming motion.
Applying machine learning for enhanced optimization
The neural network uncovers intricate data, and Computer Vision guides the machine in identifying key visual aspects. Machine learning teaches the computer to recognize patterns and make predictions. Edge Computing was also integrated to facilitate rapid and high-volume data processing near the generation site.

By analyzing teat information and defining key points, the robot knows precisely where to connect, achieving accuracy within 10 pixels. The model offers real-time information at up to 31 frames per second, boasting a 99% object detection accuracy.
This enhancement to the milking robots translates to tens of millions of dollars in value for the client in the coming years. Cows can voluntarily queue up when they feel ready to be milked which makes the process less stressful for them. Nowadays cows produce 2-3 times more milk than they did 30 years ago, so the fact they can go to a milking parlor three times a day relieves them of the stress of carrying so much milk and also has the added benefit of producing richer quality milk.
Additionally, the cows benefit from fewer "attachment misses" thanks to them being attached to the teats from the rear of the cow and reduced time in the milking booth, showcasing an exciting evolution in dairy farming technology.
About BouMatic
BouMatic is a global leader in the design, manufacture, and supply of the highest-quality milking systems and dairy farm equipment. With more than 80 years of experience, global R&D expertise, and intimate knowledge of the needs of local dairy businesses, the company helps dairy farmers be more profitable while safeguarding animal welfare, and creating solutions for tomorrow’s challenges.
More case studies

Connect with our experts
Share a few details about your business challenge, and we’ll get right back to you.
Connect with our experts
Share a few details about your business challenge, and we’ll get right back to you.

