Abstract:
In Sri Lanka, all efforts to maintain the safety, freshness, and market value of the eggs are
done using manual grading. This is considering the listening method or the candling method of
inspection, which tends to be very slow, subjective, and inaccurate, especially in bilk. This research
posed the question of whether or not machine learning could be used to erase the manual
grading of eggs and automate it based on the common defects adhering to SLSI guidelines. The
goals were to create an automated grading system using candling, apply the machine learning
process and determine the level of effectiveness of engineering created specifically for the field,
and the defects in the eggs and grading. Ultrasounds, hyperspectral imaging, and deep learning
have been used to inspect eggs. All of these methods are effective, but only for smaller and
medium-sized poultry businesses. They are a bit impractical as they require massive sets of
data and a large amount of computational power. Works like Yang et al (2023) have pointed
out that SVMs stratified the data the best out of the models used, and they are much easier on
the system and the data, so they keep the accuracy and effectiveness. From the commercial
and university poultry farms, a set of 1,790 candling images was collected in which the eggs
were filmed at 5 different angles and under steady light. Domain experts confirmed four defect
types: cracks, irregular shapes, shell texture, and yolk outline visibility. Edge operator feature
extraction (Canny, Sobel, and Laplacian), LBP and GLCM texture analysis, Gabor and wavelet
shape descriptors, and Recursive Feature Elimination with Cross Validation (RFE-CV) feature
subset optimizers. Trained individual hyperparameter-tuned binary SVM classifiers, and their
outputs were a random forest for SLSI-based grades. The achieved defect detection accuracy
and overall grading accuracy of the models were from 92.06 to 97.56 and 97.95, respectively.
These models demonstrated strong performance and crossed 0.95 ROC-AUC scores. Statistical
validation through stratified cross-validation, learning curves, and repeated trials confirmed
overfitting minimisation and generalisation. The findings reaffirm the perceived notion that
classical machine learning, combined with feature engineering, yields grade estimations that
are accurate, efficient, and widely available without the need for complex deep learning. The
system was transformed into a web application for farm workers to instantly grade uploaded
candling images. With this, Sri Lanka’s poultry industry becomes scalable and loses net resource
expenditure, a solution which minimises human error and ensures quality standards.