-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Yolov8 Bad detections #12631
Comments
@IbrahimAlmasri01 hi there! 😊 It sounds like you're working hard on training your model under challenging conditions! Here are a couple of suggestions that might help improve detection performance:
Here's how you can increase the input size for training in your YAML configuration file: # Example of increasing input resolution
image_size: 640 # Increase this size appropriate to your computational capabilities And for data augmentation, you might modify your dataset's settings to include random brightness and contrast adjustments: # Adding data augmentation in data.yaml
augmentations:
brightness: 0.1 # Adjust brightness by a factor of ±0.1
contrast: 0.2 # Adjust contrast by a factor of ±0.2 I hope these tips help! Let us know how it goes or if you need further assistance. Happy training! 🚀 |
Where can I find all the parameters that can be modified in augmentations? |
and I also want to know where I can modify the Anchor Boxes, thank you! |
Hello, thanks for your help! I want to confirm a thing I have read on the documentation which is that Yolo is made for speed and small pictures. Thus, large images might have low performance. My image is 2016 wide and 580 in height. Also, I have read that there is a parameter called reg_max, but its not available in YAML or the cfg ehich is related to anchor boxes. |
Hello @IbrahimAlmasri01, Yes, YOLO is indeed optimized for speed and generally performs well with standard resolution inputs, such as 640x640 pixels. Your image size of 2016x580 is significantly larger and may affect the detection performance if not handled correctly. Consider resizing your images to a smaller fixed size or using techniques like sliding windows if resizing changes the aspect ratio critically. Regarding the Here is an example of how you might alter anchor sizes in your configuration YAML: # Adjusting anchors for your data
anchors:
- [10,13, 16,30, 33,23] # smaller objects
- [30,61, 62,45, 59,119] # medium objects
- [116,90, 156,198, 373,326] # larger objects Adjust these based on your dataset specifics. Let me know if you need further assistance with this! |
@glenn-jocher hi |
Hello! 😊 Currently, To verify the effects of any data augmentation, you can visually inspect your training batches. Here's a quick example of how you might do this using Python: from ultralytics import YOLO, load_dataset
# Load your model and dataset
model = YOLO('yolov8n.pt')
dataset = load_dataset('path/to/your/data.yaml')
# Get a batch of images
imgs, labels, paths, shapes = dataset[0] # Adjust index for different batches
# Visualize
for img in imgs:
model.show(img) This will display the augmented images, allowing you to see the effects of your current augmentation settings. If you have further questions or need more specific guidance, feel free to ask! |
Search before asking
Question
Hello, I am training a model on objects that are small and with a varying lighting conditions.
I now have more than 1000 images, and the model is doing really bad in detection. I am not talking about misclassification.
Thus, is there any recommendations to solve this problem?
I have tried multiple hyperparameters and so on. But if there is anything else I am missing out please let me know !
Thanks
Additional
No response
The text was updated successfully, but these errors were encountered: