Related Experiment Video
Updated: Jun 18, 2026

Probing the Limits of Egg Recognition Using Egg Rejection Experiments Along Phenotypic Gradients
Published on: August 22, 2018
Research note: A machine learning approach for authentication of laying hen housing systems based on egg quality
Sofie Van Nerom1, Annatachja De Grande2, René Heim3
1Fisheries and Food, Animal Science Unit, Flanders Research Institute for Agriculture, Merelbeke-Melle 9090, Belgium; Livestock Gut Health Team (LiGHT), Department of Pathobiology, Pharmacology and Zoological Medicine, Faculty of Veterinary Medicine, Ghent University, Merelbeke-Melle 9820, Belgium.
None:
Eggs originating from outdoor housing systems, such as organic and free-range production, are often sold at a higher price than conventional eggs. This price difference creates an incentive for potential fraud, highlighting the need for reliable and cost-effective authentication methods. In this study, we evaluated whether internal and external egg quality parameters could be used to classify eggs according to housing system (indoor vs. outdoor) using supervised machine learning. In 2019, a total of 33,216 eggs were collected from 76 commercial farms across Belgium. Egg quality parameters were measured, including whole egg weight, dynamic stiffness, shell deformation, breaking force, albumen height, Haugh unit, shell thickness, yolk color, and cuticle thickness. A classification model was developed using TPOT to optimize supervised machine learning pipelines. The best model trained with all features was an XGBClassifier, which achieved an overall testing accuracy of 76.6%. A second model trained using only yolk color as a feature, implemented with an ExtraTreesClassifier, reached an accuracy of 74.1%. Although the full model performed slightly better in terms of overall accuracy, the yolk-only model showed the lowest false positive rate for outdoor eggs (7% vs. 13%), an important parameter in the context of fraud detection. The overall accuracy of the models was moderate and the best predictor was yolk color. Its potential as screening tool has to be nuanced. Yolk color is highly influenced by the diet and a possible bias with housing system could be suggested as dietary recommendations vary according to management practices. Egg quality parameters seem to be robust and little affected by the housing system. The use of machine learning on quality traits needs to be reconsidered as a tool for distinguishing the origin of eggs. Since the model was trained exclusively on Belgian eggs and no white hens were included in the dataset, additional data such as diet, breed and origin, is needed to confirm potential other parameters.

