mirror of https://github.com/AlexeyAB/darknet.git
parent
2710d63257
commit
5b6dd3a07c
17 changed files with 1571 additions and 358 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,133 @@ |
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. |
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of |
||||
the C library, however. The master source lives in /gd/gnu/lib. |
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU Library General Public License as |
||||
published by the Free Software Foundation; either version 2 of the |
||||
License, or (at your option) any later version. |
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
Library General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU Library General Public |
||||
License along with the GNU C Library; see the file COPYING.LIB. If |
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave, |
||||
Cambridge, MA 02139, USA. */ |
||||
|
||||
#ifndef _GETOPT_H |
||||
#define _GETOPT_H 1 |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument, |
||||
the argument value is returned here. |
||||
Also, when `ordering' is RETURN_IN_ORDER, |
||||
each non-option ARGV-element is returned here. */ |
||||
|
||||
extern char *optarg; |
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller |
||||
and for communication between successive calls to `getopt'. |
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize. |
||||
|
||||
When `getopt' returns EOF, this is the index of the first of the |
||||
non-option elements that the caller should itself scan. |
||||
|
||||
Otherwise, `optind' communicates from one call to the next |
||||
how much of ARGV has been scanned so far. */ |
||||
|
||||
extern int optind; |
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */ |
||||
|
||||
extern int opterr; |
||||
|
||||
/* Set to an option character which was unrecognized. */ |
||||
|
||||
extern int optopt; |
||||
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector |
||||
of `struct option' terminated by an element containing a name which is |
||||
zero. |
||||
|
||||
The field `has_arg' is: |
||||
no_argument (or 0) if the option does not take an argument, |
||||
required_argument (or 1) if the option requires an argument, |
||||
optional_argument (or 2) if the option takes an optional argument. |
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set |
||||
to the value given in the field `val' when the option is found, but |
||||
left unchanged if the option is not found. |
||||
|
||||
To have a long-named option do something other than set an `int' to |
||||
a compiled-in constant, such as set a value from `optarg', set the |
||||
option's `flag' field to zero and its `val' field to a nonzero |
||||
value (the equivalent single-letter option character, if there is |
||||
one). For long options that have a zero `flag' field, `getopt' |
||||
returns the contents of the `val' field. */ |
||||
|
||||
struct option |
||||
{ |
||||
#if defined (__STDC__) && __STDC__ |
||||
const char *name; |
||||
#else |
||||
char *name; |
||||
#endif |
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */ |
||||
int has_arg; |
||||
int *flag; |
||||
int val; |
||||
}; |
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */ |
||||
|
||||
#define no_argument 0 |
||||
#define required_argument 1 |
||||
#define optional_argument 2 |
||||
|
||||
#if defined (__STDC__) && __STDC__ |
||||
#ifdef __GNU_LIBRARY__ |
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation |
||||
errors, only prototype getopt for the GNU C library. */ |
||||
extern int getopt (int argc, char *const *argv, const char *shortopts); |
||||
#else /* not __GNU_LIBRARY__ */ |
||||
extern int getopt (); |
||||
#endif /* __GNU_LIBRARY__ */ |
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts, |
||||
const struct option *longopts, int *longind); |
||||
extern int getopt_long_only (int argc, char *const *argv, |
||||
const char *shortopts, |
||||
const struct option *longopts, int *longind); |
||||
|
||||
/* Internal only. Users should not call this directly. */ |
||||
extern int _getopt_internal (int argc, char *const *argv, |
||||
const char *shortopts, |
||||
const struct option *longopts, int *longind, |
||||
int long_only); |
||||
#else /* not __STDC__ */ |
||||
extern int getopt (); |
||||
extern int getopt_long (); |
||||
extern int getopt_long_only (); |
||||
|
||||
extern int _getopt_internal (); |
||||
#endif /* __STDC__ */ |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* _GETOPT_H */ |
@ -0,0 +1,49 @@ |
||||
#include "gettimeofday.h" |
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz) |
||||
{ |
||||
FILETIME ft; |
||||
unsigned __int64 tmpres = 0; |
||||
static int tzflag; |
||||
|
||||
if (NULL != tv) |
||||
{ |
||||
GetSystemTimeAsFileTime(&ft); |
||||
|
||||
tmpres |= ft.dwHighDateTime; |
||||
tmpres <<= 32; |
||||
tmpres |= ft.dwLowDateTime; |
||||
|
||||
/*converting file time to unix epoch*/ |
||||
tmpres -= DELTA_EPOCH_IN_MICROSECS;
|
||||
tmpres /= 10; /*convert into microseconds*/ |
||||
tv->tv_sec = (long)(tmpres / 1000000UL); |
||||
tv->tv_usec = (long)(tmpres % 1000000UL); |
||||
} |
||||
|
||||
if (NULL != tz) |
||||
{ |
||||
if (!tzflag) |
||||
{ |
||||
_tzset(); |
||||
tzflag++; |
||||
} |
||||
tz->tz_minuteswest = _timezone / 60; |
||||
tz->tz_dsttime = _daylight; |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
/* never worry about timersub type activies again -- from GLIBC and upcased. */ |
||||
int timersub(struct timeval *a, struct timeval *b, struct timeval *result) |
||||
{
|
||||
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec;
|
||||
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec;
|
||||
if ((result)->tv_usec < 0) {
|
||||
--(result)->tv_sec;
|
||||
(result)->tv_usec += 1000000;
|
||||
}
|
||||
|
||||
return 0; |
||||
} |
@ -0,0 +1,20 @@ |
||||
#pragma once |
||||
|
||||
#include < time.h > |
||||
#include <windows.h> //I've ommited this line. |
||||
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) |
||||
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 |
||||
#else |
||||
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL |
||||
#endif |
||||
|
||||
struct timezone
|
||||
{ |
||||
int tz_minuteswest; /* minutes W of Greenwich */ |
||||
int tz_dsttime; /* type of dst correction */ |
||||
}; |
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz); |
||||
|
||||
/* never worry about timersub type activies again -- from GLIBC and upcased. */ |
||||
int timersub(struct timeval *a, struct timeval *b, struct timeval *result); |
@ -1,205 +0,0 @@ |
||||
#include <stdio.h> /* needed for sockaddr_in */ |
||||
#include <string.h> /* needed for sockaddr_in */ |
||||
#include <unistd.h> |
||||
#include <sys/types.h> |
||||
#include <sys/socket.h> |
||||
#include <netinet/in.h> /* needed for sockaddr_in */ |
||||
#include <netdb.h> |
||||
#include <pthread.h> |
||||
#include <time.h> |
||||
|
||||
#include "mini_blas.h" |
||||
#include "utils.h" |
||||
#include "parser.h" |
||||
#include "server.h" |
||||
#include "connected_layer.h" |
||||
#include "convolutional_layer.h" |
||||
|
||||
#define SERVER_PORT 9423 |
||||
#define STR(x) #x |
||||
|
||||
int socket_setup(int server) |
||||
{ |
||||
int fd = 0; /* our socket */ |
||||
struct sockaddr_in me; /* our address */ |
||||
|
||||
/* create a UDP socket */ |
||||
|
||||
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { |
||||
error("cannot create socket"); |
||||
} |
||||
|
||||
/* bind the socket to any valid IP address and a specific port */ |
||||
if (server == 1){ |
||||
bzero((char *) &me, sizeof(me)); |
||||
me.sin_family = AF_INET; |
||||
me.sin_addr.s_addr = htonl(INADDR_ANY); |
||||
me.sin_port = htons(SERVER_PORT); |
||||
|
||||
if (bind(fd, (struct sockaddr *)&me, sizeof(me)) < 0) { |
||||
error("bind failed"); |
||||
} |
||||
} |
||||
|
||||
return fd; |
||||
} |
||||
|
||||
typedef struct{ |
||||
int fd; |
||||
int counter; |
||||
network net; |
||||
} connection_info; |
||||
|
||||
void read_and_add_into(int fd, float *a, int n) |
||||
{ |
||||
float *buff = calloc(n, sizeof(float)); |
||||
read_all(fd, (char*) buff, n*sizeof(float)); |
||||
axpy_cpu(n, 1, buff, 1, a, 1); |
||||
free(buff); |
||||
} |
||||
|
||||
void handle_connection(void *pointer) |
||||
{ |
||||
connection_info info = *(connection_info *) pointer; |
||||
free(pointer); |
||||
//printf("New Connection\n");
|
||||
if(info.counter%100==0){ |
||||
char buff[256]; |
||||
sprintf(buff, "unikitty/net_%d.part", info.counter); |
||||
save_network(info.net, buff); |
||||
} |
||||
int fd = info.fd; |
||||
network net = info.net; |
||||
int i; |
||||
for(i = 0; i < net.n; ++i){ |
||||
if(net.types[i] == CONVOLUTIONAL){ |
||||
convolutional_layer layer = *(convolutional_layer *) net.layers[i]; |
||||
|
||||
read_and_add_into(fd, layer.bias_updates, layer.n); |
||||
int num = layer.n*layer.c*layer.size*layer.size; |
||||
read_and_add_into(fd, layer.filter_updates, num); |
||||
} |
||||
if(net.types[i] == CONNECTED){ |
||||
connected_layer layer = *(connected_layer *) net.layers[i]; |
||||
|
||||
read_and_add_into(fd, layer.bias_updates, layer.outputs); |
||||
read_and_add_into(fd, layer.weight_updates, layer.inputs*layer.outputs); |
||||
} |
||||
} |
||||
for(i = 0; i < net.n; ++i){ |
||||
if(net.types[i] == CONVOLUTIONAL){ |
||||
convolutional_layer layer = *(convolutional_layer *) net.layers[i]; |
||||
update_convolutional_layer(layer); |
||||
|
||||
write_all(fd, (char*) layer.biases, layer.n*sizeof(float)); |
||||
int num = layer.n*layer.c*layer.size*layer.size; |
||||
write_all(fd, (char*) layer.filters, num*sizeof(float)); |
||||
} |
||||
if(net.types[i] == CONNECTED){ |
||||
connected_layer layer = *(connected_layer *) net.layers[i]; |
||||
update_connected_layer(layer); |
||||
write_all(fd, (char *)layer.biases, layer.outputs*sizeof(float)); |
||||
write_all(fd, (char *)layer.weights, layer.outputs*layer.inputs*sizeof(float)); |
||||
} |
||||
} |
||||
//printf("Received updates\n");
|
||||
close(fd); |
||||
} |
||||
|
||||
void server_update(network net) |
||||
{ |
||||
int fd = socket_setup(1); |
||||
int counter = 18000; |
||||
listen(fd, 64); |
||||
struct sockaddr_in client; /* remote address */ |
||||
socklen_t client_size = sizeof(client); /* length of addresses */ |
||||
time_t t=0; |
||||
while(1){ |
||||
connection_info *info = calloc(1, sizeof(connection_info)); |
||||
info->net = net; |
||||
info->counter = counter; |
||||
pthread_t worker; |
||||
int connection = accept(fd, (struct sockaddr *) &client, &client_size); |
||||
if(!t) t=time(0); |
||||
info->fd = connection; |
||||
pthread_create(&worker, NULL, (void *) &handle_connection, info); |
||||
++counter; |
||||
printf("%d\n", counter); |
||||
//if(counter == 1024) break;
|
||||
} |
||||
close(fd); |
||||
} |
||||
|
||||
void client_update(network net, char *address) |
||||
{ |
||||
int fd = socket_setup(0); |
||||
|
||||
struct hostent *hp; /* host information */ |
||||
struct sockaddr_in server; /* server address */ |
||||
|
||||
/* fill in the server's address and data */ |
||||
bzero((char*)&server, sizeof(server)); |
||||
server.sin_family = AF_INET; |
||||
server.sin_port = htons(SERVER_PORT); |
||||
|
||||
/* look up the address of the server given its name */ |
||||
hp = gethostbyname(address); |
||||
if (!hp) { |
||||
perror("no such host"); |
||||
fprintf(stderr, "could not obtain address of %s\n", "localhost"); |
||||
} |
||||
|
||||
/* put the host's address into the server address structure */ |
||||
memcpy((void *)&server.sin_addr, hp->h_addr_list[0], hp->h_length); |
||||
if (connect(fd, (struct sockaddr *) &server, sizeof(server)) < 0) { |
||||
error("error connecting"); |
||||
} |
||||
|
||||
/* send a message to the server */ |
||||
int i; |
||||
//printf("Sending\n");
|
||||
for(i = 0; i < net.n; ++i){ |
||||
if(net.types[i] == CONVOLUTIONAL){ |
||||
convolutional_layer layer = *(convolutional_layer *) net.layers[i]; |
||||
write_all(fd, (char*) layer.bias_updates, layer.n*sizeof(float)); |
||||
int num = layer.n*layer.c*layer.size*layer.size; |
||||
write_all(fd, (char*) layer.filter_updates, num*sizeof(float)); |
||||
memset(layer.bias_updates, 0, layer.n*sizeof(float)); |
||||
memset(layer.filter_updates, 0, num*sizeof(float)); |
||||
} |
||||
if(net.types[i] == CONNECTED){ |
||||
connected_layer layer = *(connected_layer *) net.layers[i]; |
||||
write_all(fd, (char *)layer.bias_updates, layer.outputs*sizeof(float)); |
||||
write_all(fd, (char *)layer.weight_updates, layer.outputs*layer.inputs*sizeof(float)); |
||||
memset(layer.bias_updates, 0, layer.outputs*sizeof(float)); |
||||
memset(layer.weight_updates, 0, layer.inputs*layer.outputs*sizeof(float)); |
||||
} |
||||
} |
||||
//printf("Sent\n");
|
||||
|
||||
for(i = 0; i < net.n; ++i){ |
||||
if(net.types[i] == CONVOLUTIONAL){ |
||||
convolutional_layer layer = *(convolutional_layer *) net.layers[i]; |
||||
|
||||
read_all(fd, (char*) layer.biases, layer.n*sizeof(float)); |
||||
int num = layer.n*layer.c*layer.size*layer.size; |
||||
read_all(fd, (char*) layer.filters, num*sizeof(float)); |
||||
|
||||
#ifdef GPU |
||||
push_convolutional_layer(layer); |
||||
#endif |
||||
} |
||||
if(net.types[i] == CONNECTED){ |
||||
connected_layer layer = *(connected_layer *) net.layers[i]; |
||||
|
||||
read_all(fd, (char *)layer.biases, layer.outputs*sizeof(float)); |
||||
read_all(fd, (char *)layer.weights, layer.outputs*layer.inputs*sizeof(float)); |
||||
|
||||
#ifdef GPU |
||||
push_connected_layer(layer); |
||||
#endif |
||||
} |
||||
} |
||||
//printf("Updated\n");
|
||||
close(fd); |
||||
} |
@ -1,4 +0,0 @@ |
||||
#include "network.h" |
||||
|
||||
void client_update(network net, char *address); |
||||
void server_update(network net); |
@ -0,0 +1,52 @@ |
||||
#ifndef _UNISTD_H |
||||
#define _UNISTD_H 1 |
||||
|
||||
/* This file intended to serve as a drop-in replacement for
|
||||
* unistd.h on Windows |
||||
* Please add functionality as needed |
||||
*/ |
||||
|
||||
#include <stdlib.h> |
||||
#include <io.h> |
||||
#include <process.h> /* for getpid() and the exec..() family */ |
||||
#include <direct.h> /* for _getcwd() and _chdir() */ |
||||
|
||||
#include "getopt.h" /* getopt at: https://gist.github.com/ashelly/7776712 */ |
||||
#define srandom srand |
||||
#define random rand |
||||
|
||||
/* Values for the second argument to access.
|
||||
These may be OR'd together. */ |
||||
#define R_OK 4 /* Test for read permission. */ |
||||
#define W_OK 2 /* Test for write permission. */ |
||||
//#define X_OK 1 /* execute permission - unsupported in windows*/
|
||||
#define F_OK 0 /* Test for existence. */ |
||||
|
||||
#define access _access |
||||
#define dup2 _dup2 |
||||
#define execve _execve |
||||
#define ftruncate _chsize |
||||
#define unlink _unlink |
||||
#define fileno _fileno |
||||
#define getcwd _getcwd |
||||
#define chdir _chdir |
||||
#define isatty _isatty |
||||
#define lseek _lseek |
||||
/* read, write, and close are NOT being #defined here, because while there are file handle specific versions for Windows, they probably don't work for sockets. You need to look at your app and consider whether to call e.g. closesocket(). */ |
||||
|
||||
#define ssize_t int |
||||
|
||||
#define STDIN_FILENO 0 |
||||
#define STDOUT_FILENO 1 |
||||
#define STDERR_FILENO 2 |
||||
/* should be in some equivalent to <sys/types.h> */ |
||||
//typedef __int8 int8_t;
|
||||
//typedef __int16 int16_t;
|
||||
//typedef __int32 int32_t;
|
||||
//typedef __int64 int64_t;
|
||||
//typedef unsigned __int8 uint8_t;
|
||||
//typedef unsigned __int16 uint16_t;
|
||||
//typedef unsigned __int32 uint32_t;
|
||||
//typedef unsigned __int64 uint64_t;
|
||||
|
||||
#endif /* unistd.h */ |
@ -1,132 +0,0 @@ |
||||
#include "cuda_runtime.h" |
||||
#include "curand.h" |
||||
#include "cublas_v2.h" |
||||
|
||||
extern "C" { |
||||
#include "network.h" |
||||
#include "detection_layer.h" |
||||
#include "cost_layer.h" |
||||
#include "utils.h" |
||||
#include "parser.h" |
||||
#include "box.h" |
||||
#include "image.h" |
||||
#include <sys/time.h> |
||||
} |
||||
|
||||
#ifdef OPENCV |
||||
#include "opencv2/highgui/highgui.hpp" |
||||
#include "opencv2/imgproc/imgproc.hpp" |
||||
extern "C" image ipl_to_image(IplImage* src); |
||||
extern "C" void convert_yolo_detections(float *predictions, int classes, int num, int square, int side, int w, int h, float thresh, float **probs, box *boxes, int only_objectness); |
||||
|
||||
extern "C" char *voc_names[]; |
||||
extern "C" image voc_labels[]; |
||||
|
||||
static float **probs; |
||||
static box *boxes; |
||||
static network net; |
||||
static image in ; |
||||
static image in_s ; |
||||
static image det ; |
||||
static image det_s; |
||||
static image disp ; |
||||
static cv::VideoCapture cap; |
||||
static float fps = 0; |
||||
static float demo_thresh = 0; |
||||
|
||||
void *fetch_in_thread(void *ptr) |
||||
{ |
||||
cv::Mat frame_m; |
||||
cap >> frame_m; |
||||
IplImage frame = frame_m; |
||||
in = ipl_to_image(&frame); |
||||
rgbgr_image(in); |
||||
in_s = resize_image(in, net.w, net.h); |
||||
return 0; |
||||
} |
||||
|
||||
void *detect_in_thread(void *ptr) |
||||
{ |
||||
float nms = .4; |
||||
|
||||
detection_layer l = net.layers[net.n-1]; |
||||
float *X = det_s.data; |
||||
float *predictions = network_predict(net, X); |
||||
free_image(det_s); |
||||
convert_yolo_detections(predictions, l.classes, l.n, l.sqrt, l.side, 1, 1, demo_thresh, probs, boxes, 0); |
||||
if (nms > 0) do_nms(boxes, probs, l.side*l.side*l.n, l.classes, nms); |
||||
printf("\033[2J"); |
||||
printf("\033[1;1H"); |
||||
printf("\nFPS:%.0f\n",fps); |
||||
printf("Objects:\n\n"); |
||||
draw_detections(det, l.side*l.side*l.n, demo_thresh, boxes, probs, voc_names, voc_labels, 20); |
||||
return 0; |
||||
} |
||||
|
||||
extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index) |
||||
{ |
||||
demo_thresh = thresh; |
||||
printf("YOLO demo\n"); |
||||
net = parse_network_cfg(cfgfile); |
||||
if(weightfile){ |
||||
load_weights(&net, weightfile); |
||||
} |
||||
set_batch_network(&net, 1); |
||||
|
||||
srand(2222222); |
||||
|
||||
cv::VideoCapture cam(cam_index); |
||||
cap = cam; |
||||
if(!cap.isOpened()) error("Couldn't connect to webcam.\n"); |
||||
|
||||
detection_layer l = net.layers[net.n-1]; |
||||
int j; |
||||
|
||||
boxes = (box *)calloc(l.side*l.side*l.n, sizeof(box)); |
||||
probs = (float **)calloc(l.side*l.side*l.n, sizeof(float *)); |
||||
for(j = 0; j < l.side*l.side*l.n; ++j) probs[j] = (float *)calloc(l.classes, sizeof(float *)); |
||||
|
||||
pthread_t fetch_thread; |
||||
pthread_t detect_thread; |
||||
|
||||
fetch_in_thread(0); |
||||
det = in; |
||||
det_s = in_s; |
||||
|
||||
fetch_in_thread(0); |
||||
detect_in_thread(0); |
||||
disp = det; |
||||
det = in; |
||||
det_s = in_s; |
||||
|
||||
cvNamedWindow("YOLO", CV_WINDOW_NORMAL); |
||||
cvMoveWindow("YOLO", 0, 0); |
||||
cvResizeWindow("YOLO", 1352, 1013); |
||||
|
||||
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"); |
||||
free_image(disp); |
||||
cvWaitKey(1); |
||||
pthread_join(fetch_thread, 0); |
||||
pthread_join(detect_thread, 0); |
||||
|
||||
disp = det; |
||||
det = in; |
||||
det_s = in_s; |
||||
|
||||
gettimeofday(&tval_after, NULL); |
||||
timersub(&tval_after, &tval_before, &tval_result); |
||||
float curr = 1000000.f/((long int)tval_result.tv_usec); |
||||
fps = .9*fps + .1*curr; |
||||
} |
||||
} |
||||
#else |
||||
extern "C" void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index){ |
||||
fprintf(stderr, "YOLO demo needs OpenCV for webcam images.\n"); |
||||
} |
||||
#endif |
||||
|
Loading…
Reference in new issue