| General note |
Ensuring consistent product quality is a critical challenge in the biscuit<br/>manufacturing industry, particularly in developing economies like Pakistan, where<br/>manual inspection remains the norm. This approach, however, is prone to human error,<br/>fatigue, and inconsistency, leading to variable quality control outcomes. This research<br/>proposes an intelligent, machine learning–based automated quality inspection system<br/>tailored for real-world biscuit production lines. A comprehensive dataset of 40,000<br/>high-resolution images was curated, representing four popular biscuit varieties Rio,<br/>Sooper, Candy, and Marie captured under actual factory lighting conditions. The<br/>dataset includes both defective and non-defective samples, covering a wide range of<br/>defect types such as breakage, charring, deformation, and missing pieces. To ensure<br/>high-quality annotations with scalable efficiency, a semi-automated iterative annotation<br/>framework was developed, combining initial manual labeling with model-assisted<br/>annotation and human-in-the-loop refinement across multiple cycles. Multiple state-ofthe-art machine learning models were implemented, fine-tuned, and rigorously<br/>evaluated, including YOLOv8, YOLOv11, YOLOv12, Faster R-CNN (via Detectron2),<br/>and Vision Transformer (ViT-B/16). Models were assessed using key performance<br/>metrics such as mAP@0.5:0.95, precision, recall, F1-score, inference speed (FPS), and<br/>computational efficiency. The results demonstrate that modern deep learning models,<br/>particularly YOLOv12 and Vision Transformers, achieve high detection accuracy<br/>(mAP > 90%) while maintaining feasibility for real-time deployment when optimized.<br/>This study provides a comparative analysis of accuracy-speed trade-offs, offering<br/>actionable insights for manufacturers seeking cost-effective, scalable solutions. The<br/>research concludes with practical recommendations for integrating AI-driven<br/>inspection systems into existing production infrastructure in resource-constrained<br/>environments, balancing performance, hardware requirements, and long-term<br/>maintainability. |