staywithme23 / lipreading-by-convolutional-neural-network-keras

demo code for lip reading
21 stars 16 forks source link

Getting im = cv2.resize(im, (im.shape[1] * SCALE_FACTOR, AttributeError: 'NoneType' object has no attribute 'shape' #3

Open fheilz opened 5 years ago

fheilz commented 5 years ago

Whenever I run main.py I get:

Traceback (most recent call last): File "main.py", line 9, in import faceAlignment as fa File "/Users/f/Desktop/lip/faceAlignment.py", line 155, in img_ref, landmark_ref = read_im_and_landmarks(REFERENCE_PATH) File "/Users/f/Desktop/lip/faceAlignment.py", line 92, in read_im_and_landmarks im = cv2.resize(im, (im.shape[1] * SCALE_FACTOR, AttributeError: 'NoneType' object has no attribute 'shape'

Any help is appreciated!

How do I get the webcam shown in the demo working?

rishabhshah13 commented 5 years ago

Go to a well lit area. I think the program is not able to find the face.

fheilz commented 5 years ago

@rishabhshah13 How should I record my face like in the demo. Running any of the python programs in this doesn't open the interface shown in the demo.

Any Ideas?

Demo Link: https://www.youtube.com/watch?v=3FpEljYFAi4&t=43s

mastergrey commented 5 years ago

Well the error is because there is no portrait in your system. He has given a different reference to the image which isn't available in your system.Give the proper path.Download a image in the same file location.Open folder in atom editor.Select the image and right click on the image.Copy the full path and paste it in the faceAlignment variable REFRENCE_PATH.

Thank me later

pding5 commented 4 years ago

I have the same situation, are you solved?

rishabhshah13 commented 4 years ago

Give the REFRENCE_PATH variable the path of any portrait and it should work.

HassanMehmood1 commented 3 years ago

@rishabhshah13 could you run this code and get the same results as described on the demo video? I am getting a lot of errors. if it is possible kindly help me to run this. your help will be appreciated. Thanks.