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

Bounding box predictions are too small (too narrow) in yolov8 #1712

Closed
JPmartinez99 opened this issue Jan 5, 2024 · 5 comments
Closed

Bounding box predictions are too small (too narrow) in yolov8 #1712

JPmartinez99 opened this issue Jan 5, 2024 · 5 comments

Comments

@JPmartinez99
Copy link

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

@sachinprasadhs
Copy link
Collaborator

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?

@JPmartinez99
Copy link
Author

yes, you are right, im using 640x640, keeping the aspect ratio. The original size is 2100x3100.

@mattdangerw
Copy link
Member

@divyashreepathihalli @sampathweb could one of your take a look?

@divyashreepathihalli
Copy link
Contributor

@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.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants