Open karanmartian opened 6 years ago
The python code which pjreddie provided works fine already, you can find them at python folder and detect file for prediction. Or using my fork if implemented functions meet your requirement.
python detector-scipy-opencv.py
Traceback (most recent call last):
File "detector-scipy-opencv.py", line 4, in
@karanmartian It only tested in Python2.7, and still working on fix issues from ctypes implementation in 3.6.
@sharowyeh fixed the error. Would you have any example for reading / performing detections on Video file?
I just wrote python code for video detections. but its kind of running slow. I was thinking of using this code instead in yolo_console_dll.cpp but getting this error. Have you encountered this before?
(tf) karan@karan-LinuxTP:~/al/darknet/src$ g++ yolo_console_dll.cpp
/tmp/cc4RfFu5.o: In function main': yolo_console_dll.cpp:(.text+0x60b): undefined reference toDetector::Detector(std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, int)'
yolo_console_dll.cpp:(.text+0x734): undefined reference to Detector::load_image(std::__cxx11::basic_string<char, std::char_traits
It is recommended that using AlexeyAB's repository for this c++ file modification.
@karanmartian Could you share python code for video detection ??
Updated in my repo, quick represent video detection function with python code wrapped from libdarknet.so.
Using python darknet.py detector demo <data> <cfg> <weight> <cam_index> <video_file_path>
@sharowyeh Getting compilation errors on your build. I suggest you take a look at them as some files are missing.
Project: libdarknet.sln
@deimsdeutsch Thank you for reminding me :)
And the issue feature of my project has been opened.
Hi guys, I just tested the official python wrapper, I was wondering if it is normal for the python wrapper to be a little slower than the original code.
Mine GTX1050 gives me 0.08s for the dog demo on original code, and average 0.106 for python on the same resolution video.
@shuoyuanxu I have the same problem when I am running from terminal I get 60 FPS and when I am running from python I am getting 50 FPS which is a big difference if you scale it.
Can maybe someone explain why is this happening?
Thanks @sharowyeh but I am getting this error while executing:
I am running a miniconda python 3.6 with opencv 3.4.1 python detector-scipy-opencv.py Traceback (most recent call last): File "detector-scipy-opencv.py", line 4, in from darknet_libwrapper import * File "/home/karan/darknet/darknet_libwrapper.py", line 59, in lib = ctypes.CDLL(lib_path, ctypes.RTLD_LOCAL) File "/home/karan/miniconda3/envs/tf/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name
Has anyone found a solution to this? I have been battling with the issue for quite some time.
Thanks @sharowyeh but I am getting this error while executing:
I am running a miniconda python 3.6 with opencv 3.4.1 python detector-scipy-opencv.py Traceback (most recent call last): File "detector-scipy-opencv.py", line 4, in from darknet_libwrapper import * File "/home/karan/darknet/darknet_libwrapper.py", line 59, in lib = ctypes.CDLL(lib_path, ctypes.RTLD_LOCAL) File "/home/karan/miniconda3/envs/tf/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name
Has anyone found a solution to this? I have been battling with the issue for quite some time.
I also have this problem
Hi,
Is there any way to write wrapper / API in python for yolo darknet? Basically I want to do things like object counting, updating a custom GUI with classes that are detected etc. by taking the output of YOLO. I don't want to use darkflow because its much slower than darknet on my setup.