Open B1SH0PP opened 2 weeks ago
π Hello @B1SH0PP, thank you for your interest in Ultralytics YOLOv8 π! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
If this is a π Bug Report, please provide a minimum reproducible example to help us debug it.
If this is a custom training β Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Join the vibrant Ultralytics Discord π§ community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
Pip install the ultralytics
package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
@glenn-jocher
Hello @B1SH0PP,
Thank you for reaching out and sharing your training experience with YOLOv8-OBB on the DOTAv1.0 dataset. Achieving optimal results can indeed be challenging, but there are several strategies and hyperparameter adjustments you can consider to improve your model's performance.
Learning Rate and Scheduler:
cos_lr
is a good choice, you might want to experiment with different learning rates and schedulers. Sometimes, a lower initial learning rate can help the model converge better.Augmentation:
Batch Size:
Hyperparameters:
momentum
, weight_decay
, and optimizer
can also lead to better results. You can refer to the Ultralytics documentation for detailed descriptions and recommended values.Multi-Scale Training:
Validation and Early Stopping:
Here is an example of a training script with some adjusted hyperparameters:
from ultralytics import YOLO
# Load a model
model = YOLO("yolov8n-obb.pt") # load a pretrained model
# Train the model
results = model.train(
data="dota8.yaml",
epochs=300,
imgsz=640,
lr0=0.001,
lrf=0.01,
momentum=0.937,
weight_decay=0.0005,
warmup_epochs=3.0,
warmup_momentum=0.8,
warmup_bias_lr=0.1,
multi_scale=True,
cos_lr=True,
augment=True
)
For more detailed guidance, please refer to the Oriented Bounding Boxes (OBB) documentation. This resource provides comprehensive information on training, validation, and exporting OBB models.
Feel free to experiment with these suggestions and monitor the impact on your model's performance. If you have any further questions or need additional assistance, don't hesitate to ask. Happy training! π
I am very happy to receive your help. Your suggestions have inspired me and I will continue to try to achieve better results.
Hello @B1SH0PP,
I'm glad to hear that you found the suggestions helpful! π
As you continue to experiment with your YOLOv8-OBB model, remember that fine-tuning and iterative adjustments are key to achieving optimal performance. If you encounter any specific issues or have further questions during your training process, feel free to reach out.
Also, ensure that you are using the latest versions of torch
and ultralytics
to benefit from the latest features and bug fixes. If you run into any bugs, please provide a minimum reproducible code example as outlined in our documentation. This will help us investigate and address any issues more effectively.
Best of luck with your training, and happy experimenting! π
Thank you for your valuable advice, I checked my torch
version and I really need to upgrade torch
.
I always thought that the torch
version had little effect on accuracy.
Hello @B1SH0PP,
Thank you for your comment! While it's a common assumption that the torch
version might not significantly impact accuracy, it's important to note that different versions of torch
can include various optimizations, bug fixes, and new features that can affect model performance and training stability.
Upgrading to the latest versions of torch
and ultralytics
ensures that you benefit from these improvements and helps avoid potential compatibility issues. If you encounter any specific problems or bugs, please provide a minimum reproducible code example as outlined in our documentation. This will help us investigate and address any issues more effectively.
Feel free to continue experimenting and let us know if you have any further questions or need additional assistance. We're here to help! π
Search before asking
Question
Hello, when I trained Yolov8-obb on DOTAv1.0 ββfrom scratch, I still couldn't achieve good results. I trained for 300 epochs, but the map could only reach 58. Ultralytics, do you use any tricks, or do you have any training suggestions? By the way, can you share your training hyperparameters?
Additional
No response