I try to work with Yolo v3 using python script darknet.py
Then I run
python darknet.py
I got
Traceback (most recent call last):
File "darknet.py", line 122, in <module>
lib = CDLL("./libdarknet.so", RTLD_GLOBAL)
File "/home/y700/anaconda3/lib/python3.7/ctypes/__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: ./libdarknet.so: cannot open shared object file: No such file or directory
I found informations about at first need set values LIBSO to 1 and make new make. But nothing change. After I try bash script
LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/coco.names cfg/yolov3.cfg yolov3.weights test.mp4
and got
bash: ./uselib: no such file or directory
Help me solve this please!
I do not know how or why, but after several attempts to do
LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/coco.names cfg/yolov3.cfg yolov3.weights test.mp4
with responce
bash: ./uselib: no such file or directory
I got libdarknet.so at my root dir. But now new error is occured
Traceback (most recent call last):
File "darknet.py", line 128, in <module>
copy_image_from_bytes = lib.copy_image_from_bytes
File "/usr/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ./libdarknet.so: undefined symbol: copy_image_from_bytes
@Lepiloff
Download the latest version of Darknet at the new directory.
Set LIBSO=1 in the Makefile
Do these commands:
make clean
make
Perfect! Thanks, Alex. Could you answer why image dont show? I got this response
Unable to show image: can't concat str to bytes
Perfect! Thanks, Alex. Could you answer why image dont show? I got this response
Unable to show image: can't concat str to bytes
after changing
https://github.com/AlexeyAB/darknet/blob/cce34712f6928495f1fbc5d69332162fc23491b9/darknet.py#L391
to label = str(detection[0])
it worked for me
Most helpful comment
@Lepiloff
Download the latest version of Darknet at the new directory.
Set
LIBSO=1in theMakefileDo these commands: