From a6c51e3b758aee7fd3a6f1d37daa8dcad4891e52 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 08 Mar 2018 22:42:58 +0000
Subject: [PATCH] Fixes for small objects. And fixes of densenet201_yolo.cfg, resnet50_yolo.cfg, resnet152_yolo.cfg
---
src/data.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/data.c b/src/data.c
index fbaa7fb..6187b34 100644
--- a/src/data.c
+++ b/src/data.c
@@ -326,7 +326,7 @@
id = boxes[i].id;
// not detect small objects
- if ((w < 0.01 || h < 0.01)) continue;
+ if ((w < 0.001 || h < 0.001)) { printf("small w = %f, h = %f \n", w, h); continue; }
truth[i*5+0] = x;
truth[i*5+1] = y;
@@ -967,8 +967,8 @@
for(i = 0; i < 10000; ++i){
unsigned char bytes[3073];
fread(bytes, 1, 3073, fp);
- int class = bytes[0];
- y.vals[i][class] = 1;
+ int class_id = bytes[0];
+ y.vals[i][class_id] = 1;
for(j = 0; j < X.cols; ++j){
X.vals[i][j] = (double)bytes[j+1];
}
@@ -1031,8 +1031,8 @@
for(i = 0; i < 10000; ++i){
unsigned char bytes[3073];
fread(bytes, 1, 3073, fp);
- int class = bytes[0];
- y.vals[i+b*10000][class] = 1;
+ int class_id = bytes[0];
+ y.vals[i+b*10000][class_id] = 1;
for(j = 0; j < X.cols; ++j){
X.vals[i+b*10000][j] = (double)bytes[j+1];
}
--
Gitblit v1.10.0