yolov6-ros
yolov6-ros copied to clipboard
Removing A layer from RGBA images, Bounding Boxes and rescaling inaccurate
Hi sometimes images arrive from cmaeras as BGRA images. In detect.py, line 115 you might want to add the following lines of codes and checks
if np_img_resized.shape[2] == 4: #Removing extra channel if RGBA np_img_resized = np_img_resized[:,:,:3]
Other cases might be handled here in a similar fashion.
This also applies to your yolov7 repo.
Furthermore, I noticed that the bounding boxes that I visualize in ROS are not extremely precise. I think somewhere in the code there is some error in the re-shaping or re-drawing of the scaled images and detection. Have a look at the image below
the Bounding Boxes seem a little bit too long IMO
Hi @robertokcanale, thanks for pointing that out! Regarding the bounding box scale: I noticed this also recently, I think there was a bug in the rescaling function of the original Yolo implementation. Did you already see my latest commit?
Hi, @lukazso, yes I just checked the last commit and it now shows exactly what I expected, congrats!
I will test it as well on yolov7.
However, is it my impression or is there some delay between the image and the output prediction? Just checking if its something that is happening locally with my configuration/hardware