Master'sOpen Access

Early detection of mastitis in dairy cattle using image processing and sensor data analysis

Is this your thesis?

This record came from a bulk archive import. If it’s yours, link it to your profile.

2025
0 views
0 downloads

Abstract (EN)

Mastitis, one of the most common and costly diseases in dairy cattle, leads to significant economic losses. Early detection of the disease is critically important to minimize these losses. This study aims to develop and compare two complementary artificial intelligence approaches for the early detection of mastitis: (i) an image processing–based classification system, and (ii) a sensor data–based prediction model. In the image processing approach, a dataset consisting of 343 cow udder images obtained from the Kaggle platform was used. Texture features were extracted from the images using the Local Binary Pattern (LBP) method, and these features were classified using the Support Vector Machine (SVM) algorithm. Additionally, a web interface was developed to demonstrate the practical application of the model. The developed LBP+SVM model achieved performance rates of 89.66% accuracy, 96.15% precision, and 92.59% sensitivity on the test set. In the sensor data approach, a large-scale dataset containing over 1 million records and 35 features including electrical conductivity (EC), milk yield (MY), and activity (AQ) was analyzed. The dataset exhibited a mastitis prevalence of only 0.22%, posing a serious class imbalance problem. To address this issue, the SMOTE algorithm was applied. After SMOTE balancing, Logistic Regression, Random Forest (RF), and XGBoost models were compared. The Random Forest model achieved a ROC-AUC of 0.997 and a PR-AUC of 0.820. With threshold optimization, the model demonstrated a clinically meaningful balance with 73.63% sensitivity and 96.61% precision. In conclusion, this study presents two viable models for mastitis detection. The LBP+SVM model provides a fast and contactless visual verification method, while the SMOTE-supported Random Forest model enables continuous risk monitoring based on sensor data. Integrating these two approaches into a hybrid decision support system offers a scalable solution for proactive health management in dairy farms.

Author

Osman Tuğrul Orhan

How to Cite

Osman Tuğrul Orhan (Master Thesis). Early detection of mastitis in dairy cattle using image processing and sensor data analysis, 2025, Manisa Celal Bayar University.

Keywords

License

Tüm Hakları Saklıdır

This work is shared under the specified license terms.

More theses from Manisa Celal Bayar University