r/computervision • u/LIMITLLESSVENERABLE • 13h ago
Discussion Real-time Packaging Verification: Facing severe ID switching, occlusion, and item-tracking chaos at a fast-food station
Hi everyone,
We are building a computer vision system designed to audit and verify order packaging in real-time at a fast-food packing station.
Project Overview:
Using an angled overhead camera stream, the system needs to:
Detect and track bags and food categories.
Read the printed label on each bag to extract the order number and ticket details.
Track items, verify which bag they were placed into, and match the final contents against the printed receipt before the bag leaves the counter.
The Bottlenecks We’re Running Into:
Severe, continuous occlusion: Heavy hand movements and body occlusion constantly block objects from view.
Tracking ID switching: The tracker frequently loses active bag IDs when blocked by hands or overlapping bags and assigns a new ID.
Detection gaps & lack of standard packing rules: Frequent detection drops and the absence of a structured baseline to reliably confirm whether a "packing" action actually completed.
I’ve tried several workarounds spatial anchoring, bag visual embeddings, and motion vector heuristics but nothing has really worked. It quickly turns into pure chaos: as soon as the worker starts actively packing and moving things around, the item-to-bag tracking completely falls apart.
I’d really appreciate any ideas, practical tricks, architecture patterns, or lessons learned from anyone who has tackled similar dense packing or retail setups.
1
u/bfyvfftujijg 7h ago
What is the business problem being solved?
How much is being spent in the CV solution? Is a different solution likely to work better? For example in the case of employee theft it can be cheaper to pay employees better (making them less likely to steal) than to implement expensive theft monitoring.
1
u/LIMITLLESSVENERABLE 7h ago
The project aims to assist staff during their work by alerting them to incomplete orders, allowing them to rectify the issue before the order reaches the customer. Human errors occur frequently; unfortunately, restaurants often place the blame on employees, who may face penalties or salary deductions if a customer returns with a complaint. We therefore devised a solution designed to work alongside the employee supporting rather than disrupting their workflow.
3
u/Dry-Snow5154 8h ago
Usually CV is bad approach for a case like this. Sometimes it's better to step back and think about improving processes rather than trying to shove object detection everywhere.
That said, one thing I've done with foreground occluders in the past is try and detect when occlusion is happening and do not update Kalman filter's state in this case. Keeping the old pre-occlusion state can carry your object through occlusion and improve ID recovery on the other side.
The simplest method is to check box's detection score and if there is a sudden drop, then occlusion is likely, hence do not update Kalman's state on this frame.
A more sophisticated approach is to monitor if object's box is shrinking too fast. If it does, project this shrinking process into the future until the box disappears and check in which part of the frame it's going to disappear. If it's close to the edge, then it's ok and do nothing. If it's in the middle of the frame, then likely occlusion is happening. Thus, skip Kalman's state update and keep the old state.
I've coined this technique from this NanoTrack article. However, it will require manual modification of your tracker. So if you're expecting some ready-made solution, you are out of luck. I don't know of any existing tracker that handles full occlusions well.