Back to Blog
In this article

AI Video Analytics for Retail: The Real Case

Retailers have spent years accumulating footage from CCTV cameras, yet rarely used it for anything beyond investigating incidents after the fact. Cameras recorded — they didn’t analyze. This gap between “we have video” and “we have data” is exactly what AI video analytics for retail closes: technology that turns an ordinary camera feed into structured, […]

People Detection Software

Retailers have spent years accumulating footage from CCTV cameras, yet rarely used it for anything beyond investigating incidents after the fact. Cameras recorded — they didn’t analyze. This gap between “we have video” and “we have data” is exactly what AI video analytics for retail closes: technology that turns an ordinary camera feed into structured, real-time events without replacing a single camera.

European retail chain — 40+ grocery and homeware stores across three European countries — illustrates exactly how that gap gets closed in practice.

Why AI video analytics for retail is growing now

Just five to seven years ago, “camera analytics” was associated mainly with expensive enterprise solutions from major vendors — accessible only to chains with a budget on the level of the top 10 retailers. That has changed for three reasons.

First, object detection models like YOLO became lightweight enough to run in real time on inexpensive edge hardware instead of costly GPU servers in the cloud. Second, solutions emerged that don’t require replacing cameras — they connect to an existing RTSP/ONVIF stream and run as a software layer on top. Third, retailers realized that data sitting for years in CCTV recordings already answers operational questions that used to require separate studies or manual counting: customer flow, peak hours, floor-layout effectiveness.

AI video analytics for retail has stopped being a privilege of giants and become a practical tool for mid-sized chains.

The problem AI video analytics for retail solves: cameras exist, data doesn’t

European retail chain faced a situation typical of retail: CCTV was installed at every location, but footage was only reviewed after something had already happened — a theft, a dispute, a security incident. No one knew:

  • how many people were currently in a store;
  • whether anyone had entered staff-only areas after closing;
  • how customer traffic related to staffing decisions or floor planning.

The existing NVR software could record video, but it couldn’t understand it — a gap that people detection software is built to close: a software layer added on top of existing video infrastructure that turns frames into structured data about the people in a camera’s field of view.

Manual review doesn’t scale. One person can’t watch footage from 40+ locations, compare traffic across sites, or react instantly to an after-hours intrusion. A manual approach scales linearly — more cameras require more people. Automated detection scales with virtually no such limit: adding a location means deploying one more container, not hiring more staff.

Manual review is also reactive by definition — it answers “what happened yesterday,” not “what’s happening right now.” For shift planning, merchandising decisions, and responding to suspicious activity, the value is in real-time data, not an after-the-fact archive.

The solution: YOLOv8 people tracking without new infrastructure

Instead of replacing cameras or installing new hardware, the team deployed a detection engine directly against each store’s existing RTSP/ONVIF streams, running on a small on-site box at each location.

YOLOv8 people tracking is at the core of the solution: the YOLOv8 model detects people in the frame, while ByteTrack maintains stable tracking of each individual across frames — even when they briefly disappear behind a shelf or another customer. This makes it possible not just to detect a person, but to follow their movement through an entire visit, which is the foundation for traffic analytics.

Technology stack:

  • YOLOv8 + PyTorch — object detection
  • OpenCV — video stream processing
  • ByteTrack — multi-object tracking
  • FastAPI — API layer for event delivery
  • PostgreSQL + Redis — data storage and caching
  • Docker — containerization for deployment at each site

Why edge deployment, not the cloud

One of the key architectural decisions in projects like this is where exactly to process video: in the cloud, or locally on-site. For a chain with dozens of locations, this isn’t just a technical detail — it’s a decision that affects cost, latency, and the reliability of the entire system.

Streaming video from 40+ cameras to the cloud would mean significant bandwidth costs and dependence on the internet connection quality at every site — and a network outage at one store shouldn’t affect the system as a whole. That’s why the detection engine is deployed locally, on a small box at each retail location: video is processed on-site, and only ready-made structured events (people counts, zone alerts) — not raw video — are sent to external systems. This reduces network load by orders of magnitude and keeps detection working even during temporary internet issues.

Real-time people counting system in action

The core of the solution is a real-time people counting system that counts people in-frame and by store zone at 30+ FPS per stream, maintaining accuracy above 95% even under varied lighting conditions — from bright daylight near storefronts to dim lighting in stockrooms.

Built on top of the counting layer is a system of zone-based rules:

  • occupancy limits — alerts when the number of people in a zone exceeds a threshold;
  • restricted zones — instant alerts when someone enters staff-only areas;
  • after-hours intrusions — an alarm if movement is detected outside business hours.

