Face recognition in Java

大兔子大兔子 提交于 2019-12-02 17:33:28

There are a few open-source Face Recognition Java systems you can try, but don't expect much, because I am looking for the same thing but I'm still looking for a better option!

Note that finding any face within in image is called "Face Detection", following any face is called "Face Tracking", and determining the identity of a detected face is called "Face Recognition". I'm telling you this because you probably have to use different software and algorithms to do each one! The answer by Paul tells you that OpenCV can do Face Detection easily (Haar Cascade Detector), but not Face Recognition as easily (actually it does have a way to do Eigenface Recognition), which it sounds like you need Face Recognition, so OpenCV isn't necessarily your best option since you are using Java.

You can try FAINT which does both Face Detection and Face Recognition in Java, but it is pretty much undocumented. There is also "http://darnok.org/programming/face-recognition/", but I can't seem to get good results out of it. There is also "http://uni.johnsto.co.uk/faces/" for Face Recognition, and "Neuroph" for Face Recognition / Detection.

If you find a good solution, please tell me at "draw3d@shervinemami.co.cc" Good Luck! Shervin Emami

Check out OpenCV. A well-documented and acclaimed face detection technique by Viola & Jones has been implemented, known as Haar cascade.

A complete tutorial -- from training to experimentation -- is available here. Note that you don't actually need to do training; OpenCV comes bundled with several feature cascades, including a few for face detection.

Accurate face recognition is a task that can be broken into several steps:

  1. Face detection
  2. Facial landmark point discovery
  3. Rotation, cropping, alignment, and scaling using your landmarks
  4. Facial descriptor point discovery (these are not human readable)
  5. Comparison to known faces to find the closest match

This can be done with several libraries but requires bytedeco wrappers for OpenCV and Caffe as well as a library such as ND4j for matrix comparison.

OpenCV has HAAR cascades for face detection and can use flandmark for facial point recognition. This will allow you to perform steps 1-3.

Facial descriptor discovery can be done using the bytedeco wrapper for Caffe and VGG Face Descriptor library (http://www.robots.ox.ac.uk/~vgg/software/vgg_face/)

Finally, Nd4j can be used for comparing images. If you have enough images classified by individual, perhaps you can use a neural network from the library for classification.

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