Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a dlib library port for java? [closed]

Tags:

java

dlib

I'm actually using OpenCV for face detection, but after watching this video : https://www.youtube.com/watch?v=LsK0hzcEyHI , I've noticed that dlib is much more accurate, and even in my tests, gives a lot of fale positives (but doesn't miss any face), does anyone know how to use dlib within a Java web application (not android) ? I've already found a port to Android, but I don't thinkk it's possible to use it with in a java web application. Thank you

like image 852
hereForLearing Avatar asked Dec 19 '22 16:12

hereForLearing


1 Answers

I have used dlib myself, and yes it is a very advanced and precise library. There is no port in Java as far as I know. But you can always have it compiled to a shared library (.so in linux or .dll in Windows), and then use that inside your Java code.

More on using a dll or using an so in java

There is also an option to use the C++ library directly within Java, using proxies. You might want to look into that.

Edit : As per @evgeniy's comment, most of dlib is header-only templates. You will not be able to use those if you export dlib directly as a shared library. What you might want to do instead is to expose whatever APIs you need, see here

Edit 2 : As @davis-king's pointed out, you may want to look into using swig and cmake as is done in the mitie/dlib Java api : See here.

like image 167
S. Saad Avatar answered Jan 08 '23 20:01

S. Saad