Git Product home page Git Product logo

Comments (3)

AbdurNawaz avatar AbdurNawaz commented on May 20, 2024

you're most probably getting the error while calculating face_encodings - I had the same issue, it got resolved after I removed extra information from my image (metadata). This library seems to not work when your image has metadata.

from face_recognition.

DiaosWang avatar DiaosWang commented on May 20, 2024

@AbdurNawaz
hello,how to remove extra information from my image(metadata) ?

from face_recognition.

DiaosWang avatar DiaosWang commented on May 20, 2024

Maybe we can try cv2.imread to load imgs, as blow:

import cv2  
import face_recognition
import os 

root = './imgs/known_peoples/'

for name in os.listdir(root):
    img_path = os.path.join(root, name )
    img = cv2.imread(img_path)[:,:,::-1]
    num_face = len(face_recognition.face_encodings(img))
    print(name,  num_face)

The above code can correctly face_encodings face from personal face. The reason is, as @AbdurNawaz , that `cv2.imread' gets only the image data.

from face_recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.