From 9ba0beb413d8b443376c36c1701a0dbce1e8d566 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 17 May 2018 14:02:42 +0000
Subject: [PATCH] Fixed resize of network for low resolution network like 128x128
---
src/detector.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/detector.c b/src/detector.c
index bed7467..b7fbfbd 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -132,6 +132,8 @@
int random_val = rand() % 12;
int dim_w = (random_val + (init_w / 32 - 5)) * 32; // +-160
int dim_h = (random_val + (init_h / 32 - 5)) * 32; // +-160
+ if (dim_w < 32) dim_w = 32;
+ if (dim_h < 32) dim_h = 32;
printf("%d x %d \n", dim_w, dim_h);
args.w = dim_w;
@@ -479,6 +481,7 @@
find_replace(labelpath, ".bmp", ".txt", labelpath);
find_replace(labelpath, ".JPG", ".txt", labelpath);
find_replace(labelpath, ".JPEG", ".txt", labelpath);
+ find_replace(labelpath, ".ppm", ".txt", labelpath);
int num_labels = 0;
box_label *truth = read_boxes(labelpath, &num_labels);
@@ -636,6 +639,7 @@
find_replace(labelpath, ".bmp", ".txt", labelpath);
find_replace(labelpath, ".JPG", ".txt", labelpath);
find_replace(labelpath, ".JPEG", ".txt", labelpath);
+ find_replace(labelpath, ".ppm", ".txt", labelpath);
int num_labels = 0;
box_label *truth = read_boxes(labelpath, &num_labels);
int i, j;
@@ -899,6 +903,7 @@
find_replace(labelpath, ".bmp", ".txt", labelpath);
find_replace(labelpath, ".JPG", ".txt", labelpath);
find_replace(labelpath, ".JPEG", ".txt", labelpath);
+ find_replace(labelpath, ".ppm", ".txt", labelpath);
int num_labels = 0;
box_label *truth = read_boxes(labelpath, &num_labels);
//printf(" new path: %s \n", labelpath);
--
Gitblit v1.10.0