AGH University of Science and Technology

02/12/2026 | News release | Distributed by Public on 02/12/2026 04:52

Finding the perfect pączek: AI to assess quality of food products

Finding the perfect pączek: AI to assess quality of food products
12-02-2026

As part of his diploma thesis, a student of the Faculty of Mechanical Engineering and Robotics, Daniel Ambroziewicz, has designed and implemented a complete system for automated quality control of food products. The solution is based on a vision system and a hybrid image analysis architecture.

Although the system has been created with the quality control of biscuits in mind, its construction is universal enough to be adapted to other production processes, as exemplified by a tongue-in-cheek demonstration of the quality control of pączki, traditional Polish yeast pastries, in celebration of Fat Thursday.

The solution involves a research station designed from scratch: a transport mechanism with a drive based on a NEMA 17 stepper motor, controlled by Arduino Nano, and an image acquisition station synchronised with the movement of the belt. The system enables continuous, real-time product analysis.

The software is based on a multistage image processing pipeline, which combines classic computer vision methods with deep learning algorithms, meaning that the image goes through a series of organised steps and the system draws all the necessary information from them. Object segmentation, tracking, and rapid geometric measurements are performed using OpenCV, while surface defect detection uses a PatchCore algorithm (Anomalib), which generates detailed anomaly maps.

Effect? Automatic real-time quality assessment, from object detection, through analysis, to a conclusive decision as to whether the product meets the requirements. The entire process takes a fraction of a second and is 98% effective, even in the case of previously unseen defects.

Daniel Ambroziewicz comments on the demonstrative quality control of filled doughnuts:

"That obviously is a light-hearted example, but neural networks, particularly unsupervised networks, play an important role in product quality control, both in the food, automotive (wheels), and electronics (chips) sectors.

A pączek as seen by the algorithm: yellow and red areas are defects, while blue means the "norm".

AGH University of Science and Technology published this content on February 12, 2026, and is solely responsible for the information contained herein. Distributed via Public Technologies (PUBT), unedited and unaltered, on February 12, 2026 at 10:53 UTC. If you believe the information included in the content is inaccurate or outdated and requires editing or removal, please contact us at [email protected]