EvilPort2 / Sign-Language

A very simple CNN project.
759 stars 354 forks source link

ValueError: input arrays do not match #22

Open tsytiff opened 5 years ago

tsytiff commented 5 years ago

Hi I m running with the file fun_util.py

However, the following Error occurs:

Using TensorFlow backend. Traceback (most recent call last): File "/xxx/Sign-Language-master-2/fun_util.py", line 317, in recognize() File "/xxx/Sign-Language-master-2/fun_util.py", line 310, in recognize keypress = text_mode(cam) File "/xxx/Sign-Language-master-2/fun_util.py", line 284, in text_mode res = np.hstack((img, blackboard)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/shape_base.py", line 288, in hstack return _nx.concatenate(arrs, 1) ValueError: all the input array dimensions except for the concatenation axis must match exactly

Since I am a beginner learning this, I can't figure what's happening. May you please help? Thank you.

kirtigodani commented 5 years ago

Try installing pyobjc using brew.Maybe this might work

On Mon, 22 Oct 2018 at 4:14 PM, tsytiff notifications@github.com wrote:

Hi I m running with the file fun_util.py

However, the following Error occurs:

Using TensorFlow backend. Traceback (most recent call last): File "/xxx/Sign-Language-master-2/fun_util.py", line 317, in recognize() File "/xxx/Sign-Language-master-2/fun_util.py", line 310, in recognize keypress = text_mode(cam) File "/xxx/Sign-Language-master-2/fun_util.py", line 284, in text_mode res = np.hstack((img, blackboard)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/shape_base.py", line 288, in hstack return _nx.concatenate(arrs, 1) ValueError: all the input array dimensions except for the concatenation axis must match exactly

Since I am a beginner learning this, I can't figure what's happening. May you please help? Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EvilPort2/Sign-Language/issues/22, or mute the thread https://github.com/notifications/unsubscribe-auth/AfeE3oqbF84xJG0HBCXydl5p3aF4EJbBks5unaGZgaJpZM4XzHFk .

EvilPort2 commented 5 years ago

It is mainly due to difference in the camera that you are using. In my case my camera gave me a 640x480 image. So my blackboard variable was hard coded as such. Hence the error. The current version resizes the image to 640x480. So the error is no more.