YOLO-V3 视频检测函数流程解读 demo()

对demo函数的理解:

demo.h的声明:

void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show, int ext_output);

YOLO-V3的demo命令的函数运行路径:detector.c中的 else if(0==strcmp(argv[2], "demo")  --> demo.c中的void demo()

detector.c中的demo调用:

demo(cfg, weights, thresh, hier_thresh, cam_index, filename, names, classes, frame_skip, prefix, out_filename,
            http_stream_port, dont_show, ext_output);

demo.c中的demos定义: 

void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int cam_index, const char *filename, char **names, int classes,
    int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show, int ext_output)

对于参数prefix,frame——skip,out_filename需要研究下

 

20181018工作节点:追溯show_img图片的处理函数。

 detector.c中的run_detector函数:

 find_arg():从输入的命令(argv[])中遍历,找到*arg的字符串后,return 1,否则return 0;

 

demo() 命令中的参数意义

命令带 “ -http_port 8090" 参数后,会把结果视频传到 localhost:8090 地址 ,同时弹出demo窗口。

命令中带有”-prefix name“会在目录下存储处理后的每一帧图片,命名为:name_ 00000001.jpg 

 

 

 

  • 1
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值