📧 Project Description
The Vaccine Cap Detection System leverages YOLO-based object detection and Supervision annotation tools to perform automated quality inspection in vaccine production environments.
It continuously monitors a live or recorded video feed of vaccine vials moving along a conveyor. Each vial is detected and classified as either:
-
✅ Cap Present (OK) — properly sealed vial
-
❌ Cap Missing (Not OK) — unsealed or defective vial
The system uses real-time tracking, visual annotations, and icon overlays to mark vial status.
Two line zones (Before and After) represent distinct inspection stages, ensuring that cap presence can be compared across production points for consistency and verification.
🎯 Core Objectives
-
💉 Detect vaccine vials and identify the presence or absence of caps.
-
🎥 Enable real-time inspection through video or live feed.
-
🧠 Utilize YOLO’s deep learning model for accurate classification.
-
🔁 Track multiple vials simultaneously with persistent IDs.
-
🧾 Display clear annotations and visual icons for “OK” and “Not OK” status.
-
🧩 Support dual inspection zones (“Before” and “After”) for process validation.
✨ Key Features
✅ Real-Time Detection: Identifies vaccine vials and checks if caps are properly sealed.
✅ Dual-Zone Analysis: Compares vial states before and after capping.
✅ Status Visualization: Displays “OK” and “Not OK” icons above each vial.
✅ Supervision Annotators: Enhances output with edge, corner, line, and label overlays.
✅ ByteTrack Integration: Maintains object identity for accurate tracking.
✅ Configurable Input: Reads parameters like video source and model path from config.yaml.
✅ Lightweight & Efficient: Optimized for industrial-grade camera systems.
⚙️ System Workflow
-
Input Video Feed: Captures live or recorded conveyor footage of vials.
-
YOLO Detection: Detects vial bodies and identifies cap presence.
-
Tracking: ByteTrack assigns IDs for tracking each vial through frames.
-
Line Zone Triggering: Checks objects passing through “Before” and “After” lines.
-
Annotation: Supervision draws bounding boxes, icons, and status labels.
-
Display & Output: Shows annotated video for real-time decision-making.
🛠️ Technologies Used
| Component | Description |
|---|---|
| Programming Language | Python 3.x |
| Framework | Ultralytics YOLO |
| Visualization | Supervision (Box, Line, Icon, Label Annotators) |
| Tracking | ByteTrack |
| Video Processing | OpenCV |
| Configuration | config.yaml (for video path, detection model, etc.) |
| Icons | Custom OK/Not OK image overlays |
📌 Use Cases
-
🧪 Pharmaceutical Manufacturing: Automated visual inspection for vaccine vial sealing.
-
🏭 Production Line Automation: Detect faulty packaging in real time.
-
🧾 Quality Assurance: Track batch consistency through continuous visual inspection.
-
🧠 AI-Based Defect Detection: Integrate into smart manufacturing ecosystems.
-
🔬 Research & Development: Evaluate detection performance for industrial AI solutions.
🔮 Possible Enhancements
-
☁️ Integration with real-time dashboards for monitoring and logging.
-
📊 Generate automated defect reports with timestamps and vial counts.
-
🧠 Extend to detect other anomalies (scratches, leaks, label misalignments).
-
🛰️ Deploy on edge devices (Jetson Nano, Raspberry Pi) for on-site inspection.
-
🔊 Add audio or visual alerts when defective vials are detected.
✅ Conclusion
The Vaccine Cap Detection System using YOLO and Supervision revolutionizes pharmaceutical quality control by automating cap-seal verification. It ensures production accuracy, reduces human error, and enhances operational efficiency through AI-powered visual inspection.

Reviews
There are no reviews yet.