Annotations potentially misaligned

Object detection Project (YOLOv8)

When generating the dataset In RoboFlow, I opted not to resize images because to my knowledge Yolov8 will resize the images to 640 pixels in length and maintain the aspect ratio. but when looking at the dataset the annotations seem off, is this normal? And is it good practice to resize the images before training on YOLOv8

Based on the information provided in the extracts, it’s important to note that resizing images is a crucial step in preparing your dataset for object detection models. This is because many neural networks require images to be square, even if the original images are not. Resizing isn’t a simple stretch-to-fill decision as one needs to consider maintaining aspect ratio and how images in inference may vary from those in training (source).

In the context of YOLOv8, while the model might resize the images during training, it’s still recommended to resize your images during the preprocessing stage. This is because the annotations (bounding boxes) need to be updated to match the newly sized images. If the images are resized without updating the annotations, it could lead to misaligned bounding boxes, which might be the issue you’re experiencing (source).

Roboflow provides tools for resizing images and updating annotations to match the newly sized images. It also offers a health check feature to verify the correctness of your annotations and other aspects of your dataset (source).

Therefore, it’s generally a good practice to resize your images and update the annotations accordingly before training your model, even if the model itself performs resizing during training. This ensures that your annotations are accurate and aligned with your images, leading to better training results.

Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, and forum. If this solves your issue, please mark it as the solution using the checkbox icon. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.