The problem: a number everyone asks for and nobody knows precisely

Ask any mall management how many visitors came in yesterday, and you will usually hear an estimate, or a figure from an old counter on one door. Meanwhile, tenants want to know how many people walk past their shop, and advertisers want proof that the screen they pay for is actually seen. Operations need to know peak times to schedule security and cleaning.

Most entrances already have cameras, but they are only used to record and to review footage when something happens. The idea behind Rakaiz Nabd is simple: turn those cameras into a smart counter that gives real-time numbers.

The idea: a virtual counting line

We draw a virtual line on the camera image at the entrance. An AI model detects people in every frame, and a tracker gives each person a stable number and follows them from frame to frame. When someone crosses the line in the entry direction, we count an entry; when they cross it the other way, we count an exit. The difference between entries and exits across all entrances is the current occupancy.

We tested the idea on an 80-second video of a square with people walking through, using the YOLOX model to detect people and the ByteTrack algorithm to track them. The system recorded 13 entries and 12 exits, and up to 8 people were in view at the same moment. More important than the numbers was what we learned from the mistakes.

The challenges we hit

1. Someone walking along the line

One person walked alongside the counting line near a lamp post, crossing it back and forth, and the system counted an entry, then an exit, then another entry within seconds. We fixed part of the problem by ignoring a reverse crossing within one second of the previous one, but the bigger lesson was about where the line goes: it must sit where everyone passes and nobody stops, away from posts and doors.

2. Tracking breaks in crowds

When one person passes behind another or behind a post, the tracker can lose them and give them a new number when they reappear. In the test, the tracker created far more IDs than there were actual people. This barely affects the crossing count, because we count the moment the line is crossed, but it inflates visitor counts in the zone statistics. So we treat the crossing count as the official figure, and improve tracking with an overhead camera angle that reduces overlap.

3. Occupancy is not the number of people on camera

Two numbers often get confused: the number of people visible in the image right now, and the actual occupancy of the site (entries minus exits). The first is useful for measuring crowding at the entrance; the second needs a camera on every entrance, otherwise it will be incomplete. That is why the dashboard shows them separately, with an instant crowding gauge that compares the number of people to a capacity the operator sets.

4. Feet, not the middle of the body

To place a person on the ground we use the point at their feet (the bottom centre of the detection box) instead of the centre of the box. This small detail makes line crossings, zone entries and the heatmap much more accurate, especially when the camera is tilted.

5. Estimating the end of the day

A core request from management: how many visitors so far, and how many do we expect by the end of the day? The simplest method multiplies the current entry rate by the remaining opening hours. But that estimate is misleading in the first minutes, so it only appears once enough time has passed. In real operation it gets much better when it draws on previous days: a Thursday does not look like a Sunday.

6. Privacy

The system counts people without identifying them. Processing happens on a device next to the camera, and only the numbers are sent to the dashboard, with an option to blur people in any video that is shown. This respects the Personal Data Protection Law and makes approval from site management easier.

The result: a real-time dashboard

  • A live feed with detection boxes and the counting line
  • Today's summary: visitors so far, the entry rate, and the end-of-day estimate
  • An instant crowding gauge and a log of every crossing
  • A heatmap and ad-zone statistics: number of visitors and average dwell time

What we learned

  • Camera and line placement matter more than the model: an overhead angle and a well-placed line solve half the problems
  • Pick one official number: the crossing count is more stable than the number of IDs
  • Test by hand before quoting any accuracy: count five minutes yourself and compare it with the system
  • Numbers alone are not enough: their value comes from linking them to a decision, such as scheduling security or pricing an ad space

Want to know how many people visit your site?

See Rakaiz Nabd, read about Rakaiz Obour, which applies the same technology to vehicles, or get in touch and we will try the system on footage from your site.