1. 程式人生 > >【未完成】yolo目標裁剪儲存

【未完成】yolo目標裁剪儲存

 

YOLO-V3的執行函式路徑為:detector.c中的test_detector()  --> image.c中的draw_detections_v3()

YOLO-V2的執行函式路徑為:yolo.c中的test_yolo()  -->  image.c中的draw_detections()

detector.c中的命令傳入介面:

box.h中的結構體定義:

image.c中的get_actual_detections方法:

classes變數在layer.h的結構體layer中:

image.c中的draw_detections_v3函式解讀:

 

2. 對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;

命令帶 “ -http_port 8090" 引數後,會把結果視訊傳到 localhost:8090 地址 ,同時彈出demo視窗。

命令中帶有”-prefix name“會在目錄下儲存處理後的每一幀圖片,命名為:name_ 00000001.jpg

問題:save_cut_image重定義:不同的基型別

解決:在image.h標頭檔案中複製一下定義就好。