Bounding box predictions are too small (too narrow) in yolov8
Closed this issue · 5 comments
Issue Type
Support
Source
source
Keras Version
2.15
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 20.04
Python version
3.10
GPU model and memory
No response
Current Behavior?
I am attempting to train a YOLOv8-Seg model on my custom dataset and have encountered a specific issue. My dataset contains images with objects that have a very elongated shape. Additionally, these objects are thin, an example of bounding box is this (xyxy bounding box format): [1577.0, 91.0, 3127.0, 297.0] .
As can be seen, the objects are very elongated in the x-axis direction. My problem is that the model predictions are not so elongated, since it only detects the central part of the objects, leaving the edges undetected. An example of detection for the previous case would be this one:
y_true: [1577.0, 91.0, 3127.0, 297.0]
y_pred: [1642.0, 93.0, 2960.0, 292.0]
I think it's a problem with the anchor boxes of the model, but I don't know how to solve it.
Could someone guide me on adjusting relevant settings to fix this problem?
Thank you in advance for your help!
Standalone code to reproduce the issue or tutorial link
I followed the following tutorial: https://keras.io/examples/vision/yolov8/
Relevant log output
No response
AFAIK, YoloV8 follows anchor-free approach, where predictions are made directly than offset from an anchor box.
What is the image resolution you are providing?
yes, you are right, im using 640x640, keeping the aspect ratio. The original size is 2100x3100.
@divyashreepathihalli @sampathweb could one of your take a look?
@JPmartinez99 for your usecase, maybe you can try adjusting the grid resolution here
You may want to increase the grid resolution to allow the model to better capture elongated objects.
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.