# \#face

**URL:** https://forum.opencv.org/tag/face/179.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Creating training images](https://forum.opencv.org/t/creating-training-images/20808)

<div class="topic-metadata">

**Author:** [@curt](https://forum.opencv.org/u/curt)\
**Replies:** 1\
**Last updated:** [April 13, 2025, 5:40pm UTC](https://forum.opencv.org/t/creating-training-images/20808 "2025-04-13T17:40:32Z")

</div>

I am new to opencv and facial recognition. Is it reasonable to create training images with a webcam taking snapshots at regular intervals? Any suggestions such as face and camera angles, background, etc. Thanks, Curt

---

## [Problems with getting values for face angle age estimation](https://forum.opencv.org/t/problems-with-getting-values-for-face-angle-age-estimation/20692)

<div class="topic-metadata">

**Author:** [@Thomas\_Clarke](https://forum.opencv.org/u/Thomas_Clarke)\
**Replies:** 3\
**Last updated:** [April 1, 2025, 3:18pm UTC](https://forum.opencv.org/t/problems-with-getting-values-for-face-angle-age-estimation/20692 "2025-04-01T15:18:12Z")

</div>

I’m having problems with values for R1, C1, C2 in step 6: I don’t want to use dlib or yunet for my solution! Find the row number R1 with minimum row sum of gray level in UPART. Find the column numbers C1 and C2 with …

---

## [DeDuplication of Faces](https://forum.opencv.org/t/deduplication-of-faces/17661)

<div class="topic-metadata">

**Author:** [@Nvrcharan](https://forum.opencv.org/u/Nvrcharan)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 10:06am UTC](https://forum.opencv.org/t/deduplication-of-faces/17661 "2024-05-16T10:06:27Z")

</div>

I’m having the difficulty in extracting the unique faces from a folder. and save them in a seperate folder. Flow should go like this : At first, uniquefaces folder will be empty and xyz folder is full of faces with mult…

---

## [How do I train an LBPHFaceRecognizer Model with a very large number of images?](https://forum.opencv.org/t/how-do-i-train-an-lbphfacerecognizer-model-with-a-very-large-number-of-images/16769)

<div class="topic-metadata">

**Author:** [@Eddie](https://forum.opencv.org/u/Eddie)\
**Replies:** 2\
**Last updated:** [March 12, 2024, 1:21pm UTC](https://forum.opencv.org/t/how-do-i-train-an-lbphfacerecognizer-model-with-a-very-large-number-of-images/16769 "2024-03-12T13:21:38Z")

</div>

How do I train an OpenCV LBPHFaceRecognizer Model with a very large number of images? I’m trying to create a model in OpenCV for face detection (specifically sex and age). The data set I have has about 50,000 images. Th…

---

## [LBF model in opencv.js not working](https://forum.opencv.org/t/lbf-model-in-opencv-js-not-working/14819)

<div class="topic-metadata">

**Author:** [@mcjeb](https://forum.opencv.org/u/mcjeb)\
**Replies:** 4\
**Last updated:** [October 11, 2023, 6:10pm UTC](https://forum.opencv.org/t/lbf-model-in-opencv-js-not-working/14819 "2023-10-11T18:10:52Z")

</div>

Hello fellow reader, I am getting desperate about this topic. Unfortunately I am a beginner with Javascript, but my goal is to convert a Python script I have into a working web application, which should detect a face an…

---

## [OpenCV face recognition training model return unrealistic label index and confidence value](https://forum.opencv.org/t/opencv-face-recognition-training-model-return-unrealistic-label-index-and-confidence-value/14459)

<div class="topic-metadata">

**Author:** [@Felix\_Chan](https://forum.opencv.org/u/Felix_Chan)\
**Replies:** 1\
**Last updated:** [September 6, 2023, 11:19am UTC](https://forum.opencv.org/t/opencv-face-recognition-training-model-return-unrealistic-label-index-and-confidence-value/14459 "2023-09-06T11:19:47Z")

</div>

I wrote the following codes in Java using OpenCV 4.8.0 and try to train the faces lies in subdirectory within a specified directory, then perform a “predict” to test the confidence values. It seems the results are alway…

---

## [How do I resolve the linker error with 'cv::face::LBPHFaceRecognizer' in my OpenCV C++ code?](https://forum.opencv.org/t/how-do-i-resolve-the-linker-error-with-cv-lbphfacerecognizer-in-my-opencv-c-code/13377)

<div class="topic-metadata">

**Author:** [@MaestroFries](https://forum.opencv.org/u/MaestroFries)\
**Replies:** 6\
**Last updated:** [June 1, 2023, 5:41am UTC](https://forum.opencv.org/t/how-do-i-resolve-the-linker-error-with-cv-lbphfacerecognizer-in-my-opencv-c-code/13377 "2023-06-01T05:41:54Z")

</div>

Unresolved External Source in OPENCV C++ Code with cv::face::LBPHFaceRecognizer I have OPENCV code which acts a trainer that takes a directory full of face images. I am running this on OpenCV 4.2.0 with the OPENCV contr…

---

## [How can I applied box function to detect face in colab?](https://forum.opencv.org/t/how-can-i-applied-box-function-to-detect-face-in-colab/13075)

<div class="topic-metadata">

**Author:** [@zoro\_kun](https://forum.opencv.org/u/zoro_kun)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 1:54pm UTC](https://forum.opencv.org/t/how-can-i-applied-box-function-to-detect-face-in-colab/13075 "2023-05-12T13:54:22Z")

</div>

hi , I am new to python I trying to give the prediction output with box that detect human face but after I run the video not have the box so how can I applied it in the codes? def prediction (filepath): input\_shape = …

---

## [Deploy LBPHFaceRecognizer model without images](https://forum.opencv.org/t/deploy-lbphfacerecognizer-model-without-images/12635)

<div class="topic-metadata">

**Author:** [@yoko911](https://forum.opencv.org/u/yoko911)\
**Replies:** 2\
**Last updated:** [April 1, 2023, 2:20pm UTC](https://forum.opencv.org/t/deploy-lbphfacerecognizer-model-without-images/12635 "2023-04-01T14:20:18Z")

</div>

So I have trained a LBPHFaceRecognizer model using the CSV examples in the opencv documentation, is there a way to get the nodes/coefficients from the trained model and then apply them? I just don’t want to load or even…

---

## [How to get facial landmarks on Android platform?](https://forum.opencv.org/t/how-to-get-facial-landmarks-on-android-platform/11883)

<div class="topic-metadata">

**Author:** [@Cassiel](https://forum.opencv.org/u/Cassiel)\
**Replies:** 4\
**Last updated:** [February 7, 2023, 9:45am UTC](https://forum.opencv.org/t/how-to-get-facial-landmarks-on-android-platform/11883 "2023-02-07T09:45:54Z")

</div>

I tried to use the dlib library on Android platform, but the detection speed is very slow. Is there any other way to get facial landmarks？

---

## [OpenCV's T-API facedetect.cpp sample is hella slow and CPU intensive with OpenCL "on"](https://forum.opencv.org/t/opencvs-t-api-facedetect-cpp-sample-is-hella-slow-and-cpu-intensive-with-opencl-on/10189)

<div class="topic-metadata">

**Author:** [@Unix\_Man](https://forum.opencv.org/u/Unix_Man)\
**Replies:** 4\
**Last updated:** [November 14, 2022, 7:13pm UTC](https://forum.opencv.org/t/opencvs-t-api-facedetect-cpp-sample-is-hella-slow-and-cpu-intensive-with-opencl-on/10189 "2022-11-14T19:13:29Z")

</div>

Hello, The “ufacedetect.cpp” from T-API folder in samples folder runs super slow after compilation. When running the compiled code, OpenCL can be seen displayed as “ON” while running the compiled code. There is no diffe…

---

## [How to figure out the Face movement velocity?](https://forum.opencv.org/t/how-to-figure-out-the-face-movement-velocity/9505)

<div class="topic-metadata">

**Author:** [@Md\_Sakibul\_Alam](https://forum.opencv.org/u/Md_Sakibul_Alam)\
**Replies:** 5\
**Last updated:** [July 15, 2022, 9:13am UTC](https://forum.opencv.org/t/how-to-figure-out-the-face-movement-velocity/9505 "2022-07-15T09:13:36Z")

</div>

Assalamualaikum,i am working on android based project and already able to detect face and eyes.I need to sort out the face movement velocity.I mean when moving my face from left to right or right to left there is a speed…

---

## [Facemark fit in python doesn't match with c++ fit function](https://forum.opencv.org/t/facemark-fit-in-python-doesnt-match-with-c-fit-function/9174)

<div class="topic-metadata">

**Author:** [@fateme](https://forum.opencv.org/u/fateme)\
**Replies:** 3\
**Last updated:** [June 17, 2022, 4:50pm UTC](https://forum.opencv.org/t/facemark-fit-in-python-doesnt-match-with-c-fit-function/9174 "2022-06-17T16:50:53Z")

</div>

using this face\_landmark\_model.dat in python facemark = cv2.face.createFacemarkKazemi() facemark.loadModel("face\_landmark\_model.dat") ok, landmarks = facemark.fit(gray, faces) and in c++ Ptr\<Facemark\> facemark = Face…

---

## [How to create Positive and Negative Eigenfaces using Mean image?](https://forum.opencv.org/t/how-to-create-positive-and-negative-eigenfaces-using-mean-image/8561)

<div class="topic-metadata">

**Author:** [@Real\_prime](https://forum.opencv.org/u/Real_prime)\
**Replies:** 3\
**Last updated:** [April 27, 2022, 12:28pm UTC](https://forum.opencv.org/t/how-to-create-positive-and-negative-eigenfaces-using-mean-image/8561 "2022-04-27T12:28:37Z")

</div>

I’m trying to generate Eigenvectors of positive and negative Eigenfaces and here is the following code: model = cv2.face.EigenFaceRecognizer\_create() model.train(np.asarray(faces), np.asarray(labels)) # Save model resu…

---

## [SystemError: error return without exception set from model.getMean("mean")](https://forum.opencv.org/t/systemerror-error-return-without-exception-set-from-model-getmean-mean/8543)

<div class="topic-metadata">

**Author:** [@Real\_prime](https://forum.opencv.org/u/Real_prime)\
**Replies:** 11\
**Last updated:** [April 25, 2022, 3:40pm UTC](https://forum.opencv.org/t/systemerror-error-return-without-exception-set-from-model-getmean-mean/8543 "2022-04-25T15:40:23Z")

</div>

I’m having trouble executing a file that trains the face recognition system. I’m using the code from pi-facerec-box Github: #train.py from github link attached above. import fnmatch import os import cv2 import numpy as …

---

## [Placing the image on the side of the face](https://forum.opencv.org/t/placing-the-image-on-the-side-of-the-face/8206)

<div class="topic-metadata">

**Author:** [@Lukas\_Zatloukal](https://forum.opencv.org/u/Lukas_Zatloukal)\
**Replies:** 1\
**Last updated:** [March 31, 2022, 1:15pm UTC](https://forum.opencv.org/t/placing-the-image-on-the-side-of-the-face/8206 "2022-03-31T13:15:59Z")

</div>

Hello, I’m trying to use opencv in python to create something like an instagram filter where I can try different types of glasses to fit my face. I was able to detect the eyes using the mediapipe library and place glas…

---

## [Multiple face detection](https://forum.opencv.org/t/multiple-face-detection/8011)

<div class="topic-metadata">

**Author:** [@Christophe\_Jacquelin](https://forum.opencv.org/u/Christophe_Jacquelin)\
**Replies:** 1\
**Last updated:** [March 20, 2022, 6:13am UTC](https://forum.opencv.org/t/multiple-face-detection/8011 "2022-03-20T06:13:38Z")

</div>

Hello, For the detection of serveral face on one image, what is the best between OpenCV or DLib ? Thank you

---

## [Object Detection - Face Recognition](https://forum.opencv.org/t/object-detection-face-recognition/7344)

<div class="topic-metadata">

**Author:** [@VDL](https://forum.opencv.org/u/VDL)\
**Replies:** 1\
**Last updated:** [January 30, 2022, 1:33pm UTC](https://forum.opencv.org/t/object-detection-face-recognition/7344 "2022-01-30T13:33:39Z")

</div>

From the face recogniser’s tutorial. It seems it can only be used to recognise a face in a photo of a face (where the photo only contains a face that is a large part of it). Also I see it can be used to recognise other …

---

## [How to zoom on mouth only in face?](https://forum.opencv.org/t/how-to-zoom-on-mouth-only-in-face/7076)

<div class="topic-metadata">

**Author:** [@slowninja](https://forum.opencv.org/u/slowninja)\
**Replies:** 5\
**Last updated:** [January 11, 2022, 5:56pm UTC](https://forum.opencv.org/t/how-to-zoom-on-mouth-only-in-face/7076 "2022-01-11T17:56:03Z")

</div>

When I only detect the face the camera zoom on the face and follows it. But when I want to detect & zoom/follow the mouth it doesn’t. It just randomly detects all type of stuff expect the mouth. So for the mouth detecti…

---

## [How to simply crop eyes/nose/mouth from the face only?](https://forum.opencv.org/t/how-to-simply-crop-eyes-nose-mouth-from-the-face-only/7082)

<div class="topic-metadata">

**Replies:** 1\
**Last updated:** [January 11, 2022, 1:27pm UTC](https://forum.opencv.org/t/how-to-simply-crop-eyes-nose-mouth-from-the-face-only/7082 "2022-01-11T13:27:45Z")

</div>

When I crop only face it does the job, but when I want to crop eyes, nose, mouth that are detected in the face it doesn’t. gray = cv2.cvtColor(frame, cv2.COLOR\_BGR2GRAY) face\_detection = face\_cascade.detectMultiScale(…

---

## [How to zoom on/follow MOUTH in FACE?](https://forum.opencv.org/t/how-to-zoom-on-follow-mouth-in-face/7074)

<div class="topic-metadata">

**Author:** [@slowninja](https://forum.opencv.org/u/slowninja)\
**Replies:** 0\
**Last updated:** [January 11, 2022, 11:52am UTC](https://forum.opencv.org/t/how-to-zoom-on-follow-mouth-in-face/7074 "2022-01-11T11:52:01Z")

</div>

When I only detect the face the camera zoom on the face and follows it. But when I want to detect & zoom/follow the mouth it doesn’t. Mouth detection only work when the face is detected first so I can’t just detect only…

---

## [How to zoom on/follow MOUTH in FACE? (OPENCV Face Detection)](https://forum.opencv.org/t/how-to-zoom-on-follow-mouth-in-face-opencv-face-detection/7072)

<div class="topic-metadata">

**Author:** [@slowninja](https://forum.opencv.org/u/slowninja)\
**Replies:** 0\
**Last updated:** [January 11, 2022, 11:45am UTC](https://forum.opencv.org/t/how-to-zoom-on-follow-mouth-in-face-opencv-face-detection/7072 "2022-01-11T11:45:08Z")

</div>

When I only detect the face the camera zoom on the face and follows it. But when I want to detect & zoom/follow the mouth it doesn’t. Mouth detection only work when the face is detected first so I can’t just detect only…

---

## [How can I do the Face Recognition on my Android App?](https://forum.opencv.org/t/how-can-i-do-the-face-recognition-on-my-android-app/6940)

<div class="topic-metadata">

**Author:** [@Cavax66](https://forum.opencv.org/u/Cavax66)\
**Replies:** 6\
**Last updated:** [January 3, 2022, 12:33pm UTC](https://forum.opencv.org/t/how-can-i-do-the-face-recognition-on-my-android-app/6940 "2022-01-03T12:33:06Z")

</div>

I would like some helpfull indications to implement Face Recognition on my Android App. This piece of code can help me? import org.opencv.core.\*; import org.opencv.dnn.\*; import org.opencv.imgcodecs.\*; import org.openc…

---

## [Opencv face lbphfacerecognizer error](https://forum.opencv.org/t/opencv-face-lbphfacerecognizer-error/5204)

<div class="topic-metadata">

**Author:** [@TOOL\_KIT](https://forum.opencv.org/u/TOOL_KIT)\
**Replies:** 2\
**Last updated:** [September 14, 2021, 8:16pm UTC](https://forum.opencv.org/t/opencv-face-lbphfacerecognizer-error/5204 "2021-09-14T20:16:05Z")

</div>

Hi I am using opencv 3.0.0… and also tried newer and older versions… But I am getting this error again and again… error LNK2001: unresolved external symbol "struct cv::Ptr\<class cv::face::LBPHFaceRecognizer\> \_\_cdecl c…

---

## [How to detect mouth if rest of face is covered?](https://forum.opencv.org/t/how-to-detect-mouth-if-rest-of-face-is-covered/1620)

<div class="topic-metadata">

**Author:** [@potu1304](https://forum.opencv.org/u/potu1304)\
**Replies:** 0\
**Last updated:** [February 17, 2021, 5:20pm UTC](https://forum.opencv.org/t/how-to-detect-mouth-if-rest-of-face-is-covered/1620 "2021-02-17T17:20:11Z")

</div>

Hello everybody! This is my first topic and I hope you can help me out. I have to create a face detection if you wear e.g. head mounted displays. So OpenCV should recognize the mouth and then predict the face, the next …

---

## [Jar Files does not contains org.opencv.face package bu documentation file contains it. I want to use this package.How? (opencv 4.5.3, Windows 10)](https://forum.opencv.org/t/jar-files-does-not-contains-org-opencv-face-package-bu-documentation-file-contains-it-i-want-to-use-this-package-how-opencv-4-5-3-windows-10/5029)

<div class="topic-metadata">

**Author:** [@ilkerbedir](https://forum.opencv.org/u/ilkerbedir)\
**Replies:** 3\
**Last updated:** [September 3, 2021, 6:48am UTC](https://forum.opencv.org/t/jar-files-does-not-contains-org-opencv-face-package-bu-documentation-file-contains-it-i-want-to-use-this-package-how-opencv-4-5-3-windows-10/5029 "2021-09-03T06:48:58Z")

</div>

Jar Files does not contains org.opencv.face package bu documentation file contains it. I want to use this package.How? (opencv 4.5.3, Windows 10)

---

## [OpenCV's built in face recognizer is recognizing all wrong faces](https://forum.opencv.org/t/opencvs-built-in-face-recognizer-is-recognizing-all-wrong-faces/4946)

<div class="topic-metadata">

**Author:** [@Avinier](https://forum.opencv.org/u/Avinier)\
**Replies:** 6\
**Last updated:** [August 28, 2021, 3:34pm UTC](https://forum.opencv.org/t/opencvs-built-in-face-recognizer-is-recognizing-all-wrong-faces/4946 "2021-08-28T15:34:03Z")

</div>

So I have built a face recognition project with open cv’s built-in face recognizer, but the code is recognizing all the wrong faces. My code- import cv2 as cv #import numpy as np haar\_cascade = cv.CascadeClassifier("h…

---

## [Opencv face recognition](https://forum.opencv.org/t/opencv-face-recognition/3812)

<div class="topic-metadata">

**Author:** [@jophin123](https://forum.opencv.org/u/jophin123)\
**Replies:** 3\
**Last updated:** [June 13, 2021, 12:15pm UTC](https://forum.opencv.org/t/opencv-face-recognition/3812 "2021-06-13T12:15:29Z")

</div>

I watched a YouTube video about face recognition and done same as that he told.But at the time of face recognition it recognise all the peoples as same.what is the reason.code is import cv2 def draw\_boundary(img, class…

---

## [Error compiling face extra module](https://forum.opencv.org/t/error-compiling-face-extra-module/3294)

<div class="topic-metadata">

**Author:** [@marcosdo](https://forum.opencv.org/u/marcosdo)\
**Replies:** 4\
**Last updated:** [May 12, 2021, 9:02am UTC](https://forum.opencv.org/t/error-compiling-face-extra-module/3294 "2021-05-12T09:02:00Z")

</div>

Hi, I’m Marcos, a student who is doing a university project using Visual Studio 2019 with c++ and your library (version 4.5.2). This is my first time using libraries, so I’ll try to describe my error as much accurate as …

---

## [Training Face Detection model on custom dataset using caffe](https://forum.opencv.org/t/training-face-detection-model-on-custom-dataset-using-caffe/3002)

<div class="topic-metadata">

**Author:** [@astanwar99](https://forum.opencv.org/u/astanwar99)\
**Replies:** 1\
**Last updated:** [April 27, 2021, 8:59am UTC](https://forum.opencv.org/t/training-face-detection-model-on-custom-dataset-using-caffe/3002 "2021-04-27T08:59:20Z")

</div>

I am following the steps from https://github.com/opencv/opencv/blob/master/samples/dnn/face\_detector/how\_to\_train\_face\_detector.txt to train Face detection model on custom dataset. I am using Ubuntu 20.04 based docker …

[Next page](https://forum.opencv.org/tag/face/179.md?match_all_tags=true&page=1&tags%5B%5D=face)
