Open aaronkhoo opened 9 years ago
I've started work on this and any help is appreciated. https://github.com/crockpotveggies/javacpp-presets/tree/master/dlib
There are a lot of header files so I'm unsure of how to handle them all. Some walkthrough on how to get started would be very helpful!
Alright some progress, there's a couple problems including javacpp unable to read a couple header files as well as some generated Java types break syntax.
I'm trying to parse a lot of these files but commonly get this error:
[INFO] Parsing /usr/local/Cellar/dlib/19.1_2/include/dlib/algs.h
[ERROR] Failed to execute JavaCPP Builder: null:0: Unexpected token ''
When I exclude those files I then get output like this:
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[629,58] illegal start of expression
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[629,59] ';' expected
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[631,74] ';' expected
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[632,1] illegal start of expression
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[632,8] illegal start of expression
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[632,14] ';' expected
[ERROR] /Users/justin/Projects/javacpp-presets/dlib/src/main/java/org/bytedeco/javacpp/dlib.java:[4457,2] reached end of file while parsing
The generated java file looks like:
@Name("is_config_reader<dlib::config_reader>") public static class is_config_reader<dlib::config_reader>
Thanks for your help!
@crockpotveggies Having the same conversation on both Gitter and here isn't going to be efficient, so let's stick to one of them. Like I said, we'll first need to get dlib's build in order.
Sorry about that was trying to pick up anyone else who wasn't on the Gitter channel. Let's stick to Gitter
@aaronkhoo started making progress on this, PRs welcome, this code here is compiling on OSX with Linux to follow: https://github.com/crockpotveggies/dlib-java
dlib is too complicated for creating entire presets unfortunately, but I'll be putting core functionality there and long-term we can use it to create presets (unless someone else does it first)
I'm guessing this is a dead end now that repo no longer exists?
@crockpotveggies Still have it somewhere?
Deleted, I did not see a use for it now that we're getting better results with YOLOv3 and the repo itself was incomplete.
Cool. Thanks. I came here because I was really looking for JNI bindings for using dlib. But I don't think I need it anymore.
@ndtreviv no prob thanks for letting me know
I added a java wrapper to simply use dlib face detector, facial landmarks, and face embedding models. https://github.com/tahaemara/jdlib
@tahaemara What's the reason you're not using JavaCPP?
@saudet Actually Jdlib is the first project I deal with JNI. And I want through implementing it to understand how things are done using plain JNI not using any other 3rd party libs likes Javacpp lib which of course makes a lot of things easy.
Add dlib (https://github.com/davisking/dlib) to the javacpp-presets family.