Skip to content

Commit

Permalink
YOLOv3 ON CPU!!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreddie committed Mar 26, 2018
1 parent e4acba6 commit 698d54c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filenam
double time;
char buff[256];
char *input = buff;
float nms=.3;
float nms=0;
while(1){
if(filename){
strncpy(input, filename, 256);
Expand All @@ -598,7 +598,7 @@ void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filenam
printf("%s: Predicted in %f seconds.\n", input, what_time_is_it_now()-time);
int nboxes = 0;
detection *dets = get_network_boxes(net, im.w, im.h, thresh, hier_thresh, 0, 1, &nboxes);
printf("%d\n", nboxes);
//printf("%d\n", nboxes);
//if (nms) do_nms_obj(boxes, probs, l.w*l.h*l.n, l.classes, nms);
if (nms) do_nms_sort(dets, nboxes, l.classes, nms);
draw_detections(im, dets, nboxes, thresh, names, alphabet, l.classes);
Expand Down
2 changes: 1 addition & 1 deletion src/blas.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void upsample_cpu(float *in, int w, int h, int c, int batch, int stride, int for
for(j = 0; j < h*stride; ++j){
for(i = 0; i < w*stride; ++i){
int in_index = b*w*h*c + k*w*h + (j/stride)*w + i/stride;
int out_index = b*w*h*c + k*w*h + j*w + i;
int out_index = b*w*h*c*stride*stride + k*w*h*stride*stride + j*w*stride + i;
if(forward) out[out_index] = scale*in[in_index];
else in[in_index] += scale*out[out_index];
}
Expand Down

0 comments on commit 698d54c

Please sign in to comment.