safesight-edge/docs/requirements/guide.md

73 lines
1.9 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.

# 命令指南
[在windows上安装ffmpeg]
- 打开 PowerShell 或 CMD执行
winget install Gyan.FFmpeg
- 安装完成后,关闭并重新打开终端,验证:
ffmpeg -version
-查看本地摄像头信息
ffmpeg -list_devices true -f dshow -i dummy
- 本地运行RTSP服务器
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
- 本地验证RTSP拉流正确
ffplay rtsp://localhost:8554/cam
在3588上测试RTSP输出
ffplay rtsp://localhost:8555/live/cam1_face_det
- 在 Windows 上用 VLC 播放处理后的流:
rtsp://3588的IP:8555/live/cam1_face_det
- 编译agent
go build -o rk3588-agent_linux_arm64 ./cmd/rk3588-agent
- 运行模拟告警服务
python .\mock_alarm_server.py
然后在 RK3588 上测试 token 接口:
curl -X POST http://10.0.0.49:8080/api/getToken
- best-640.rknn模型只检测3类
类别映射:
0 = person
1 = shoe鞋子
2 = phone手机
# 实时查看NPU负载每秒刷新
watch -n 1 cat /proc/rknpu/load
# 实时查看温度
watch -n 1 'for f in /sys/class/thermal/thermal_zone*/temp; do echo "$(basename $(dirname $f)): $(( $(cat $f) / 1000 ))°C"; done'
# 查看编码器FPS
watch -n 1 'grep -E "fps_calc|RKVENC" /proc/mpp_service/sessions-summary | head -20'
# 综合监控(运行脚本)
~/apps/OrangePi3588Media/scripts/monitor_hw.sh
- 运行media-server
./build/media-server -c configs/sample_cam4_best.json
- PT模型转RKNN
在Linux系统上先克隆RKNN修改后的项目到本地
https://gitcode.com/GitHub_Trending/ul/ultralytics
安装依赖:
pip install -e . rknn-toolkit2
pip install "onnx==1.16.1"
进入模型目录,执行:
yolo export model=best.pt format=rknn name=rk3588