Is there a dlib library port for java?

爷,独闯天下 提交于 2020-01-01 11:39:48

问题


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


回答1:


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.




回答2:


If you are looking for Android: https://github.com/tzutalin/dlib-android

Otherwise, this https://github.com/bytedeco/javacpp-presets/issues/49 looks like the most promising but still opened at the moment.



来源:https://stackoverflow.com/questions/37551998/is-there-a-dlib-library-port-for-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!