Food Portion Weight Prediction and Nutritional Estimation from Images Using YOLOv8 Segmentation and XGBoost Regression - Ery Setiyawan Jullev Atmadji; Freda Adi Ferdana; Husin; Aji Seto Arifianto (Teknika, 2026)
Understanding the nutritional content of food is essential for maintaining balanced dietary habits. However, most existing nutrition information sources rely on fixed portion sizes and do not reflect the actual amount of food consumed. This study proposes an image-based system for estimating food nutrition dynamically using computer vision and machine learning. The system integrates YOLOv8m-seg for food object detection and segmentation with XGBoost regression for food weight prediction. Images uploaded by users through a Telegram chatbot are processed to detect food containers and segment individual food objects. Features extracted from segmentation results, such as object area and dimensions, are then used to estimate the weight of each food item. Nutritional values including calories, fat, carbohydrates, and protein are calculated based on the predicted weights. Experimental results show that the segmentation model achieved an average accuracy of 87.68%, with several food categories reaching 97–98% accuracy. The weight prediction model obtained an MAE of 21.138 g, RMSE of 50.10 g, and R² of 0.7838, indicating reasonable predictive performance. The developed system demonstrates the potential of combining object detection, segmentation, and regression models to provide automated nutritional estimation through an accessible chatbot interface, supporting more practical and personalized dietary assessment.