Building a border wait-time estimator sounds like a solved problem in computer vision: throw YOLO11 at a camera feed, count the cars, and do some math. But developer Igor Manjeni found that while detecting vehicles is trivial, tracking a specific car through a queue using periodic snapshots is a different beast entirely. His project, Na granici, highlights the gap between model accuracy and real-world infrastructure constraints.
Detection Is the Easy Part
Manjeni utilized Ultralytics' YOLO11, specifically the yolo11s.pt model for routine analysis and yolo11x.pt for heavier comparisons, to identify cars, trucks, buses, and motorcycles. The model successfully returned bounding boxes and confidence scores for vehicles in the COCO class set. However, the developer had to manually define Regions of Interest (ROI) using OpenCV polygons because the pretrained model couldn't distinguish between cars waiting in line, cars driving in the opposite direction, or parked vehicles. This required custom geometry for every single camera, as each border crossing offered a unique perspective that broke standard detection logic.
The Sparse Snapshot Problem
The core challenge wasn't detection, but identity persistence across time. Unlike continuous video streams where trackers like ByteTrack or BoT-SORT excel, Manjeniβs system relied on official government cameras that update images sporadically. Between snapshots, vehicles could move significantly, become obscured by larger trucks, or exit the frame entirely. He experimented with classical computer vision techniques, including SIFT feature extraction, descriptor matching, and RANSAC geometric verification. These methods helped associate visual features between images but failed to guarantee identity when faced with five identical white cars in a queue, where visual ambiguity made it impossible to know which car was which.
Compute Constraints and False Confidence
Manjeni aimed to analyze approximately 60 cameras once per minute to improve tracking fidelity. This pipeline required downloading, decoding, cropping, running YOLO inference, filtering by ROI, and updating statistics for each camera every 60 seconds. The server infrastructure simply couldn't sustain the load, requiring roughly one full analysis per second on average. Furthermore, lowering the detection confidence threshold to catch distant vehicles introduced false positives from road signs and reflections. The system had to balance aggressive detection with heavy post-processing filtering to avoid polluting the wait-time calculations with phantom cars.
Estimating Wait Times Without Perfect Tracking
Since reliable individual car tracking wasn't feasible across all 60 cameras, the project pivoted to aggregate queue movement. The formula Estimated waiting time = Vehicles ahead / Estimated processing rate required estimating the processing rate from historical data, weekday/weekend patterns, and queue clearing events. The developer noted that a decrease in detected cars doesn't always mean cars crossed the border; they might have just become hidden or left the field of view. Consequently, the system had to distinguish between direct observations and statistical assumptions, ensuring that low-confidence estimates weren't presented with the same certainty as consistent data.
Key Takeaways
- Object detection models like YOLO11 solve localization, not identity persistence across sparse time intervals.
- Real-world infrastructure constraints, such as uncontrollable camera angles and update frequencies, often outweigh model capabilities.
- Classical CV techniques like SIFT and RANSAC can aid feature matching but struggle with high-similarity object classes.
- Computational resources become a bottleneck when scaling periodic image analysis across dozens of high-frequency endpoints.
The Bottom Line
Stop assuming that state-of-the-art object detection equals state-of-the-art tracking. If your data source is sparse and noisy, your architecture needs to prioritize robust statistical estimation over brittle identity resolution.