From c40cdeb4021fc1a638969563972f13c9f5e90d74 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 09 Oct 2015 19:50:43 +0000
Subject: [PATCH] lots of comparator stuff
---
src/yolo.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/yolo.c b/src/yolo.c
index 9b229e2..4b241f3 100644
--- a/src/yolo.c
+++ b/src/yolo.c
@@ -65,7 +65,6 @@
if(weightfile){
load_weights(&net, weightfile);
}
- detection_layer layer = get_network_detection_layer(net);
int imgs = 128;
int i = *net.seen/imgs;
@@ -74,11 +73,16 @@
int N = plist->size;
paths = (char **)list_to_array(plist);
+ if(i*imgs > N*80){
+ net.layers[net.n-1].objectness = 0;
+ net.layers[net.n-1].joint = 1;
+ }
if(i*imgs > N*120){
net.layers[net.n-1].rescore = 1;
}
data train, buffer;
+ detection_layer layer = get_network_detection_layer(net);
int classes = layer.classes;
int background = layer.objectness;
int side = sqrt(get_detection_layer_locations(layer));
@@ -290,14 +294,16 @@
set_batch_network(&net, 1);
srand(2222222);
clock_t time;
- char input[256];
+ char buff[256];
+ char *input = buff;
while(1){
if(filename){
strncpy(input, filename, 256);
} else {
printf("Enter Image Path: ");
fflush(stdout);
- fgets(input, 256, stdin);
+ input = fgets(input, 256, stdin);
+ if(!input) return;
strtok(input, "\n");
}
image im = load_image_color(input,0,0);
--
Gitblit v1.10.0