face-frontalization
face-frontalization copied to clipboard
ValueError: array is not broadcastable to correct shape!
Hello, I got the error:
frontal_raw[ind_frontal, :] = cv2.remap(img, temp_proj2[0, :].astype('float32'), temp_proj2[1, :].astype('float32'), cv2.INTER_CUBIC) ValueError: array is not broadcastable to correct shape
what's the error?How can i sovle?
Hi @getengqing,
Could you give more details about the error? How are you reading the image? Is it a RGB image? Are having this issue with one image in particular?
I run your demo.py , I have no anyway change to your program. Then got the error!
That's odd. Which version of OpenCV are you using?
Hi, I've got the same error. OpenCV version is 2.4.8
Traceback (most recent call last):
File "/usr/lib/pycharm/helpers/pydev/pydevd.py", line 1531, in
@181066,
Could you give more details about the input image? It would be great if could share the image itself
The input image is the one from your demo - test.jpg I just run your code without changes. Well, initially I tried to use my image that was looking much more difficult for frontalization. It didn't find facial points and failed. Ok then I just decided to check your demo and got that error.
Thank you.
Try upgrading your numpy version
I have the latest numpy 1.8.2 for ubuntu 14.04.
@181066, this is the not last version, I am using 1.10.4 on ubuntu 14.04, for example.
PS.: I am using the Anaconda python distribution.
Thanks a lot. Works fine with Anaconda.
I also meet this problem and my numpy version is also 1.8.2. I just use sudo pip install --upgrade numpy to get latest numpy 1.13.1, and this problem can be solved.