Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Detection Reshape error #136

Open
Sridharanraja opened this issue Dec 13, 2023 · 0 comments
Open

Object Detection Reshape error #136

Sridharanraja opened this issue Dec 13, 2023 · 0 comments
Labels
comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues

Comments

@Sridharanraja
Copy link

Sridharanraja commented Dec 13, 2023

Description

python3 examples/detect_image.py --model test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite --labels test_data/coco_labels.txt --input test_data/grace_hopper.bmp
output:
ValueError: cannot reshape array of size 76800 into shape (300,256,3)

Click to expand!

Issue Type

No response

Operating System

Windows 10

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Python 3.8

Relevant Log Output

python examples/detect_image.py --model test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite --labels test_data/coco_labels.txt --input test_data/grace_hopper.bmp
examples/detect_image.py:78: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use LANCZOS or Resampling.LANCZOS instead.
  interpreter, image.size, lambda size: image.resize(size, Image.ANTIALIAS))
Traceback (most recent call last):
  File "examples/detect_image.py", line 108, in <module>
    main()
  File "examples/detect_image.py", line 78, in main
    interpreter, image.size, lambda size: image.resize(size, Image.ANTIALIAS))
  File "C:\Users\Admin\anaconda3\envs\edgetpu\lib\site-packages\pycoral\adapters\common.py", line 99, in set_resized_input
    tensor[:h, :w] = np.reshape(result, (h, w, channel))
  File "<__array_function__ internals>", line 6, in reshape
  File "C:\Users\Admin\anaconda3\envs\edgetpu\lib\site-packages\numpy\core\fromnumeric.py", line 298, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "C:\Users\Admin\anaconda3\envs\edgetpu\lib\site-packages\numpy\core\fromnumeric.py", line 54, in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
  File "C:\Users\Admin\anaconda3\envs\edgetpu\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit
    result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: cannot reshape array of size 76800 into shape (300,256,3)
@google-coral-bot google-coral-bot bot added comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:model Model related isssues Hardware:USB Accelerator Coral USB Accelerator issues subtype:windows Windos Build/installation issues
Projects
None yet
Development

No branches or pull requests

1 participant