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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34806812/article/details/84030497

对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 

猜你喜欢

转载自blog.csdn.net/qq_34806812/article/details/84030497
今日推荐