Egg Weight Estimation Based on Image Processing using Mask R-CNN and XGBoost
Abstract
Manually measuring egg weight in the context of livestock and the food industry can pose various problems, including time and labor requirements, the risk of egg damage, consistency and accuracy, and limitations on production scale. To address these issues, an automated egg weight estimation system is essential. This study proposes integrating computer vision and machine learning into a unified workflow that combines segmentation, classification, and regression for practical weight estimation. The proposed pipeline employs Mask R-CNN for egg segmentation, Random Forest (RF) classifier for egg type classification based on color features, and XGBoost for regression using morphological, geometric, color features, and egg type as predictors. The dataset used is 720 images, consisting of 20 eggs (10 chicken and 10 duck), each photographed from 36 rotational angles, and was collected with Ground Truth (GT) weights obtained from a digital scale. Experimental findings show that the RF classifier achieved perfect accuracy (precision, recall, and F1-score = 1.00) in distinguishing chicken and duck eggs. The XGBoost regressor obtained a training performance of MAE = 1.07 g and R² = 0.68, and a validation performance of MAE = 0.23 g and R² = 0.80 under 10-fold grouped cross-validation. Although a Support Vector Regressor baseline reached higher training accuracy (MAE = 0.22 g, R² = 0.96), it failed to generalize on validation (R² < 0), highlighting XGBoost’s robustness. The feature importance analysis revealed that there are 4 (four) important features for building an estimation model, namely: Hu moments, eccentricity, elongation, and diagonal length, while color statistics played a complementary role. The novelty of this work lies in combining deep segmentation, color-based classification, and feature-driven regression into a unified framework specifically for egg weight estimation, showing its feasibility as a proof of concept and laying the foundation for future large-scale, calibrated, and externally validated deployment.
Article Metrics
Abstract: 13 Viewers PDF: 8 ViewersKeywords
Full Text:
PDFRefbacks
- There are currently no refbacks.
Journal of Applied Data Sciences
| ISSN | : | 2723-6471 (Online) |
| Collaborated with | : | Computer Science and Systems Information Technology, King Abdulaziz University, Kingdom of Saudi Arabia. |
| Publisher | : | Bright Publisher |
| Website | : | http://bright-journal.org/JADS |
| : | taqwa@amikompurwokerto.ac.id (principal contact) | |
| support@bright-journal.org (technical issues) |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0




.png)