diff --git a/src/parser.c b/src/parser.c index 8c645e6c..09abf2d4 100644 --- a/src/parser.c +++ b/src/parser.c @@ -517,7 +517,7 @@ layer parse_yolo(list *options, size_params params) l.random = option_find_float_quiet(options, "random", 0); l.track_history_size = option_find_int_quiet(options, "track_history_size", 5); - l.sim_thresh = option_find_int_quiet(options, "sim_thresh", 0.8); + l.sim_thresh = option_find_float_quiet(options, "sim_thresh", 0.8); l.dets_for_track = option_find_int_quiet(options, "dets_for_track", 1); l.dets_for_show = option_find_int_quiet(options, "dets_for_show", 1); l.track_ciou_norm = option_find_float_quiet(options, "track_ciou_norm", 0.01); diff --git a/src/yolo.c b/src/yolo.c index dd5e2a16..44f7c5a5 100644 --- a/src/yolo.c +++ b/src/yolo.c @@ -190,7 +190,6 @@ void validate_yolo(char *cfgfile, char *weightfile) } } - if (fps) free(fps); if (val) free(val); if (val_resized) free(val_resized); if (buf) free(buf); @@ -198,10 +197,12 @@ void validate_yolo(char *cfgfile, char *weightfile) if (thr) free(thr); fprintf(stderr, "Total Detection Time: %f Seconds\n", (double)(time(0) - start)); - for(j = 0; j < classes; ++j){ - fclose(fps[j]); + if (fps) { + for(j = 0; j < classes; ++j){ + fclose(fps[j]); + } + free(fps); } - free(fps); } void validate_yolo_recall(char *cfgfile, char *weightfile)