Joseph Redmon
2016-09-01 8f1b4e0962857d402f9d017fcbf387ef0eceb7c4
src/demo.c
@@ -8,7 +8,7 @@
#include "demo.h"
#include <sys/time.h>
#define FRAMES 1
#define FRAMES 3
#ifdef OPENCV
#include "opencv2/highgui/highgui_c.h"
@@ -48,7 +48,7 @@
void *detect_in_thread(void *ptr)
{
    float nms = .4;
    float nms = .1;
    detection_layer l = net.layers[net.n-1];
    float *X = det_s.data;
@@ -153,6 +153,7 @@
            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");
            if(1){
            show_image(disp, "Demo");
            int c = cvWaitKey(1);
            if (c == 10){
@@ -161,6 +162,11 @@
                else if(frame_skip == 60) frame_skip = 4;   
                else frame_skip = 0;
            }
            }else{
                char buff[256];
                sprintf(buff, "/home/pjreddie/tmp/bag_%07d", count);
                save_image(disp, buff);
            }
            pthread_join(fetch_thread, 0);
            pthread_join(detect_thread, 0);