From c53e03348c65462bcba33f6352087dd6b9268e8f Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 16 Sep 2015 21:12:10 +0000
Subject: [PATCH] yolo working w/ regions

---
 src/data.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/data.c b/src/data.c
index 003338e..17772c1 100644
--- a/src/data.c
+++ b/src/data.c
@@ -176,8 +176,10 @@
         int index = (col+row*num_boxes)*(5+classes);
         if (truth[index]) continue;
         truth[index++] = 1;
-        if (classes) truth[index+id] = 1;
+
+        if (id < classes) truth[index+id] = 1;
         index += classes;
+
         truth[index++] = x;
         truth[index++] = y;
         truth[index++] = w;

--
Gitblit v1.10.0