face_alignment icon indicating copy to clipboard operation
face_alignment copied to clipboard

matplotlib issue

Open muhk01 opened this issue 5 years ago • 2 comments

hi thanks for sharing the source, but unfortunately I am unable to run the program and give this following error: Traceback (most recent call last): File "test.py", line 8, in <module> plt.imshow(img1_a) File "/usr/local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2683, in imshow None else {}), **kwargs) File "/usr/local/lib/python3.7/site-packages/matplotlib/__init__.py", line 1601, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "/usr/local/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/matplotlib/axes/_axes.py", line 5671, in imshow im.set_data(X) File "/usr/local/lib/python3.7/site-packages/matplotlib/image.py", line 690, in set_data .format(self._A.shape)) TypeError: Invalid shape (1, 224, 224, 3) for image data

muhk01 avatar Dec 18 '19 04:12 muhk01

neither code nor images was replaced, just clone install newest libraries and then give the following error

muhk01 avatar Dec 18 '19 04:12 muhk01

the resulting image has a batch dimension(note 1 in the shape : (1, 224, 224, 3) ). simply doing plt.imshow(img1_a[0]) should do the trick!

Coderx7 avatar Jan 12 '20 17:01 Coderx7