Camera-based Counting & Classification
Đếm & Phân loại Sản phẩm bằng Camera
Count & classify 4 product sizes on conveyor — no mechanical sensors, <0.5% error.
Problem
A conveyor runs at 1.2 m/s with 4 product sizes (XS/S/M/L) sometimes overlapping. Mechanical sensors (load cells, light gates) miscount when items touch. Need a non-contact solution.
Architecture
60 fps GigE Vision camera → horizontal-line ROI across the belt → YOLOv8 detect → ByteTrack object tracking (counts each item once at line crossing) → contour analysis for size classification → calibration grid pixel→mm → webhook to ERP for live stock.
Stack & rationale
- ByteTrack: great for counting because it keeps IDs through brief occlusions.
- Calibration grid: one-time setup, accurate pixel → mm for size classes.
- GigE Vision: stable 60 fps, no dropped frames vs USB.
Results
- Counting error: 0.3-0.5% (across 50,000 test items)
- Size classification accuracy: 0.98
- Throughput: 8 items/sec, no bottleneck
- Per-product setup time: ~30 min (swap grid + retrain SVM for sizes)
Lessons
A great tracker beats a great detector for counting. ByteTrack > SORT when items overlap. Calibration grids MUST be printed on matte paper — gloss breaks corner detection.
Security & Compliance
- Privacy mode: face recognition stores embeddings (512D vectors) rather than raw images — non-reversible.
- On-device processing: no images leave the device (edge inference).
- Retention policy: ALPR/CCTV snapshots auto-deleted after 90 days unless flagged.