William Zhang2026-09-20

Real-time People-Attribute-Flow Analysis Web App on reComputer R + Hailo-8

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.

Person AttributePeople CountingYOLOEdge AICVGitHub

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

bash
git clone https://github.com/doublelf/People_Aattribute_flow.git
cd People_Aattribute_flow

2. Local Debugging

bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

3. Build the Image

bash
docker build -t perview:latest .

4. One-Command Launch

bash
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:latest

Per-line explanation:

RowPurpose
--rm --privilegedContainer is auto-removed on exit, and granted full device access (required for Hailo PCIe)
--net=hostUse the host network directly, no -p port mapping needed, simplifying access
-e VIDEO_PATH=/app/video/a1-1.mp4Default path of the input video to analyze (container-side view)
--device /dev/hailo0:/dev/hailo0Pass the Hailo-8 device through to the container
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:roMount the host HailoRT runtime library into the container (read-only)
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:roSame as above, symlink compatibility
-v /home/seeed/perview/app:/app/app:roLocal 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:roSame as above, overrides the detection module
-v /home/seeed/perview/workspace:/app/workspacePersist pre-rendered output and uploaded files (read/write)
-v /home/seeed/perview/video/:/app/video:roMount 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.mp4 is shipped with the repository; drop in any custom video and update -e VIDEO_PATH accordingly.