Darknet: Segmentation fault (core dumped) with libdarknet.so

Created on 19 Feb 2019  路  6Comments  路  Source: AlexeyAB/darknet

  • When running darknet with python i get a Segmentation fault (core dumped) error after Starting the YOLO loop...

  • I don't get this error when running the darknet file in c

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

Most helpful comment

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

All 6 comments

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

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

met this problem too

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

@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?

@WefPok
Hi bro,

  • Yes you have to replace meta.names[i] with ["person", "bike"...,"smth"].
  • meta.names is a list of all class names which was decided while training , it is not the classes of the current detection that is why this quick fix works.
  • accessing meta.names doesn't work for some reason, backtracking the error shows that the root of the problem is in load_meta = lib.get_metadata line 190.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yongcong1415 picture yongcong1415  路  3Comments

HilmiK picture HilmiK  路  3Comments

shootingliu picture shootingliu  路  3Comments

kebundsc picture kebundsc  路  3Comments

zihaozhang9 picture zihaozhang9  路  3Comments