In retail stores, exhibition halls, and other scenarios, real-time grasp of the number of people entering the store and customers' stay time is the core basis for optimizing operation strategies. Based on the RV1126B edge computing platform, we have built a lightweight people flow detection Demo - through camera capture and local processing, to achieve accurate passenger flow counting and stay analysis. More importantly, the technical logic of this solution is deeply bound to the application scenarios, ensuring both detection accuracy and adaptation to actual operational needs.
Display of Detection Results:
Generate Statistical Result Text

Core Logic: How to Make Cameras "Understand" People Flow?
The core idea of this Demo is to let the system "observe - judge - record" like the human eye, which is specifically divided into three steps:
Step 1: Accurately identify people in the picture
After the camera captures the frame in real-time, the system will first filter out the target of "people" - through a pre-trained YOLO 11 model, eliminate irrelevant objects such as goods and shelves, and only focus on the human contour. Even if the light is flickering (such as backlight at the store entrance, exhibition hall lighting switching), the system can still stably track pedestrians, ensuring that there will be no missed viewing or misjudgment due to light problems.
Step 2: Track the movement trajectory of each person
After identifying the portrait, the system will assign a "temporary ID" to each person and track their movement path in real-time. For example, when someone walks in from the door, the system will mark "enter" and start timing. It is worth mentioning that the tracking algorithm has done ID storage processing. Even if the target is lost, when it reappears in the picture, the system will not count repeatedly, but only continue timing, thus avoiding the disadvantage of traditional infrared sensors that "record once when blocked".
Step 3: Automatically record the stay time
When a person enters the monitoring area, the system will automatically start timing until they leave the area. At the same time, it will count data such as "average stay time" and "maximum stay time", which are of great practical value. For example, in retail scenarios, it can show how long customers stay in front of which shelves; in exhibition halls, it can analyze which exhibition areas are the most attractive. The timing logic does not rely on network time, but is accurately calculated based on the frame rate of the picture, ensuring that even if the network is disconnected, it can be accurately recorded.
Solution Features
Local processing, faster response
All calculations (recognition, tracking, timing) are completed on the RV1126B chip and do not need to be transmitted to the cloud. This means lower latency, and there will be no data lag due to network cotton, which is particularly important for stores that need to adjust manpower in real-time.
Flexible adaptation to different scenarios
The system has built-in adjustable "confidence parameters": in crowded supermarkets, the recognition threshold can be increased to avoid misjudgment when crowds are crowded; in boutiques with fewer customers, the threshold can be reduced to ensure that every customer entering the store is recorded. At the same time, we can also set "effective areas" (such as only counting people entering the store, ignoring pedestrians passing by the door), which can be adapted to the layout of different venues through simple configuration.
Two deployment methods, choose as needed
According to different needs, two implementation paths are provided:
- If you need to quickly test the effect, you can run it in Python script mode, complete the configuration within a few minutes, which is suitable for makers to quickly verify ideas;
- If you pursue long-term stable operation, you can cross-compile based on C++ language to generate efficient execution files, reduce power consumption and improve continuous working ability, which is suitable for unattended store scenarios.
Future Application Scenarios
The ultimate value of this Demo is to transform AI cameras into directly applicable operation tools:
For retail stores
- Automatically count "peak hours" (such as 18:00-20:00 on weekdays with the largest number of people), helping store managers arrange shifts reasonably;
- Analyze "popular area stay time", for example, if it is found that customers stay in front of a new product for an average of 5 minutes, the display intensity of this area can be increased.
For exhibition halls
- Quickly compare the passenger flow data of different exhibition areas, judge which types of exhibits are more popular, and provide a basis for the layout of the next exhibition;
From the perspective of technical logic, the core of this solution is "solving practical problems with the lowest cost" - without relying on complex server clusters, only through the local computing power of RV1126B, real-time collection and analysis of passenger flow data are realized. For developers, this logic can be directly reused: whether it is adjusting the recognition area or adding multi-camera linkage, it can be quickly expanded based on the existing framework, so that technology can truly serve scenario needs.
Deng MingXi
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.