Project context
Forbest knew its sales per branch from the tills but not how many people entered. Dedicated counter hardware meant cost and installation in every branch, while the stores already had IP security cameras.
The goal: reliable in/out counts from those cameras without new devices, families and groups counted as one visit, and hourly matching with receipts.
Architecture and data flow
- Streams: branch cameras connect to the central server by IP over VPN; the count source is selectable per camera.
- Detection: a Python/Flask service detects people in frames with YOLO.
- Tracking: detections are assigned to tracks with a cost matrix and positions are predicted with a Kalman filter.
- Counting: a track crossing the virtual door line inward is an entry, outward an exit; people crossing together form a group visit.
- Matching and reports: the PHP dashboard pulls receipts, revenue and basket data from Mikro POS, joins them with hourly visits and exports PDF, Excel and PPTX.
Engineering challenges and solutions
Double counting at the door
People who pause, turn back or briefly disappear get counted twice with frame-level detection. The fix was track-based counting: a cost matrix assigns detections, a Kalman filter carries position through short losses, and a count is written only when a track fully crosses the line.
Different mounting angles and scales
Cameras are mounted overhead or at an angle. Detection runs at two scales to catch small figures. Mounting, processing location and count source differ per branch, so they are software settings per camera, not hard-coded.
Using the camera's own counter
Some Dahua cameras count on-device. For those, counts are pulled from the camera and no video is processed centrally; the dashboard merges both sources into one data model.
Time alignment with the till
Receipts and visits come from different systems; both are reduced to branch and hour buckets and joined, exposing hours with traffic but no sales.
The resulting system
Forbest management sees every branch on one dashboard with live counts, visits, conversion rate and average basket. Branch reports export to PDF and Excel, the hourly visit matrix to Excel, management decks to PPTX, and a full-screen TV dashboard rotates branch data at headquarters. The product is now offered to other retailers as Visiqo.
Technology stack
Related product and service
Go to the product page: Forbest · Visiqo Retail Analytics
Frequently asked questions
Is new counting hardware required?
No. Visiqo processes existing IP camera streams; for cameras that count on-device the number is read directly from the camera.
Is video stored?
No. The system produces count and profile data and does not store footage.
Which POS systems are supported?
The Forbest deployment uses Mikro; the platform also supports Nebim.