yolo2_light icon indicating copy to clipboard operation
yolo2_light copied to clipboard

compilation terminated due to -Wfatal-errors.

Open USMANHEART opened this issue 6 years ago • 16 comments

I am unable to make this project. I have set GPU/CUDNN/OPENCV and all other arguments as 0. But I am unable to use make command

compilation terminated due to -Wfatal-errors. make: *** [obj/yolov2_forward_network.o] Error 1 2019-01-17

USMANHEART avatar Jan 16 '19 21:01 USMANHEART

@USMANHEART

I fixed it. Update your code from GitHub.

AlexeyAB avatar Jan 16 '19 22:01 AlexeyAB

@AlexeyAB Thanks for your kind reply. Let me check

USMANHEART avatar Jan 16 '19 22:01 USMANHEART

Now one problem is resolved. But when I try to use GPU and OPENCV =1 I get this error

In file included from ./src/main.c:7:0: ./src/additionally.h:32:38: fatal error: opencv2/core/fast_math.hpp: No such file or directory #include <opencv2/core/fast_math.hpp> ^ compilation terminated. make: *** [obj/main.o] Error 1 annotation 2019-01-17 064727

USMANHEART avatar Jan 16 '19 22:01 USMANHEART

  • What OpenCV version do you use?
  • Try to comment this line, does it help? https://github.com/AlexeyAB/yolo2_light/blob/85fc1b388aa00f0243220ed48dac95ac18401b22/src/additionally.h#L32

I just compiled and run Darknet successfull on Linux Debian 8.2 x64 + OpenCV 3.4.0 and Windws 7 x64 + OpenCV 3.2.0

image

image

AlexeyAB avatar Jan 16 '19 23:01 AlexeyAB

I have followed that step. I comment line 32. annotation 2019-01-17 072807

USMANHEART avatar Jan 16 '19 23:01 USMANHEART

I am using Linux, OpenCV version 3.1 cv2

USMANHEART avatar Jan 16 '19 23:01 USMANHEART

I have followed that step. I comment line 32. annotation 2019-01-17 072807

It requires cuDNN >= 7.1.1 https://github.com/AlexeyAB/yolo2_light#yolo2_light

AlexeyAB avatar Jan 16 '19 23:01 AlexeyAB

I have followed that step. I comment line 32. annotation 2019-01-17 072807

It requires cuDNN >= 7.1.1 https://github.com/AlexeyAB/yolo2_light#yolo2_light

cuda

USMANHEART avatar Jan 16 '19 23:01 USMANHEART

So you have CUDA 8.0 Now you should install cuDNN v7.1.4 (May 16, 2018), for CUDA 8.0 https://developer.nvidia.com/rdp/cudnn-archive

AlexeyAB avatar Jan 17 '19 00:01 AlexeyAB

Could you please help me a little more regarding label names. I want to display the name of the labels also in the picture. Which file I should modify? annotation 2019-01-17 161617

USMANHEART avatar Jan 17 '19 08:01 USMANHEART

And what about the training procedure? I have modified your yolo config file which also include <B>"input_calibration="</B> parameter is there any mistake in my training command? train

USMANHEART avatar Jan 17 '19 08:01 USMANHEART

@USMANHEART

This repository is made:

  • to built-in Yolo source С-code into your application
  • to understand how it works

This repository only for Detection Yolo, not for Training. You should use this repository: https://github.com/AlexeyAB/darknet

Could you please help me a little more regarding label names. I want to display the name of the labels also in the picture. Which file I should modify?

Currently it draws labels only on Video, but doesn't draw labels for detection on Images: https://github.com/AlexeyAB/yolo2_light/blob/85fc1b388aa00f0243220ed48dac95ac18401b22/src/main.c#L80-L148

AlexeyAB avatar Jan 17 '19 12:01 AlexeyAB

I have to design an INT model of yolov3. I need to train in INT. Can you please guide me which repo i must use? Do you have any repo that I can use for training or any reference where I can train an INT model?

USMANHEART avatar Jan 17 '19 16:01 USMANHEART

@USMANHEART

  • Currently you can train your model by using Float-32bit using this repo: https://github.com/AlexeyAB/darknet as usual and must be used one of these cfg-files:

    • https://github.com/AlexeyAB/yolo2_light/blob/master/bin/yolov3-tiny.cfg
    • https://github.com/AlexeyAB/yolo2_light/blob/master/bin/yolov3.cfg
  • And then Detect objects by using your (Float-32bit) cfg & weights files by using the command with flag -quantized using this repo https://github.com/AlexeyAB/yolo2_light so will be used INT8 inference:

./darknet detector test coco.names yolov3-tiny.cfg yolov3-tiny.weights -thresh 0.24 dog.jpg -quantized

AlexeyAB avatar Jan 17 '19 21:01 AlexeyAB

I am actually using Yolov3. I have trained the model in Yolov3 . And I am having weights from yolo v3. But I noticed this thing in your code. I can't use quantized in yolo v3? It's written there that quantization only for yolo v2. Please make me clear for that one. quan

USMANHEART avatar Jan 18 '19 09:01 USMANHEART

But I noticed this thing in your code. I can't use quantized in yolo v3? It's written there that quantization only for yolo v2.

This is old comment, that I will remove. Yolo v3 supports quantization.

If you trained your ownd yolov3.cfg then add to the [net] section parameter input_calibration = 15.497, 12.537, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40

As here: https://github.com/AlexeyAB/yolo2_light/blob/29905072f194ee86fdeed6ff2d12fed818712411/bin/yolov3.cfg#L25

and run detection: ./darknet detector test coco.names yolov3.cfg yolov3.weights -thresh 0.15 dog.jpg -quantized

AlexeyAB avatar Jan 18 '19 11:01 AlexeyAB