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

Fixed FBRS runtime dimension error on images with alpha channel #5384

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

azhavoro
Copy link
Contributor

resolve #5299

Motivation and context

RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension

How has this been tested?

manually on images with and w/o alpha channel

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nmanovic nmanovic merged commit 6f09c77 into develop Nov 30, 2022
@nmanovic nmanovic deleted the az/fix_fbrs branch November 30, 2022 14:26
@nmanovic nmanovic mentioned this pull request Dec 12, 2022
nmanovic pushed a commit that referenced this pull request Jan 11, 2023
This is pretty much the same fix applied to f-BRS in #5384. We've been
using HRNet for a while and now an then we receive "500 errors" just as
reported in #5299 when someone forgets to drop the alpha-channel from
our images.

### Motivation and context
The RuntimeError is a little bit different, but comes from the same
issue: RGBA instead of RGB images:
> RuntimeError: Given groups=1, weight of size [16, 3, 1, 1], expected
input[*, 4, *, *] to have 3 channels, but got 4 channels instead.

### How has this been tested?
I created a task with images with and w/o alpha channel, and the
interactor works on both now.
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
This is pretty much the same fix applied to f-BRS in cvat-ai#5384. We've been
using HRNet for a while and now an then we receive "500 errors" just as
reported in cvat-ai#5299 when someone forgets to drop the alpha-channel from
our images.

### Motivation and context
The RuntimeError is a little bit different, but comes from the same
issue: RGBA instead of RGB images:
> RuntimeError: Given groups=1, weight of size [16, 3, 1, 1], expected
input[*, 4, *, *] to have 3 channels, but got 4 channels instead.

### How has this been tested?
I created a task with images with and w/o alpha channel, and the
interactor works on both now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error code 500 on F-BRS
2 participants