diff --git a/README.md b/README.md index 7634daf6..6b98f506 100644 --- a/README.md +++ b/README.md @@ -413,7 +413,7 @@ Example of custom object detection: `darknet.exe detector test data/obj.data yol * increase network resolution in your `.cfg`-file (`height=608`, `width=608` or any value multiple of 32) - it will increase precision * recalculate anchors for your dataset for `width` and `height` from cfg-file: - `darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -heigh 416` + `darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -height 416` then set the same 9 `anchors` in each of 3 `[yolo]`-layers in your cfg-file * desirable that your training dataset include images with objects at diffrent: scales, rotations, lightings, from different sides, on different backgrounds diff --git a/build/darknet/x64/calc_anchors.cmd b/build/darknet/x64/calc_anchors.cmd index 1c7d2d8f..45bb6ff9 100644 --- a/build/darknet/x64/calc_anchors.cmd +++ b/build/darknet/x64/calc_anchors.cmd @@ -1,10 +1,10 @@ rem # How to calculate Yolo v2 anchors using K-means++ -darknet.exe detector calc_anchors data/voc.data -num_of_clusters 9 -width 416 -heigh 416 +darknet.exe detector calc_anchors data/voc.data -num_of_clusters 9 -width 416 -height 416 -rem darknet.exe detector calc_anchors data/voc.data -num_of_clusters 9 -width 416 -heigh 416 -show +rem darknet.exe detector calc_anchors data/voc.data -num_of_clusters 9 -width 416 -height 416 -show diff --git a/src/box.c b/src/box.c index 00e3edbf..a2c676f2 100644 --- a/src/box.c +++ b/src/box.c @@ -294,7 +294,6 @@ int nms_comparator_v3(const void *pa, const void *pb) void do_nms_obj(detection *dets, int total, int classes, float thresh) { - printf(" total = %d, classes = %d, thresh = %f \n", total, classes, thresh); int i, j, k; k = total - 1; for (i = 0; i <= k; ++i) { diff --git a/src/detector.c b/src/detector.c index 766819f1..082b7489 100644 --- a/src/detector.c +++ b/src/detector.c @@ -1107,7 +1107,7 @@ void run_detector(int argc, char **argv) int frame_skip = find_int_arg(argc, argv, "-s", 0); int num_of_clusters = find_int_arg(argc, argv, "-num_of_clusters", 5); int width = find_int_arg(argc, argv, "-width", 13); - int heigh = find_int_arg(argc, argv, "-heigh", 13); + int height = find_int_arg(argc, argv, "-height", 13); if(argc < 4){ fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]); return; @@ -1148,7 +1148,7 @@ void run_detector(int argc, char **argv) else if(0==strcmp(argv[2], "valid")) validate_detector(datacfg, cfg, weights, outfile); else if(0==strcmp(argv[2], "recall")) validate_detector_recall(datacfg, cfg, weights); else if(0==strcmp(argv[2], "map")) validate_detector_map(datacfg, cfg, weights, thresh); - else if(0==strcmp(argv[2], "calc_anchors")) calc_anchors(datacfg, num_of_clusters, width, heigh, show); + else if(0==strcmp(argv[2], "calc_anchors")) calc_anchors(datacfg, num_of_clusters, width, height, show); else if(0==strcmp(argv[2], "demo")) { list *options = read_data_cfg(datacfg); int classes = option_find_int(options, "classes", 20);