Non-Destructive Assessment of Raw Milk Quality Using Computer Vision and Artificial Intelligence
Ahmad Khoirul Umam (a*), Lilik Eka Radiati (a), Tri Eko Susilorini (a), and Fitri Utaminingrum (b)

a) Faculty of Animal Science, Universitas Brawijaya, Malang 65145, Indonesia
b) Faculty of Computer Science, Universitas Brawijaya, Malang 65145, Indonesia


Abstract

This study applies computer vision and artificial intelligence (AI) to rapidly assess the quality of raw cow milk. Milk quality strongly influences processing performance and market value, with higher-grade milk commanding premium prices. To ensure consistent standards, 1008 images of raw cow milk samples were collected under controlled lighting and divided into three categories (1) good quality with normal appearance, (2) non-defective but with abnormal opacity or thickness, and (3) defective samples containing clots, sediment, or discoloration. Texture as visual biomarkers were extracted. After pre-processing and augmentation, texture features were computed using the Gray Level Co-occurrence Matrix (GLCM) with pixel distances (1, 2, 3, 4) and orientations (0, 45, 90, 135). Extracted features included contrast, correlation, homogeneity, dissimilarity, and energy. To reduce computational complexity, only the most relevant features were selected. Classification was carried out using a Decision Tree model, with the best performance at distance 3 and angle 0, yielding an accuracy of 81.68 %. Paired t-test analysis confirmed that differences across parameter variations were not statistically significant. Confusion matrix analysis further validated reliable classification across all groups. These results demonstrate the feasibility of combining GLCM-based feature extraction with Decision Tree models for non-destructive, real-time milk quality evaluation.

Keywords: Computer vision, Machine learning, Non-destructive evaluation, Precision dairy farming, Texture analysis

Topic: Animal product technology

ICESAI 2025 Conference | Conference Management System