Files
managed-portal/managed/people_flow_project/README_NATIVE.md
2026-04-27 10:04:36 +08:00

1.7 KiB

Native RTSP Bundle

This bundle is for lightweight native deployment on an x86_64 Ubuntu host.

What To Edit

Open scripts/run.sh and edit only these two lines:

RTSP_URL="rtsp://..."
OUTPUT_DIR="/home/x/people/output"

First-Time Setup

From the project root:

sudo bash scripts/install.sh

This creates .venv, installs Python dependencies, copies the bundled DeepFace weights into ~/.deepface/weights, installs the systemd unit, starts the service, and enables it on boot.

Build An Offline Dependency Pack

If you want future installs to avoid re-downloading Python packages:

./build_wheelhouse.sh

This creates a local wheelhouse/ directory for Ubuntu 24.04 x86_64 + Python 3.12. After that, ./setup_native_venv.sh will automatically prefer local wheels.

Start The RTSP Task

sudo systemctl status people-flow.service

The service runs in the foreground under systemd.

Outputs

  • Latest half-hour summary: OUTPUT_DIR/rtsp_stream/latest.json
  • Historical half-hour summaries: OUTPUT_DIR/rtsp_stream/windows/
  • Runtime log: OUTPUT_DIR/rtsp_run.log

Chinese Guide

  • README_zh.md

Weights

The project expects these local files:

  • weights/yolo11n.pt
  • weights/deepface/age_model_weights.h5
  • weights/deepface/gender_model_weights.h5
  • weights/deepface/retinaface.h5

At setup time and each RTSP launch, those .h5 files are copied into the current user's default DeepFace directory:

  • ~/.deepface/weights/

That keeps the bundle portable across different unpack paths such as /home/x/people and /home/xiaozheng/people.