You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for:
image = Image.open(image_file).convert('RGB').resize(size, Image.ANTIALIAS)
ValueError: could not broadcast input array from shape (64,64) into shape (64,64,1)
else
image = Image.open(image_file).resize(size, Image.ANTIALIAS)
ValueError: could not broadcast input array from shape (64,64,3) into shape (64,64,1)
I'd like 64,64,1
using only:
from pycoral.utils.edgetpu import make_interpreter
from pycoral.adapters import common
import PIL
from PIL import Image
Full error:
Traceback (most recent call last):
File "edge.py", line 16, in
common.set_input(interpreter, image)
File "/usr/lib/python3/dist-packages/pycoral/adapters/common.py", line 75, in set_input
input_tensor(interpreter)[:, :] = data
ValueError: could not broadcast input array from shape (64,64) into shape (64,64,1)
Apologies if this is working as intended,
I did not find a way when creating .tflite with numpy to create 3D array such as 1,64,64
as that also produces an error conv2d requires 4D minimum.
thanks!
I am planning to use monochrome sensor, and would prefer not to convert to RGB.
The text was updated successfully, but these errors were encountered:
Clarification:
img = img[:, :, np.newaxis] or img = np.expand_dims(img, axis=(0, -1)) are also similar,
the tensorflow works fine, it's when one tries to use the .tflite file created that this error arises.
I did not find a reduced testcase or other example.
for:
image = Image.open(image_file).convert('RGB').resize(size, Image.ANTIALIAS)
ValueError: could not broadcast input array from shape (64,64) into shape (64,64,1)
else
image = Image.open(image_file).resize(size, Image.ANTIALIAS)
ValueError: could not broadcast input array from shape (64,64,3) into shape (64,64,1)
I'd like 64,64,1
using only:
from pycoral.utils.edgetpu import make_interpreter
from pycoral.adapters import common
import PIL
from PIL import Image
Full error:
Traceback (most recent call last):
File "edge.py", line 16, in
common.set_input(interpreter, image)
File "/usr/lib/python3/dist-packages/pycoral/adapters/common.py", line 75, in set_input
input_tensor(interpreter)[:, :] = data
ValueError: could not broadcast input array from shape (64,64) into shape (64,64,1)
Apologies if this is working as intended,
I did not find a way when creating .tflite with numpy to create 3D array such as 1,64,64
as that also produces an error conv2d requires 4D minimum.
thanks!
I am planning to use monochrome sensor, and would prefer not to convert to RGB.
The text was updated successfully, but these errors were encountered: