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

Yolov6 inference runtime error #251

Open
1 of 2 tasks
nagarajuys opened this issue Feb 16, 2024 · 0 comments
Open
1 of 2 tasks

Yolov6 inference runtime error #251

nagarajuys opened this issue Feb 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nagarajuys
Copy link

Search before asking

  • I have searched the Roboflow Notebooks issues and found no similar bug report.

Notebook name

train-yolov6-object-detection-on-custom-data.ipynb

Bug

Fusing model...
Switch model to deploy modality.
Traceback (most recent call last):
File "/content/YOLOv6/tools/infer.py", line 120, in
main(args)
File "/content/YOLOv6/tools/infer.py", line 115, in main
run(**vars(args))
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/YOLOv6/tools/infer.py", line 107, in run
inferer = Inferer(source, webcam, webcam_addr, weights, device, yaml, img_size, half)
File "/content/YOLOv6/yolov6/core/inferer.py", line 50, in init
self.model(torch.zeros(1, 3, *self.img_size).to(self.device).type_as(next(self.model.model.parameters()))) # warmup
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/content/YOLOv6/yolov6/layers/common.py", line 563, in forward
y, _ = self.model(im)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/content/YOLOv6/yolov6/models/yolo.py", line 35, in forward
x = self.backbone(x)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/content/YOLOv6/yolov6/models/efficientrep.py", line 107, in forward
x = self.stem(x)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/content/YOLOv6/yolov6/layers/common.py", line 248, in forward
return self.nonlinearity(self.se(self.rbr_reparam(inputs)))
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 460, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 456, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [32, 3, 3, 3], expected input[1, 1, 3, 416] to have 3 channels, but got 1 channels instead

Environment

Google Colab,
Computer having Ubuntu 22.04 and Python 3.11

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@nagarajuys nagarajuys added the bug Something isn't working label Feb 16, 2024
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