updates and things

This commit is contained in:
Joseph Redmon
2016-09-01 16:48:41 -07:00
parent aebe937710
commit 8f1b4e0962
45 changed files with 44944 additions and 2747 deletions

View File

@ -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 *fetch_in_thread(void *ptr)
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,13 +153,19 @@ void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const ch
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, "Demo");
int c = cvWaitKey(1);
if (c == 10){
if(frame_skip == 0) frame_skip = 60;
else if(frame_skip == 4) frame_skip = 0;
else if(frame_skip == 60) frame_skip = 4;
else frame_skip = 0;
if(1){
show_image(disp, "Demo");
int c = cvWaitKey(1);
if (c == 10){
if(frame_skip == 0) frame_skip = 60;
else if(frame_skip == 4) frame_skip = 0;
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);