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.
|
1 year ago | |
---|---|---|
.. | ||
.vscode | 1 year ago | |
analysis_data | 1 year ago | |
analysis_result | 1 year ago | |
drawing_img | 1 year ago | |
model_file | 1 year ago | |
model_load | 1 year ago | |
.gitignore | 1 year ago | |
add_xml.py | 1 year ago | |
benchmark.md | 1 year ago | |
config_det.yaml | 1 year ago | |
config_person.yaml | 1 year ago | |
config_phone.yaml | 1 year ago | |
config_sleep.yaml | 1 year ago | |
create_xml.py | 1 year ago | |
main.py | 1 year ago | |
main_process.py | 1 year ago | |
readme.md | 1 year ago | |
utils.py | 1 year ago |
readme.md
1、主程序运行main.py文件
2、main.py文件中args加载检测配置文件config_det.yaml,这部分更改了使用相对路径,请按照示例格式设置路径
3、config_det.yaml中配置
# 名称随意,不可重复
detect_0:
# scource 设置rtsp流或者图片文件夹
source : rtsp://admin:@192.168.10.18
# 配置检测的模型配置文件
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_XXX.onnx
# 设置cache,不用更改
model_cache: /home/yaxin/xbank/xbank_poc_test/tensort_cache/yolov5_XXX.trt
# label and bbox message set
# 模型检测中需要的参数
model_parameter:
# 使用gpu检测
device : gpu
# 检测模型训练时的标签名列表,标签名顺序需要跟训练时候分配数据集时候的顺序一致,不用更改
label_names: ["Keypad","hands","keyboard", "mouse","phone"] # model labels
# 检测到的类别中需要挑选出来的目标
compara_label_names: ["hands","phone"]
# 是否对挑选出来进行推理的目标进行其标签框之间关系进行推理,如果不需要就设置成FALSE,默认不用更改
compara_relevancy: 'overlap' # 'in_bbox'
# 需要的参数
relevancy_para : 0
# 设置检测出来的目标过滤的置信度
confidence : 0.2
# 统计检测到的目标最低数量,不需要统计则设置为False
object_num_min : 5
# 保存检测后的图片的路径,不保存使用False
save_path : /home/yaxin/xbank/xbank_poc_test/save_path/hands
# 检测到的图片的原始图片的路径,不保存使用False
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
# 检测到的目标的图片是否保存检测信息为xml标注信息,不保存设置为False
save_annotations : False
# 保存检测到目标的视频片段
# save videos
# 视频保存路径,
save_videos : /home/xbank/xbank_poc_test_use/video_save_path/person
# 检测中时长的判断
detect time set
# 保存的长视频的时长,单位为s
detect_time : 60
# 判断是否为目标行为的时长,单位为S
detect_time_small : 5
# 在单位时长中,判定为目标行为的目标信息在总检测信息中的比例
detect_ratio : 0.9
5、使用本地环境 conda activate fastdeploy 修改过配置文件后,运行Python main.py