Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use own face detection module

See original GitHub issue

Hello, I want to use my own network for face detection, so I tried to pass face_detector=None to FaceAlignment class, but it gives me an error.

Is there any functionality to pass cropped faces or its bounding boxes to the get_landmarks method?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:29 (4 by maintainers)

github_iconTop GitHub Comments

rakadambicommented, Dec 27, 2019

I got this to work. This is how one can do it. Thanks to @1adrianb for his patience with all my questions.

Method to use your own face detector.

  1. Call FaceAlignment with face_detector = folder argument.
  2. Detect all faces that you want from your face detector. Add the 5th value to each numpy array of 1 (confidence factor). Store them in a python list of numpy arrays.
  3. Call get_landmarks(). The arguments should be the image absolute file path and the list of arrays that you got from step 2 above.


Notes: I don’t see folder_detector function being used at all.

rakadambicommented, Aug 27, 2020

From your newL, it looks like it is [x, y, w, h]

I checked my code. It should be [x, y, x+w, y+h, 1]. In other words, the width and height need to be replaced by actual coordinates.

Can you try that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Beginners guide to Building your own Face Recognition ...
A Beginners guide to Building your own Face Recognition System to creep out your Friends. Facial recognition systems are steadily making their ...
Read more >
Face Recognition with Python, in Under 25 Lines of Code
In this article, we'll look at a surprisingly simple way to get started with face recognition using Python and the open source library...
Read more >
Face Recognition with Python and OpenCV - Great Learning
Face Recognition with Python: Face recognition is a method of identifying or verifying the identity of an individual using their face.
Read more >
How to Perform Face Detection with Deep Learning
Face detection can be performed using the classical feature-based cascade classifier using the OpenCV library. State-of-the-art face detection ...
Read more >
Face Detection+recognition : 8 Steps (with Pictures)
1. Anaconda is essentially a nicely packaged Python IDE that is shipped with tons of useful packages, such as NumPy, Pandas, IPython Notebook,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found