Open rafael-junio opened 4 years ago
As far as I know there is function in OpenCV dnn module that allows that.
There is also DarkHelp, where you can use parameters like --json
to get the results as a JSON object after it looks at a batch of images: https://www.ccoderun.ca/DarkHelp/api/ShellScripting.html
Actually the repo of vincentgog work fine. I dont know if he changed something though. You can reach my repo forked from VG with some additional features : https://github.com/YCAyca/YCA_VG_AlexeyAB_darknet . All you need to do is to download and build the project then use the command darknet_no_gpu.exe detector batch .... explained in "General Usage" section.
@stephanecharette I am trying to build DarkHelp on ubuntu 20.04 but it gives me this error:
[ 25%] Building CXX object src-lib/CMakeFiles/dh.dir/DarkHelp.cpp.o
/home/saraswat/Downloads/darknet3/darkhelp-1.1.2-3079-Source/src-lib/DarkHelp.cpp: In member function ‘virtual void DarkHelp::reset()’:
/home/saraswat/Downloads/darknet3/darkhelp-1.1.2-3079-Source/src-lib/DarkHelp.cpp:176:3: error: ‘free_network’ was not declared in this scope
free_network(nw);
^~~~
/home/saraswat/Downloads/darknet3/darkhelp-1.1.2-3079-Source/src-lib/DarkHelp.cpp:176:3: note: suggested alternative: ‘load_network’
free_network(nw);
^~~~
load_network
make[2]: [src-lib/CMakeFiles/dh.dir/build.make:82: src-lib/CMakeFiles/dh.dir/DarkHelp.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:155: src-lib/CMakeFiles/dh.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
Can you let me know what I missed? I have zero experience with C++ unfortunately.
If your version of Darknet doesn't have the free_network()
API call, then it is very out-of-date. I suggest you do a git pull
in your darknet directory and rebuild.
Looking at the repo, AlexeyAB exposed the free_network()
API 11 months ago:
489ea7fd (AlexeyAB 2020-01-01 21:38:06 +0300 997) LIB_API void free_network(network net);
So your version of Darknet must be older than that. Or there is something wrong with what you think you built.
If you continue to have trouble, you can also come ask for help in the DarkHelp channel on the Darknet/YOLO discord: https://discord.gg/zSq8rtW
Hello, Yes my darknet version is old. I will update it. Many thanks for responding.
In Keras we can return predictions for a single batch of samples. Bellow is the commented section of the predict_on_batch function on keras/engine/training.py. There is something like this implemented in AlexeyAB darknet? I found this https://github.com/vincentgong7/VG_AlexeyAB_darknet/blob/master/src/detector.c. But it's seens that it only create a list and predict on one image per time. `