Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need your help here!!!! #5

Open
arorasahil1234 opened this issue Jun 13, 2018 · 8 comments
Open

need your help here!!!! #5

arorasahil1234 opened this issue Jun 13, 2018 · 8 comments

Comments

@arorasahil1234
Copy link

C:\Users\Facial-Recognition-using-Facenet-master>python rec-feat.py
C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-06-13 13:17:08.655028: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\engine\saving.py:270: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
Total Params: 3743280
Traceback (most recent call last):
File "rec-feat.py", line 112, in
recognize()
File "rec-feat.py", line 103, in recognize
extract_face_info(img, img_rgb, database,ear)
File "rec-feat.py", line 59, in extract_face_info
name, min_dist = recognize_face(image, database)
File "rec-feat.py", line 44, in recognize_face
if int(identity) <=4:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

@arorasahil1234
Copy link
Author

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

@Pratiko3
Copy link

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

@SulleyOne
Copy link

Any luck on the resizing problem anyone?

@arorasahil1234
Copy link
Author

No Buddy , the recognizing part is not working :(

@JishinK
Copy link

JishinK commented Jul 13, 2018

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.

@gazambuja
Copy link

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

@SaravananJaichandar
Copy link

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

@parasjain-12
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants