The progress of Industry 4.0 drives the need for automated visual inspection systems to replace manual inspection processes in the printing industry, which are prone to operator errors, especially for detecting stamping defects. This research aims to implement a YOLOv8-based visual inspection system on a Raspberry Pi 4B as an edge computing device, integrated with an ESP32 and Firebase Realtime Database, for realtime IoT-based monitoring. The system is designed using a Pi CSI OV5647 camera for image acquisition, the YOLOv8 model to classify products into Good and Not Good categories, an ESP32 as a product-sorting servo controller via the HTTP GET protocol, and Firebase Realtime Database as a cloud-based storage and monitoring medium via the REST API. Testing was conducted on a prototype automatic stamping machine in a laboratory environment, with 907 frames processed continuously. The test results show that the system successfully detects and classifies stamping, with average confidence scores of 0.7097 for the Good category and 0.7398 for the Not Good category. The Raspberry Pi 4B is capable of running realtime inference with an average latency of 372.18 ms and a processing speed of 2.69 FPS, as well as stable CPU, RAM, and processor temperatures of 42.53%, 23.08%, and 62.27°C, respectively. All classification data was successfully sent to ESP32 and Firebase without failures, with average latencies of 294.46 ms and 1456.60 ms, respectively. The research results show that the Raspberry Pi 4B can serve as the main processing device for a YOLOv8-based visual inspection system integrated with IoT technology for realtime monitoring.
Copyrights © 2026