From ba70801e982ada241ced55bedad2a411da1896c4 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 01 Jun 2018 11:58:30 +0000
Subject: [PATCH] Minor fixes

---
 build/darknet/x64/partial.cmd |    2 +-
 src/region_layer.c            |    3 ++-
 src/yolo_layer.c              |    3 ++-
 src/utils.c                   |    3 +++
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/build/darknet/x64/partial.cmd b/build/darknet/x64/partial.cmd
index a6ac262..acbe3fa 100644
--- a/build/darknet/x64/partial.cmd
+++ b/build/darknet/x64/partial.cmd
@@ -18,7 +18,7 @@
 darknet.exe partial cfg/yolov2.cfg yolov2.weights yolov2.conv.23 23
 
 
-darknet.exe partial cfg/yolov3.cfg yolov3.weights yolov3.conv.105 105
+darknet.exe partial cfg/yolov3.cfg yolov3.weights yolov3.conv.81 81
 
 
 darknet.exe partial cfg/yolov3-tiny.cfg yolov3-tiny.weights yolov3-tiny.conv.15 15
diff --git a/src/region_layer.c b/src/region_layer.c
index a2ca440..4e1e03a 100644
--- a/src/region_layer.c
+++ b/src/region_layer.c
@@ -297,7 +297,8 @@
             box truth = float_to_box(state.truth + t*5 + b*l.truths);
 			int class_id = state.truth[t * 5 + b*l.truths + 4];
 			if (class_id >= l.classes) {
-				printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes);
+				printf(" Warning: in txt-labels class_id=%d >= classes=%d in cfg-file. In txt-labels class_id should be [from 0 to %d] \n", class_id, l.classes, l.classes-1);
+				getchar();
 				continue; // if label contains class_id more than number of classes in the cfg-file
 			}
 
diff --git a/src/utils.c b/src/utils.c
index 7b25e9c..f1cc21a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -212,6 +212,9 @@
 	//find_replace(output_path, "JPEGImages", "labels", output_path);	// PascalVOC
 	find_replace(output_path, "VOC2007/JPEGImages", "VOC2007/labels", output_path);		// PascalVOC
 	find_replace(output_path, "VOC2012/JPEGImages", "VOC2012/labels", output_path);		// PascalVOC
+
+	//find_replace(output_path, "/raw/", "/labels/", output_path);
+
 	// replace only ext of files
 	find_replace_extension(output_path, ".jpg", ".txt", output_path);
 	find_replace_extension(output_path, ".JPG", ".txt", output_path); // error
diff --git a/src/yolo_layer.c b/src/yolo_layer.c
index c1309c8..f79bc41 100644
--- a/src/yolo_layer.c
+++ b/src/yolo_layer.c
@@ -202,7 +202,8 @@
                         box truth = float_to_box_stride(state.truth + t*(4 + 1) + b*l.truths, 1);
 						int class_id = state.truth[t*(4 + 1) + b*l.truths + 4];
 						if (class_id >= l.classes) {
-							printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes);
+							printf(" Warning: in txt-labels class_id=%d >= classes=%d in cfg-file. In txt-labels class_id should be [from 0 to %d] \n", class_id, l.classes, l.classes - 1);
+							getchar();
 							continue; // if label contains class_id more than number of classes in the cfg-file
 						}
                         if(!truth.x) break;

--
Gitblit v1.10.0