mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
FIX OPENCV 🐍
This commit is contained in:
parent
1e729804f6
commit
a4ae313b1c
@ -89,12 +89,12 @@ void speed(char *cfgfile, int tics)
|
||||
network net = parse_network_cfg(cfgfile);
|
||||
set_batch_network(&net, 1);
|
||||
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);
|
||||
for(i = 0; i < tics; ++i){
|
||||
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("Speed: %f sec/eval\n", t/tics);
|
||||
printf("Speed: %f Hz\n", tics/t);
|
||||
|
@ -27,6 +27,7 @@ extern int gpu_index;
|
||||
#include "opencv2/core/version.hpp"
|
||||
#if CV_MAJOR_VERSION == 3
|
||||
#include "opencv2/videoio/videoio_c.h"
|
||||
#include "opencv2/imgcodecs/imgcodecs_c.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user