AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.75k stars 7.96k forks source link

Segmentation fault (core dumped) with libdarknet.so #2434

Open sunny-k9 opened 5 years ago

sunny-k9 commented 5 years ago

What is causing this error? CUDA: 10 CUDNN: v7.4.2.24 OPENCV: 3.4.0 OS: Ubuntu 18 Graphics Card: NVIDIA GTX1060

sunny-k9 commented 5 years ago

The code seems to break near line 273 nameTag = meta.names[i] this error doesn't occur in the older darknet.py file

sunny-k9 commented 5 years ago

i hard coded my class name in line 273 and commented line 29-33 in darknet_video.py because it was throwing an error that detections doesn't have a function called decode and now it is working.There seems to be an issue with line 190 load_meta = lib.get_metadata

ChienLiu commented 5 years ago

met this problem too

sunny-k9 commented 5 years ago

Currently you can bypass this issue by modifying line 273 in darknet.py tonameTag = list of your class names

WefPok commented 5 years ago

@legend-k Hi there! You mean I should replace meta.names[i] with ["person", "bike"...,"smth"]? I don't understand why that works, is meta.names a list of all classes' names? or names of classes of current detections in the certain frame?

sunny-k9 commented 5 years ago

@WefPok Hi bro,

P.S: I did not explore further after I found the temporary quick fix, if I were to fix the problem I would have changed the C code implementation of get_metadata