Skip to content

Commit

Permalink
FIX OPENCV 🐍
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreddie committed Sep 19, 2017
1 parent 1e72980 commit a4ae313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/darknet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions include/darknet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4ae313

Please sign in to comment.