From 0713fd9784bbd0c67eb82df6f6e2c072a53e09e8 Mon Sep 17 00:00:00 2001
From: Alexey <AlexeyAB@users.noreply.github.com>
Date: Thu, 31 May 2018 11:20:19 +0000
Subject: [PATCH] Merge pull request #936 from IlyaOvodov/Fix_GrayScale_PR
---
src/yolo_layer.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/yolo_layer.c b/src/yolo_layer.c
index 87dedae..c1309c8 100644
--- a/src/yolo_layer.c
+++ b/src/yolo_layer.c
@@ -201,7 +201,10 @@
for(t = 0; t < l.max_boxes; ++t){
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) continue; // if label contains class_id more than number of classes in the cfg-file
+ if (class_id >= l.classes) {
+ printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes);
+ continue; // if label contains class_id more than number of classes in the cfg-file
+ }
if(!truth.x) break;
float iou = box_iou(pred, truth);
if (iou > best_iou) {
--
Gitblit v1.10.0