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

im.transpose((1, 2, 0)) axes don't match array #5

Open
dgrechka opened this issue Aug 19, 2022 · 1 comment
Open

im.transpose((1, 2, 0)) axes don't match array #5

dgrechka opened this issue Aug 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dgrechka
Copy link
Member

Got job pet911ru_rf434618
pet911ru_rf434618: Starting to process the job
pet911ru_rf434618: Extracting 1 images
Traceback (most recent call last):
  File "/mnt/ssd/yolo5_zirui_calvin/code/serve.py", line 35, in <module>
    work()
  File "/mnt/ssd/yolo5_zirui_calvin/code/serve.py", line 29, in work
    out_job, uid = process_job(model, job)
  File "/mnt/ssd/yolo5_zirui_calvin/code/infer.py", line 65, in process_job
    yolo5_outputs = infer_in_json_field(model, images)
  File "/mnt/ssd/yolo5_zirui_calvin/code/infer.py", line 33, in infer_in_json_field
    head, annotated, heads_count = detect_head_and_body(model, imNumpy)
  File "/mnt/ssd/yolo5_zirui_calvin/code/model.py", line 10, in detect_head_and_body
    pred = model(img)
  File "/mnt/ssd/yolo5_zirui_calvin/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/mnt/ssd/yolo5_zirui_calvin/venv/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/mnt/ssd/yolo5_zirui_calvin/code/./yolov5/models/common.py", line 587, in forward
    im = im.transpose((1, 2, 0))  # reverse dataloader .transpose(2, 0, 1)
ValueError: axes don't match array
Closing the Kafka producer with 0 secs timeout.
Proceeding to force close the producer since pending requests could not be completed within timeout 0.
Stopping heartbeat thread
@dgrechka dgrechka added the bug Something isn't working label Aug 19, 2022
@dgrechka
Copy link
Member Author

dgrechka commented Aug 19, 2022

752423.jpg: GIF image data, version 87a, 400 x 534

import imageio
a = imageio.imread('752423.gif')
:1: DeprecationWarning: Starting with ImageIO v3 the behavior of this function will switch to that of iio.v3.imread. To keep the current behavior (and make this warning dissapear) use import imageio.v2 as imageio or call imageio.v2.imread directly.
a.shape
(534, 400, 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant