Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile failed #9

Open
cucrui opened this issue Apr 7, 2021 · 0 comments
Open

Compile failed #9

cucrui opened this issue Apr 7, 2021 · 0 comments

Comments

@cucrui
Copy link

cucrui commented Apr 7, 2021

I follow README.md instruction and try to run in a single device, it comes out some compiles error as below.

../src/inference_engine_helper.c: In function ‘draw_object_boxes’:
../src/inference_engine_helper.c:372:4: warning: implicit declaration of function ‘get_region_boxes’; did you mean ‘get_network_boxes’? [-Wimplicit-function-declaration]
    get_region_boxes(l, im.w, im.h, net.w, net.h, thresh, probs, boxes, masks, 0, 0, hier_thresh, 1);
    ^~~~~~~~~~~~~~~~
    get_network_boxes
../src/inference_engine_helper.c:373:25: warning: passing argument 1 of ‘do_nms_sort’ from incompatible pointer type [-Wincompatible-pointer-types]
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
                         ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: expected ‘detection * {aka struct detection *}’ but argument is of type ‘box * {aka struct <anonymous> *}’
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:373:32: warning: passing argument 2 of ‘do_nms_sort’ makes integer from pointer without a cast [-Wint-conversion]
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
                                ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: expected ‘int’ but argument is of type ‘float **’
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:373:13: error: too many arguments to function ‘do_nms_sort’
    if (nms) do_nms_sort(boxes, probs, l.w*l.h*l.n, l.classes, nms);
             ^~~~~~~~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:753:6: note: declared here
 void do_nms_sort(detection *dets, int total, int classes, float thresh);
      ^~~~~~~~~~~
../src/inference_engine_helper.c:374:24: warning: passing argument 2 of ‘draw_detections’ makes pointer from integer without a cast [-Wint-conversion]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                        ^
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘detection * {aka struct detection *}’ but argument is of type ‘intvoid draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:45: error: incompatible type for argument 4 of ‘draw_detections’
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                             ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘float’ but argument is of type ‘box * {aka struct <anonymous> *}’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:52: warning: passing argument 5 of ‘draw_detections’ from incompatible pointer type [-Wincompatible-pointer-types]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                    ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘char **’ but argument is of type ‘float **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:59: warning: passing argument 6 of ‘draw_detections’ from incompatible pointer type [-Wincompatible-pointer-types]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                           ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘image ** {aka struct <anonymous> **}’ but argument is of type ‘float **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:66: warning: passing argument 7 of ‘draw_detections’ makes integer from pointer without a cast [-Wint-conversion]
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
                                                                  ^~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: expected ‘int’ but argument is of type ‘char **’
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
../src/inference_engine_helper.c:374:4: error: too many arguments to function ‘draw_detections’
    draw_detections(im, l.w*l.h*l.n, thresh, boxes, probs, masks, names, alphabet, l.classes);
    ^~~~~~~~~~~~~~~
In file included from ../src/inference_engine_helper.h:5:0,
                 from ../src/inference_engine_helper.c:1:
../../../darknet/include/darknet.h:735:6: note: declared here
 void draw_detections(image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes);
      ^~~~~~~~~~~~~~~
Makefile:64: recipe for target 'obj/inference_engine_helper.o' failed
make: *** [obj/inference_engine_helper.o] Error 1

Maybe I think the above errors due to the different version of Darknet? And could you tell me which version of darknet you use?

Another question is in examples/Makefile, should I change DARKNET={darknet path in my pc}, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant