People-Attribute-Flow Analysis Web App on reComputer R + Hailo-8
An on-device people-attribute-flow analysis system based on Hailo-8 / Person Attribute.

The project source is available on GitHub: https://github.com/doublelf/People_Aattribute_flow
Uses YOLOv8n pedestrian detection combined with Person Attribute ResNet attribute recognition to perform offline video analysis on the reComputer R, with real-time browser playback and statistics. The project supports both real-time and cumulative counting by gender and across four age brackets.
Quick Start
1. Clone the Repository
git clone https://github.com/doublelf/People_Aattribute_flow.git
cd People_Aattribute_flow2. Local Debugging
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt3. Build the Image
docker build -t perview:latest .4. One-Command Launch
sudo docker run --rm --privileged --net=host \
-e VIDEO_PATH=/app/video/a1-1.mp4 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
-v /home/seeed/perview/app:/app/app:ro \
-v /home/seeed/perview/detection:/app/detection:ro \
-v /home/seeed/perview/workspace:/app/workspace \
-v /home/seeed/perview/video/:/app/video:ro \
perview:latestPer-line explanation:
| Row | Purpose |
|---|---|
--rm --privileged | Container is auto-removed on exit, and granted full device access (required for Hailo PCIe) |
--net=host | Use the host network directly, no -p port mapping needed, simplifying access |
-e VIDEO_PATH=/app/video/a1-1.mp4 | Default path of the input video to analyze (container-side view) |
--device /dev/hailo0:/dev/hailo0 | Pass the Hailo-8 device through to the container |
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro | Mount the host HailoRT runtime library into the container (read-only) |
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro | Same as above, symlink compatibility |
-v /home/seeed/perview/app:/app/app:ro | Local source overrides the baked-in code; after editing Python files, simply restart the container to take effect (read-only, prevents the container from accidentally writing to the host) |
-v /home/seeed/perview/detection:/app/detection:ro | Same as above, overrides the detection module |
-v /home/seeed/perview/workspace:/app/workspace | Persist pre-rendered output and uploaded files (read/write) |
-v /home/seeed/perview/video/:/app/video:ro | Mount your video directory into the container (read-only) |
Once the container starts, it automatically begins pre-rendering a1-1.mp4 (about 1 minute total; roughly 4–6 fps on 1080p depending on scene density).
5. Access the Web UI
Open a browser and navigate to:
http://<board_ip>:8000/
After the home page loads, the left side shows the annotated video player, while the right side shows the real-time Chart.js dashboard (current headcount, gender ratio, four age brackets, and cumulative statistics).
The default video
/home/seeed/perview/video/a1-1.mp4is shipped with the repository; drop in any custom video and update-e VIDEO_PATHaccordingly.