lipreading-by-convolutional-neural-network-keras icon indicating copy to clipboard operation
lipreading-by-convolutional-neural-network-keras copied to clipboard

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

Open fheilz opened this issue 5 years ago • 6 comments

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?

fheilz avatar Apr 27 '19 13:04 fheilz

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

rishabhshah13 avatar Apr 29 '19 10:04 rishabhshah13

@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

fheilz avatar May 05 '19 22:05 fheilz

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

mastergrey avatar Jul 30 '19 07:07 mastergrey

I have the same situation, are you solved?

pding5 avatar May 20 '20 10:05 pding5

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

rishabhshah13 avatar May 20 '20 13:05 rishabhshah13

@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.

HassanMehmood1 avatar Apr 25 '21 19:04 HassanMehmood1