mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
FIX OPENCV 🐍
This commit is contained in:
@ -89,12 +89,12 @@ void speed(char *cfgfile, int tics)
|
|||||||
network net = parse_network_cfg(cfgfile);
|
network net = parse_network_cfg(cfgfile);
|
||||||
set_batch_network(&net, 1);
|
set_batch_network(&net, 1);
|
||||||
int i;
|
int i;
|
||||||
time_t start = time(0);
|
double time=what_time_is_it_now();
|
||||||
image im = make_image(net.w, net.h, net.c*net.batch);
|
image im = make_image(net.w, net.h, net.c*net.batch);
|
||||||
for(i = 0; i < tics; ++i){
|
for(i = 0; i < tics; ++i){
|
||||||
network_predict(net, im.data);
|
network_predict(net, im.data);
|
||||||
}
|
}
|
||||||
double t = difftime(time(0), start);
|
double t = what_time_is_it_now() - time;
|
||||||
printf("\n%d evals, %f Seconds\n", tics, t);
|
printf("\n%d evals, %f Seconds\n", tics, t);
|
||||||
printf("Speed: %f sec/eval\n", t/tics);
|
printf("Speed: %f sec/eval\n", t/tics);
|
||||||
printf("Speed: %f Hz\n", tics/t);
|
printf("Speed: %f Hz\n", tics/t);
|
||||||
|
@ -27,6 +27,7 @@ extern int gpu_index;
|
|||||||
#include "opencv2/core/version.hpp"
|
#include "opencv2/core/version.hpp"
|
||||||
#if CV_MAJOR_VERSION == 3
|
#if CV_MAJOR_VERSION == 3
|
||||||
#include "opencv2/videoio/videoio_c.h"
|
#include "opencv2/videoio/videoio_c.h"
|
||||||
|
#include "opencv2/imgcodecs/imgcodecs_c.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user