All events are published via REST and WebSocket APIs, ready to connect to a dashboard, a BI tool, or a client’s internal systems — without store managers having to monitor any extra screens.

From people counting to operational decisions

Counting people is only the first layer of value. The real benefit of a real-time people counting system emerges once that data is connected to the chain’s operational processes.

Data on peak visiting hours enables more accurate shift planning — more cashiers on the floor exactly when traffic is highest, instead of an averaged schedule. Data on zone occupancy shows which departments attract the most customer attention and which remain “dead zones” — feeding directly into merchandising and layout decisions. Comparing traffic across locations gives leadership the data to make decisions at the level of the entire chain, not just a single store.

All of these insights come without any additional sensor or survey — they’re extracted from video that was already being recorded anyway.

Computer vision for retail security: more than counting

While occupancy tracking solves operational tasks — staffing plans, peak-hour analysis — the second major application area is computer vision for retail security. Here, people detection functions as a layer of proactive protection:

  • the system distinguishes ordinary customer movement from anomalous activity (entering a zone after closing);
  • alerts arrive instantly, rather than the next morning when footage is reviewed;
  • incident data is automatically tied to a specific camera, zone, and time — simplifying any further investigation.

This is a fundamental difference from traditional video surveillance: instead of a passive archive, CCTV becomes an active sensor.

Another underestimated aspect of computer vision for retail security is trigger accuracy. Traditional alarm systems — motion sensors, for instance — frequently produce false triggers caused by animals, shadows, or lighting changes. YOLO-based detection specifically distinguishes people in the frame, so false alarms drop significantly — which directly affects whether the security team trusts the system and responds to its alerts promptly.

How AI video analytics for retail integrates with existing systems

One of the project’s conditions from the start was not to force European retail chain to change its existing processes or systems. The integration was built so the detection engine functions as an additional data layer, not a separate, isolated platform.

Structured events — occupancy, zone alerts, intrusions — are published via REST and WebSocket APIs in a format ready to connect to any external consumer: the chain’s own dashboard, a third-party BI tool such as Power BI or Tableau, or an internal security notification system. PostgreSQL stores historical data for trend analysis, while Redis handles fast, low-latency real-time event delivery.

Rolling the system out to each new store is mostly a matter of deploying one more Docker container and connecting it to the existing camera’s RTSP stream — not a separate integration project from scratch.

Pilot results

In a pilot deployment across three stores, the engine ran stably on already-existing hardware and gave the client its first live view of customer traffic and after-hours activity — replacing a fully manual, after-the-fact review process. Store teams gained the ability to see current occupancy and zone alerts as events happened, instead of finding out about them the next day.

You can see the full case here.

What to consider when implementing people detection software

Despite the clear benefits, deploying people detection software across a store chain involves several practical considerations worth accounting for at the planning stage.

Quality of existing cameras. While the solution doesn’t require new hardware, very old or low-resolution cameras can limit detection accuracy — especially in zones with difficult lighting or many people in frame at once. That’s why the Discovery & data audit phase, which such a project typically starts with, is critical: it shows whether partial hardware upgrades are needed before deploying the AI layer.

Privacy and regulatory requirements. Since the system works with video of people in a store’s public space, it’s important to plan for compliance with requirements such as GDPR in Europe from the outset — including how long data is retained, whether personal identification is performed (for detection and counting, it is not: the system works with anonymous bounding boxes, not facial recognition), and how visitors are informed about the use of video analytics.

Team training. The technology delivers no value if the data it produces goes nowhere. Successful implementation requires store managers and the security team to know how to read the dashboard and respond to alerts — otherwise the system remains technically functional but operationally unused.

Conclusion

This case illustrates a typical path for implementing AI video analytics for retail: not replacing infrastructure, but adding an intelligent layer on top of what’s already there. People detection software built on YOLOv8 people tracking and a real-time people counting system addresses two tasks at once — operational traffic analytics and computer vision for retail security — using a single technology stack and no additional cameras.

For chains that have invested in CCTV infrastructure for years without ever extracting real operational data from it, this approach is a practical way to change that without capital spending on new hardware. A pilot phase across a few locations makes it possible to verify detection accuracy under the specific lighting and traffic conditions of a given chain before scaling the solution to all points of sale — exactly as was done in the case of European retail chain.

About the author

Yuliia K.

Yuliia K.

AI / NLP Developer

Yuliia builds classification and NLP systems that make real-time decisions under production constraints at Meduzzen. Her work on AI voice agents includes answering machine detection at 97% accuracy, IVR menu navigation with fine-tuned BERT, and call summarization pipelines that extract structured data from messy transcripts. She turns noisy audio into actionable signals.

Have questions for Yuliia?
Let’s Talk

Read next

You may also like

Quick Chat
AI Assistant