Code Monkey home page Code Monkey logo

Comments (8)

gazambuja avatar gazambuja commented on August 12, 2024 1

Just change the line 29 from:

def recognize_face(face_descriptor, database):
    encoding = img_to_encoding(face_descriptor, FRmodel)
    min_dist = 100
    identity = None

to:

def recognize_face(face_descriptor, database):
    encoding = img_to_encoding(face_descriptor, FRmodel)
    min_dist = 100
    identity = 0

from facial-recognition-using-facenet.

arorasahil1234 avatar arorasahil1234 commented on August 12, 2024

now this error any inputs/suggestions??

Total Params: 3743280
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file C:\bld\opencv_1520732670222\work\opencv-3.4.1\modules\imgproc\src\resize.cpp, line 4044
Traceback (most recent call last):
File "rec-feat.py", line 112, in
recognize()
File "rec-feat.py", line 82, in recognize
database = initialize()
File "rec-feat.py", line 77, in initialize
database[identity] = fr_utils.img_path_to_encoding(file, FRmodel)
File "C:\Users\sahil.d.arora\Desktop\beacon\face recog live python\Facial-Recognition-using-Facenet-master\fr_utils.py", line 194, in img_path_to_encoding
return img_to_encoding(img1, model)
File "C:\Users\sahil.d.arora\Desktop\beacon\face recog live python\Facial-Recognition-using-Facenet-master\fr_utils.py", line 198, in img_to_encoding
image = cv2.resize(image, (96, 96))
cv2.error: OpenCV(3.4.1) C:\bld\opencv_1520732670222\work\opencv-3.4.1\modules\imgproc\src\resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize

from facial-recognition-using-facenet.

Pratiko3 avatar Pratiko3 commented on August 12, 2024

OpenCV(3.4.1) D:\Build\OpenCV\opencv-3.4.1\modules\imgproc\src\resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize
help me

from facial-recognition-using-facenet.

SulleyOne avatar SulleyOne commented on August 12, 2024

Any luck on the resizing problem anyone?

from facial-recognition-using-facenet.

arorasahil1234 avatar arorasahil1234 commented on August 12, 2024

No Buddy , the recognizing part is not working :(

from facial-recognition-using-facenet.

JishinK avatar JishinK commented on August 12, 2024

function cv::resize problem arises here because of the path. I got stuck here because I forgot to add the trailing slash.

TRAIN_DIR = '../input/train/'
I had forgotten to add the last forward slash and got this error.

from facial-recognition-using-facenet.

SaravananJaichandar avatar SaravananJaichandar commented on August 12, 2024

Traceback (most recent call last):
File "rec-feat.py", line 112, in
recognize()
File "rec-feat.py", line 82, in recognize
database = initialize()
File "rec-feat.py", line 77, in initialize
database[identity] = fr_utils.img_path_to_encoding(file, FRmodel)
File "/Users/saravananjaichandar/Downloads/Facial-Recognition-using-Facenet-master/fr_utils.py", line 194, in img_path_to_encoding
return img_to_encoding(img1, model)
File "/Users/saravananjaichandar/Downloads/Facial-Recognition-using-Facenet-master/fr_utils.py", line 198, in img_to_encoding
image = cv2.resize(image, (96, 96))
cv2.error: OpenCV(4.1.0) /Users/travis/build/skvark/opencv-python/opencv/modules/imgproc/src/resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Did anyone solved this issue ? Please help ! @arorasahil1234 @Pratiko3 @SulleyOne @JishinK

from facial-recognition-using-facenet.

parasjain-12 avatar parasjain-12 commented on August 12, 2024

Try saving the picture in images folder by number not by name

from facial-recognition-using-facenet.

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.