You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
1、主程序运行main.py文件
2、main.py文件中args加载检测配置文件config_det.yaml, 为了保证路径没问题, 请设置绝对路径
3、config_det.yaml中配置
detect_0: # 名称随意,不可重复
source : rtsp://admin:@192.168.10.18 # scource 设置rtsp流或者图片文件夹
model: /home/yaxin/xbank/xbank_poc_test/config_phone.yaml # 配置检测的模型配置文件
4、模型配置文件, config_检测名称.yaml
# load model file
model: /home/yaxin/xbank/xbank_poc_test/model_file/yolov5.onnx # 模型的绝对路径
model_cache: /home/yaxin/xbank/xbank_poc_test/tensort_cache/yolov5.trt # 设置cache, 不用更改
# label and bbox message set
model_parameter: # 模型检测中需要的参数
device : gpu # 使用gpu检测
label_names: ["Keypad","hands","keyboard", "mouse","phone"] # model labels # 检测模型训练时的标签名列表,标签名顺序需要跟训练时候分配数据集时候的顺序一致,不用更改
compara_label_names: ["hands","phone"] # # 检测到的类别中需要挑选出来的目标
compara_relevancy: 'overlap' # 'in_bbox' # 是否对挑选出来进行推理的目标进行其标签框之间关系进行推理, 如果不需要就设置成FALSE, 默认不用更改
relevancy_para : 0 # 需要的参数
confidence : 0.2 # 设置检测出来的目标过滤的置信度
save_path : /home/yaxin/xbank/xbank_poc_test/save_path/hands # 保存检测后的图片的路径,默认不需要更改
# save_path_original : /home/yaxin/xbank/xbank_poc_test/save_path_original/hands # 检测到的图片的原始图片的路径, 不保存使用False
# test_path : /home/yaxin/xbank/xbank_poc_test/test_save_path/hands # 未检测到目标的图片, 不保存设置为False, 默认保存
5、使用本地环境
conda activate fastdeploy
修改过配置文件后, 运行Python main.py