نظام ذكي لفحص وعدّ ملصقات المنتجات
Automated Product Label Inspection & Counting System
An AI-powered system that automates real-time product label inspection using YOLOv8 for object
detection and Google Gemini AI for quality analysis. It enhances accuracy, efficiency, and
reliability in industrial quality control environments.
Project Overview
This project implements an AI-driven solution for inspecting product labels in real time from
video streams. By combining YOLOv8 for object detection and tracking with Google Gemini AI for
intelligent analysis, the system detects products, crops their images, and evaluates label
presence and condition automatically.
Key Features
Real-Time Object Detection & Tracking
- 📦 Uses YOLOv8 (best.pt) to detect and track products in video streams.
- 🆔 Assigns unique Track IDs for each detected object.
- 🏷️ Identifies products based on predefined class names.
Automated Image Cropping & Processing
- ✂️ Automatically crops detected product images.
- 📁 Saves cropped images for inspection and traceability.
- 🔁 Prevents duplicate processing using processed Track IDs.
AI-Based Product Label Inspection
- 🧠 Sends cropped images to Google Gemini AI.
- 🏷️ Detects presence or absence of product labels.
- ⚠️ Evaluates label damage or defects.
- 📊 Returns structured inspection results.
Asynchronous Multi-Threaded Processing
- 🧵 Uses Python threading for parallel AI analysis.
- ⚡ Prevents video stream lag during AI processing.
Data Logging & Visual Feedback
- 📝 Saves AI inspection results in daily report files.
- 📂 Stores individual inspection responses with images.
- 📐 Displays bounding boxes, labels, and detection lines.
Technology Stack
- 🐍 Programming Language: Python
- 🎥 Computer Vision: OpenCV
- 🧠 Object Detection & Tracking: YOLOv8 (Ultralytics)
- 🤖 AI Analysis: Google Gemini AI
- 🧵 Performance Optimization: Multithreading
- 🖥️ Visualization: cvzone
- 📄 File Handling: base64, os, time
Use Cases
- 🏭 Manufacturing Quality Control – Verify label presence and condition.
- 📦 Retail & Inventory Management – Automate product validation.
- 🥤 Food & Beverage Industry – Detect missing or damaged bottle labels.
Conclusion
The Automated Product Label Inspection & Counting System delivers a powerful AI-driven solution
for real-time quality inspection. By integrating YOLOv8 with Google Gemini AI, it reduces manual
inspection effort, improves accuracy, and enables scalable industrial automation. 🚀