safesight-edge/docs/requirements/guide.md
tian 760eb35697 docs: update guide.md with local test paths
- Carry over uncommitted changes from original repo
- Update old references: rk3588-agent → safesight-agent
2026-07-17 11:02:48 +08:00

99 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 命令指南
- 运行后台服务
./build/media-server -c configs/test_face_det_zoned_only.json
[在windows上安装ffmpeg]
- 打开 PowerShell 或 CMD执行
winget install Gyan.FFmpeg
- 安装完成后,关闭并重新打开终端,验证:
ffmpeg -version
-查看本地摄像头信息
ffmpeg -list_devices true -f dshow -i dummy
查看分辨率
ffmpeg -f dshow -list_options true -i video="你的摄像头名称"
ffmpeg -f dshow -list_options true -i video="HD Webcam eMeet C960"
- 本地运行RTSP服务器
C:\Software\mediamtx\mediamtx.exe
- 推流到RTSP服务器设置摄像头的分辨率为720P
ffmpeg -f dshow -rtbufsize 100M -video_size 1280x720 -framerate 30 -vcodec mjpeg -i video="4K AutoFocus Webcam" -c:v libx264 -preset ultrafast -pix_fmt yuv420p -f rtsp rtsp://localhost:8554/cam
ffmpeg -f dshow -rtbufsize 100M -video_size 1920x1080 -framerate 30 -vcodec mjpeg -i video="HD Webcam eMeet C960" -c:v libx264 -preset ultrafast -pix_fmt yuv420p -f rtsp rtsp://localhost:8554/cam
ffmpeg -re -stream_loop -1 -i 行人.flv -c copy -rtsp_transport tcp -f rtsp rtsp://10.0.0.49:8554/cam
ffmpeg -re -stream_loop -1 -i 监控.mp4 -c copy -rtsp_transport tcp -f rtsp rtsp://10.0.0.49:8554/cam
ffmpeg -stream_loop -1 -re -i "boots.mp4" -c:v libx264 -preset fast -tune zerolatency -r 30 -f rtsp -rtsp_transport tcp rtsp://localhost:8554/cam
ffmpeg -re -stream_loop -1 -i reg_001_单人_侧面_黑色鞋_1.mp4 -c copy -rtsp_transport tcp -f rtsp rtsp://10.0.0.49:8554/cam
C:\Users\Tellme\Pictures\人脸库> ffmpeg -re -stream_loop -1 -i reg_008_unk_011_多人_正面_黑色鞋_白色鞋_1.mp4 -c copy -rtsp_transport tcp -f rtsp rtsp://10.0.0.49:8554/cam
- 本地验证RTSP拉流正确
ffplay rtsp://localhost:8554/cam
在3588上测试RTSP输出
ffplay rtsp://localhost:8555/live/cam1
查看HLC输出
http://10.0.0.50:9000/hls_player.html
- 在 Windows 上用 VLC 播放处理后的流:
rtsp://10.0.0.50:8555/live/cam1
- 编译agent
go build -o safesight-agent_linux_arm64 ./cmd/safesight-agent
- 运行模拟告警服务
C:\Users\Tellme\apps\safesight-edge\python .\mock_alarm_server.py
uv run --with flask scripts/mock_alarm_server.py
- 运行minio
C:\Users\Tellme\minio\minio.exe server C:\Users\Tellme\minio\myminio --address ":9000" --console-address ":9001"
用户名密码是admin/password
然后在 RK3588 上测试 token 接口:
curl -X POST http://10.0.0.49:8080/api/getToken
- 运行后台管理服务
go run .\cmd\managerd\main.go .\managerd.json
# 综合监控(运行脚本)
~/apps/safesight-edge/scripts/ops.sh hw
- 标准单路全流程测试:
./build/media-server -c configs/sample_cam_ppe12.json
- 5路全流程压力测试
./build/media-server --config configs/stress_5ch_stretch.json
- PT模型转RKNN
在Linux系统上先克隆RKNN修改后的项目到本地
https://gitcode.com/GitHub_Trending/ul/ultralytics
安装依赖:
pip install -e . rknn-toolkit2
pip install "onnx==1.16.1"
激活python环境
source ./venv_rknn/bin/activate
进入模型目录,执行:
yolo export model=yolov8s_ppe.pt format=rknn name=rk3588
- 插件可以通过以下方式构建以ai_face_det_zoned为例
cmake --build build --target ai_face_det_zoned