This paper presents a real-time food ingredient detection and rule-based recipe recommendation system using YOLOv8n for CPU-only deployment. The system detects five common household ingredients tempeh, egg, spring onion, soy sauce, and noodle—from a live webcam stream and maps the detected ingredient set to predefined recipe rules. A custom dataset of 1,250 images was collected under variations in lighting, distance, and camera angle, annotated in YOLO format, and divided into training, validation, and test subsets using stratified sampling. Experimental results on the held-out test set showed an overall precision of 0.88, recall of 0.84, F1-score of 0.86, mAP@0.5 of 0.89, and mAP@0.5:0.95 of 0.59. On a CPU-only Intel Core i5-1135G7 laptop, the system achieved approximately 28 FPS, indicating its feasibility for real-time kitchen-assistance applications. The rule-based recommendation module achieved 90.0% strict accuracy and 96.7% lenient accuracy across valid, partial, and invalid ingredient combinations. These results suggest that YOLOv8n can be integrated with an interpretable rule-based recommendation engine for lightweight food-related applications. However, the current system remains limited by the small number of ingredient classes, sensitivity to lighting and occlusion, and the static recipe database.
Copyrights © 2026