Hostname: page-component-76d6cb85b7-mgxrv Total loading time: 0 Render date: 2026-07-17T05:12:34.063Z Has data issue: false hasContentIssue false

An innovative technique for faecal score classification based on RGB images and artificial intelligence algorithms

Published online by Cambridge University Press:  15 February 2023

L. Ortenzi
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
S. Violino
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
C. Costa
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
S. Figorilli
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
S. Vasta
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
F. Tocci
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
L. Moscovini
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
L. Basiricò
Affiliation:
Department of Agricultural and Forestry Sciences (DAFNE), University of Tuscia, 01100 Viterbo, Italy
C. Evangelista
Affiliation:
Department of Agricultural and Forestry Sciences (DAFNE), University of Tuscia, 01100 Viterbo, Italy
F. Pallottino*
Affiliation:
Consiglio per la ricerca in agricoltura e l'analisi dell'economia agraria (CREA) – Centro di ricerca Ingegneria e Trasformazioni agroalimentari, Via della Pascolare 16, 00015 Monterotondo, Rome, Italy
U. Bernabucci
Affiliation:
Department of Agricultural and Forestry Sciences (DAFNE), University of Tuscia, 01100 Viterbo, Italy
*
Author for correspondence: F. Pallottino, E-mail: federico.pallottino@crea.gov.it
Rights & Permissions [Opens in a new window]

Abstract

The milk production is strongly influenced by the dairy cow welfare related to a good nutrition and the analysis of the digestibility of feeds allows us to evaluate the health status of the animals. Through faeces’ visual examination it is possible to estimate the quality of diet fed in terms of lacking in fibre or too high in non-structural carbohydrates. The study was carried out in 2021, on four dairy farms in central Italy. The purpose of this work is the classification and evaluation of dairy cow faeces using RGB image analysis through an artificial intelligence (AI) (convolutional neural network (CNN)) algorithm. The main features to analyse are pH, colour and consistency. For the latter two RGB imaging was combined with deep learning and AI to reach objectivity in samples’ evaluation. The images have been captured with several smartphones and cameras, under various light conditions, collecting a data set of 441 images. Images acquired by RGB cameras are then analysed through CNN technology that extracts features and data previously standardized by a faecal score index assigned after a visual analysis and based on five classes. The results achieved with different training strategies show a training accuracy of 90% and a validation accuracy of 78% of the model which allow us to identify problems in bovine digestion and to intervene promptly in feed variation. The method used in this study eliminates subjectivity in field analysis and allows future improvement of increasing the data set to strengthen the model.

Information

Type
Animal Research Paper
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
Copyright © The Author(s), 2023. Published by Cambridge University Press
Figure 0

Table 1. Numerosity of the data set subdivided per FCI class based on a faecal score, from 2 to 4, that grows as the water content in the faeces decreases

Figure 1

Fig. 1. Example of RGB images from the faecal data set. Ground truth labels are assigned by eye inspection.

Figure 2

Fig. 2. Frequency count for each faecal score (n = 441). n.c., not classified.

Figure 3

Fig. 3. Training (light blue line) and validation (black dashed-dotted line) accuracy for one step (a) and two-steps (b) and (c) training strategies. Dark blue lines represent the training accuracy smoothed by means of a moving mean over ten iterations.

Figure 4

Table 2. Principal results of CNN ‘faecal net’

Figure 5

Fig. 4. Training and test confusion matrices of ‘fecalnet’ obtained with the two-steps training strategy described in the text.

Figure 6

Fig. 5. Example of FCI assignment based on faeces image classification by the CNN. Class and probability, and ground truth labels are also reported on top and bottom of the single image, respectively.