ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
49.69k stars 16.11k forks source link

Help regarding an issue asked 1 month ago #10630

Closed Pedro-Leitek closed 1 year ago

Pedro-Leitek commented 1 year ago

Search before asking

Question

Hi

It has been a month since I asked for help in this forum regarding the following issue.

https://github.com/ultralytics/yolov5/issues/10353

Can someone help?

Additional

No response

AI-Expert-04 commented 1 year ago

Hi.

I had a similar experience with you. I also took a soccer ball data set from roboflow and learned it. However, all similar things such as human faces, bicycle wheels, etc. were detected with soccer balls.

I found two problems.

The first question My learning image resolution was Full HD like yours. The resolution of the image predicting the result was 4K.

Come to think of it, it is different from full HD soccer balls and 4K soccer balls in pixels.

Yolo learns by calculating the image in pixel units in a convolutional CNN scheme.

In other words, if you learned with Full HD, it is better to use a Full HD prediction image.

The second question. It was not enough learning.

I thought that if there was a lot of images, I would be able to learn at least Yolo knew it was a model for performance instead of accuracy.

It would be nice to increase the number of lessons from 100.

I want you to change your way of learning.

If you learn again with --img 416 --batch 16 --epochs 100, you'll get good results.

Pedro-Leitek commented 1 year ago

My issue right now is not exactly the "common" false positives where the model detects similar objects as the target class. My issue right now is that, lets say I point the camera to a wall, and the whole frame appears with a bounding box saying a car was detected. But if I use a 4K imge of the same wall, the bounding box only appears at the top left of the image. I mean this is a weird behaviour. For the project this is unsustainable.

AI-Expert-04 commented 1 year ago

I understood what you said, but it is an error that occurs in the process of preventing NMS. When you use object_detection, tens of thousands draw boxes. Also, I think it's a model's prediction error. I also sometimes get things detected in the air. So far, artificial intelligence is the limit

Pedro-Leitek commented 1 year ago

Just wondering, the training images are in 640x640, and when I'm processing the image from the camera I resize it to 640x640 independently from resolution. If I train in 416x416 wouldn't the same issue happen?

AI-Expert-04 commented 1 year ago

Yes, I reduced the size of the image to 640 -> 416 and succeeded as a result of learning

github-actions[bot] commented 1 year ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

glenn-jocher commented 10 months ago

@AI-Expert-04 thanks for sharing your experience. It's true that training on a higher resolution (e.g., 416x416) can often help improve detection accuracy. Additionally, reducing the image size to match the training resolution is indeed a common practice to ensure consistent performance during inference. If you're still experiencing issues, it might help to verify if the training data and parameters are appropriate for your use case. 🤖