# Smart Dairy Farming: A Mobile Application for Milk Yield Classification Tasks

**Authors:** Allan Hall-Solorio, Graciela Ramirez-Alonso, Alfonso Juventino Chay-Canul, Héctor A. Lee-Rangel, Einar Vargas-Bello-Pérez, David R. Lopez-Flores

PMC · DOI: 10.3390/ani15142146 · Animals : an Open Access Journal from MDPI · 2025-07-21

## TL;DR

This paper introduces a mobile app using a deep learning model to classify dairy cows based on milk yield by analyzing udder images, aiming to improve decision-making in dairy farming.

## Contribution

A lightweight image-based deep learning model for milk yield classification in dairy cows, deployed as a mobile application for field use.

## Key findings

- The model achieved precision, recall, and mAP@50 of 0.408 ± 0.044, 0.739 ± 0.095, and 0.492 ± 0.031, respectively, across all milk yield classes.
- Misclassifications mainly occurred near class boundaries, emphasizing the need for consistent image acquisition conditions.
- The model was successfully deployed in a mobile application for use by non-specialist users in dairy farming.

## Abstract

This study analyzes the use of a lightweight image-based deep learning model to classify dairy cows into low-, medium-, and high-milk-yield categories by automatically detecting the udder region of the cow. Qualitative analysis revealed that misclassifications occur primarily near class boundaries, highlighting the importance of consistent image acquisition conditions. These findings demonstrate the practical feasibility of applying vision-based models to support decision-making in dairy production systems, particularly in settings where traditional data collection methods are unavailable or impractical.

This study analyzes the use of a lightweight image-based deep learning model to classify dairy cows into low-, medium-, and high-milk-yield categories by automatically detecting the udder region of the cow. The implemented model was based on the YOLOv11 architecture, which enables efficient object detection and classification with real-time performance. The model is trained on a public dataset of cow images labeled with 305-day milk yield records. Thresholds were established to define the three yield classes, and a balanced subset of labeled images was selected for training, validation, and testing purposes. To assess the robustness and consistency of the proposed approach, the model was trained 30 times following the same experimental protocol. The system achieves precision, recall, and mean Average Precision (mAP@50) of 0.408 ± 0.044, 0.739 ± 0.095, and 0.492 ± 0.031, respectively, across all classes. The highest precision (0.445 ± 0.055), recall (0.766 ± 0.107), and mAP@50 (0.558 ± 0.036) were observed in the low-yield class. Qualitative analysis revealed that misclassifications mainly occurred near class boundaries, emphasizing the importance of consistent image acquisition conditions. The resulting model was deployed in a mobile application designed to support field-level assessment by non-specialist users. These findings demonstrate the practical feasibility of applying vision-based models to support decision-making in dairy production systems, particularly in settings where traditional data collection methods are unavailable or impractical.

## Full-text entities

- **Diseases:** Dairy (MESH:D007787)
- **Species:** Bos taurus (bovine, species) [taxon 9913]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12291920/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12291920/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/PMC12291920/full.md

---
Source: https://tomesphere.com/paper/PMC12291920