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/data.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/data.c b/src/data.c
index 3b014b4..8da1234 100644
--- a/src/data.c
+++ b/src/data.c
@@ -137,7 +137,10 @@
{
box_label *boxes = calloc(1, sizeof(box_label));
FILE *file = fopen(filename, "r");
- if(!file) file_error(filename);
+ if (!file) {
+ printf("Can't open label file. \n");
+ file_error(filename);
+ }
float x, y, h, w;
int id;
int count = 0;
@@ -215,6 +218,7 @@
find_replace(labelpath, ".jpg", ".txt", labelpath);
find_replace(labelpath, ".JPG", ".txt", labelpath);
find_replace(labelpath, ".JPEG", ".txt", labelpath);
+ find_replace(labelpath, ".ppm", ".txt", labelpath);
int count = 0;
box_label *boxes = read_boxes(labelpath, &count);
@@ -255,6 +259,7 @@
find_replace(labelpath, ".png", ".txt", labelpath);
find_replace(labelpath, ".JPG", ".txt", labelpath);
find_replace(labelpath, ".JPEG", ".txt", labelpath);
+ find_replace(labelpath, ".ppm", ".txt", labelpath);
int count = 0;
box_label *boxes = read_boxes(labelpath, &count);
randomize_boxes(boxes, count);
@@ -306,6 +311,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 count = 0;
int i;
box_label *boxes = read_boxes(labelpath, &count);
--
Gitblit v1.10.0