mirror of https://github.com/AlexeyAB/darknet.git
This commit is contained in:
parent
ab75d5c578
commit
6bfd380bc1
4
Makefile
4
Makefile
|
@ -1,9 +1,9 @@
|
||||||
GPU=0
|
GPU=0
|
||||||
|
OPENCV=1
|
||||||
CUDNN=0
|
CUDNN=0
|
||||||
OPENCV=0
|
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
|
|
||||||
ARCH= --gpu-architecture=compute_52 --gpu-code=compute_52
|
ARCH= --gpu-architecture=compute_52 --gpu-code=compute_52
|
||||||
|
|
||||||
VPATH=./src/
|
VPATH=./src/
|
||||||
EXEC=darknet
|
EXEC=darknet
|
||||||
|
|
|
@ -87,8 +87,6 @@ void demo_coco(char *cfgfile, char *weightfile, float thresh, int cam_index, con
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!cap) error("Couldn't connect to webcam.\n");
|
if(!cap) error("Couldn't connect to webcam.\n");
|
||||||
cvNamedWindow("COCO", CV_WINDOW_NORMAL);
|
|
||||||
cvResizeWindow("COCO", 512, 512);
|
|
||||||
|
|
||||||
detection_layer l = net.layers[net.n-1];
|
detection_layer l = net.layers[net.n-1];
|
||||||
int j;
|
int j;
|
||||||
|
@ -123,16 +121,22 @@ void demo_coco(char *cfgfile, char *weightfile, float thresh, int cam_index, con
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
cvNamedWindow("COCO", CV_WINDOW_NORMAL);
|
||||||
|
cvMoveWindow("COCO", 0, 0);
|
||||||
|
cvResizeWindow("COCO", 1352, 1013);
|
||||||
|
|
||||||
while(1){
|
while(1){
|
||||||
++count;
|
++count;
|
||||||
struct timeval tval_before, tval_after, tval_result;
|
struct timeval tval_before, tval_after, tval_result;
|
||||||
gettimeofday(&tval_before, NULL);
|
gettimeofday(&tval_before, NULL);
|
||||||
if(pthread_create(&fetch_thread, 0, fetch_in_thread_coco, 0)) error("Thread creation failed");
|
if(pthread_create(&fetch_thread, 0, fetch_in_thread_coco, 0)) error("Thread creation failed");
|
||||||
if(pthread_create(&detect_thread, 0, detect_in_thread_coco, 0)) error("Thread creation failed");
|
if(pthread_create(&detect_thread, 0, detect_in_thread_coco, 0)) error("Thread creation failed");
|
||||||
//show_image(disp, "COCO");
|
show_image(disp, "COCO");
|
||||||
|
/*
|
||||||
char buff[256];
|
char buff[256];
|
||||||
sprintf(buff, "/home/pjreddie/coco/coco_%05d", count);
|
sprintf(buff, "/home/pjreddie/coco/coco_%05d", count);
|
||||||
save_image(disp, buff);
|
save_image(disp, buff);
|
||||||
|
*/
|
||||||
|
|
||||||
free_image(disp);
|
free_image(disp);
|
||||||
cvWaitKey(10);
|
cvWaitKey(10);
|
||||||
|
|
|
@ -99,6 +99,10 @@ extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam
|
||||||
det = in;
|
det = in;
|
||||||
det_s = in_s;
|
det_s = in_s;
|
||||||
|
|
||||||
|
cvNamedWindow("YOLO", CV_WINDOW_NORMAL);
|
||||||
|
cvMoveWindow("YOLO", 0, 0);
|
||||||
|
cvResizeWindow("YOLO", 1352, 1013);
|
||||||
|
|
||||||
while(1){
|
while(1){
|
||||||
struct timeval tval_before, tval_after, tval_result;
|
struct timeval tval_before, tval_after, tval_result;
|
||||||
gettimeofday(&tval_before, NULL);
|
gettimeofday(&tval_before, NULL);
|
||||||
|
|
Loading…
Reference in New Issue