Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dlib library to javacpp-presets #49

Open
aaronkhoo opened this issue Apr 27, 2015 · 13 comments
Open

Add dlib library to javacpp-presets #49

aaronkhoo opened this issue Apr 27, 2015 · 13 comments

Comments

@aaronkhoo
Copy link

Add dlib (https://github.com/davisking/dlib) to the javacpp-presets family.

@crockpotveggies
Copy link

crockpotveggies commented Oct 23, 2016

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!

@crockpotveggies
Copy link

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!

@saudet
Copy link
Member

saudet commented Oct 24, 2016

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

@crockpotveggies
Copy link

crockpotveggies commented Oct 25, 2016

Sorry about that was trying to pick up anyone else who wasn't on the Gitter channel. Let's stick to Gitter

@crockpotveggies
Copy link

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

@ndtreviv
Copy link

I'm guessing this is a dead end now that repo no longer exists?

@saudet
Copy link
Member

saudet commented Aug 29, 2018

@crockpotveggies Still have it somewhere?

@crockpotveggies
Copy link

Deleted, I did not see a use for it now that we're getting better results with YOLOv3 and the repo itself was incomplete.

@ndtreviv
Copy link

ndtreviv commented Sep 3, 2018

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.

@crockpotveggies
Copy link

@ndtreviv no prob thanks for letting me know

@tahaemara
Copy link

I added a java wrapper to simply use dlib face detector, facial landmarks, and face embedding models.
https://github.com/tahaemara/jdlib

@saudet
Copy link
Member

saudet commented Jan 1, 2021

@tahaemara What's the reason you're not using JavaCPP?

@tahaemara
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants