-
Notifications
You must be signed in to change notification settings - Fork 65
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
Encoding error by ultralytics prediction #39
Comments
Hey @SamuelHafner, thanks for the issue. A better solution could be as follows. Can you try it? cv_image = self.cv_bridge.imgmsg_to_cv2(msg, desired_encoding=msg.encoding) |
Hey @mgonzs13, thanks for your fast response. If I change the desired encoding for the image to |
If you don't want to modify yolov8_ros, you can try to add a node to remove the alpha channel and republish the image as bgr8. |
Yeah i could. But I added this desired_endcoding permanent now. Btw. these recordings are from robocup@home 2023 right? We also were there. Which team? :) |
I'd rather create a new node to filter the alpha channel or modify the yolov8 node to remove it since there are cameras that do not use bgr8. Those bags were provided to me by the Gentlebots team. |
Hi @mgonzs13,
thank you for your great work!!!
I have an error when when running the yolov8_node the self.yolo.predict cause an error (tried on 2 different cameras):
[yolov8_node-1] RuntimeError: Given groups=1, weight of size [48, 3, 3, 3], expected input[1, 4, 384, 640] to have 3 channels, but got 4 channels instead
I could fix this after i changed the desired encoding on the cv2_bridge:
from:
to
should we maybe add this permanent or is there some reason this encoding is empty?
The text was updated successfully, but these errors were encountered: