简介

  • 底层模型部署,任务执行相关笔记

mnc 常用命令

1
2
3
4
# 清除所有告警记录并删除文件
curl -X GET http://127.0.0.1:8000/api/setting/warning_record/clear

vca车辆检测任务启动参数

1
2
3
4
5
6
7
# 客户端模式 输入mp4文件地址
./vca.exe --cmd 2 --id 1 --detector-conf-inline 1 --detector-conf @--detector-type@2@--detector-models@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_4CLASSES.conf@/xxx@/yyy@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_LP_4CLASSES.conf@/data/static/models/CONSTRUCTION_VEHICLE/LPOCR_1L_LPRNET_COMPLEX.conf@--detector-fps@8@ --input-video-name /tmp/1-1712458335010.mp4 --input-video-retry-interval 5 --output-type 1 

# 单一任务 调试模式 输入rtsp流地址
./vca.exe --service-mode 0  --cmd 2 --id 1 --detector-conf-inline 1 --detector-conf @--detector-type@2@--detector-models@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_4CLASSES.conf@/xxx@/yyy@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_LP_4CLASSES.conf@/data/static/models/CONSTRUCTION_VEHICLE/LPOCR_1L_LPRNET_COMPLEX.conf@--detector-fps@8@ --input-video-name rtsp://admin:abcd1234@192.169.8.153 --input-video-retry-interval 5 --output-type 0

./vca.exe --service-mode 0  --cmd 2 --id 1 --detector-conf-inline 1 --detector-conf @--detector-type@2@--detector-models@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_4CLASSES.conf@/xxx@/yyy@/data/static/models/CONSTRUCTION_VEHICLE/DETECT_LP_4CLASSES.conf@/data/static/models/CONSTRUCTION_VEHICLE/LPOCR_1L_LPRNET_COMPLEX.conf@--detector-fps@8@ --input-video-name /tmp/1-1709940888706.mp4 --input-video-retry-interval 5 --output-type 0

sqlite3数据库配置参数

  • 模型JSON配置参数
    1
    
    {"models":[{"model":"CONSTRUCTION_VEHICLE/DETECT_4CLASSES.conf","threshold":0.3},{"model":"/xxx","threshold":0.3},{"model":"/xxx","threshold":0.3},{"model":"CONSTRUCTION_VEHICLE/DETECT_LP_4CLASSES.conf","threshold":0.3},{"model":"CONSTRUCTION_VEHICLE/LPOCR_1L_LPRNET_COMPLEX.conf","threshold":0.3}],"tracker":1,"type":2}
    
  • SQL语句
    1
    
    insert into algorithm (id, name, product, vendor, detector_path, model_conf, time) values (3, "工地车辆检测", "loya", "loya", "/data/static/models/CONSTRUCTION_VEHICLE/detector.json", "{'models':[{'model':'CONSTRUCTION_VEHICLE/DETECT_4CLASSES.conf','threshold':0.3},{'model':'/xxx','threshold':0.3},{'model':'/xxx','threshold':0.3},{'model':'CONSTRUCTION_VEHICLE/DETECT_LP_4CLASSES.conf','threshold':0.3},{'model':'CONSTRUCTION_VEHICLE/LPOCR_1L_LPRNET_COMPLEX.conf','threshold':0.3}],'tracker':1,'type':2}", "2023-7-26 14:18:33");
    

本地视频转rtsp流

1
ffmpeg    -re  -i  /home/user/zjy-190/Videos/vehcile/zhongshanlu.mp4    -vcodec h264 -acodec aac -strict -2   -f rtsp -rtsp_transport tcp  rtsp://127.0.0.1/live/test1