From a45d17ffe3f6f3435228319171b2efda7484f01d Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 20 Jun 2016 05:37:21 +0000
Subject: [PATCH] yolo demo low latency
---
cfg/xyolo.test.cfg | 15 +++++----------
src/yolo_demo.c | 11 +++++++++++
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/cfg/xyolo.test.cfg b/cfg/xyolo.test.cfg
index 2259679..5f3e6f4 100644
--- a/cfg/xyolo.test.cfg
+++ b/cfg/xyolo.test.cfg
@@ -13,15 +13,6 @@
scales=5,5,2,2,.1,.1
max_batches = 40000
-[crop]
-crop_width=448
-crop_height=448
-flip=0
-angle=0
-saturation = 1.5
-exposure = 1.5
-noadjust=1
-
[convolutional]
batch_normalize=1
filters=16
@@ -112,6 +103,7 @@
[batchnorm]
[convolutional]
+xnor = 1
batch_normalize=1
filters=1024
size=3
@@ -119,12 +111,15 @@
pad=1
activation=leaky
+[batchnorm]
+
[convolutional]
+xnor = 1
batch_normalize=1
+filters=256
size=3
stride=1
pad=1
-filters=128
activation=leaky
[connected]
diff --git a/src/yolo_demo.c b/src/yolo_demo.c
index ec29984..377218d 100644
--- a/src/yolo_demo.c
+++ b/src/yolo_demo.c
@@ -98,6 +98,7 @@
while(1){
struct timeval tval_before, tval_after, tval_result;
gettimeofday(&tval_before, NULL);
+ /*
if(pthread_create(&fetch_thread, 0, fetch_in_thread, 0)) error("Thread creation failed");
if(pthread_create(&detect_thread, 0, detect_in_thread, 0)) error("Thread creation failed");
show_image(disp, "YOLO");
@@ -109,6 +110,16 @@
disp = det;
det = in;
det_s = in_s;
+ */
+
+ fetch_in_thread(0);
+ det = in;
+ det_s = in_s;
+ detect_in_thread(0);
+ disp = det;
+ show_image(disp, "YOLO");
+ free_image(disp);
+ cvWaitKey(1);
gettimeofday(&tval_after, NULL);
timersub(&tval_after, &tval_before, &tval_result);
--
Gitblit v1.10.0