From c1bb8c129d7d4d8fc85348d5e7ac5441fa36ead5 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sat, 19 May 2018 13:52:05 +0000
Subject: [PATCH] Fixed xnor for random=1
---
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