Help regarding a custom loss for yolov8 #17189
Replies: 2 comments
-
👋 Hello @Shaurya-Rathore, thank you for reaching out to Ultralytics 🚀! For customizing a loss function with YOLOv8, you're diving into an advanced topic, and we appreciate your interest and initiative! For your specific questions about shape transformations and target preparations, I recommend checking out our detailed Docs for more insights into model architecture and data handling. If this is a 🐛 Bug Report, please provide a Minimum Reproducible Example (MRE) to help us understand and potentially resolve any issues. If this is a custom training ❓ question, providing additional context such as the dataset, example images, and any relevant logs can be helpful. Ensure you're considering our Tips for Best Training Results, which might offer some guidance on resolving common pitfalls. Meanwhile, it might be helpful to connect with our vibrant Ultralytics community! For real-time assistance, you can join our Discord 🎧. Alternatively, for more in-depth conversations, visit our Discourse or check out threads on our Subreddit. UpgradeMake sure your pip install -U ultralytics EnvironmentsExplore running YOLOv8 in various verified environments, which come with preinstalled dependencies like CUDA, Python, and PyTorch:
Your query will be addressed by an Ultralytics engineer soon to provide more specific guidance. Thanks again for your patience and interest in leveraging Ultralytics tools! 😊 |
Beta Was this translation helpful? Give feedback.
-
@Shaurya-Rathore for custom loss functions in YOLOv8, ensure your predictions and targets match in shape. Predictions should be reshaped to match your target format, typically |
Beta Was this translation helpful? Give feedback.
-
I am trying to run a custom loss function. Im getting the head output shape as 1,10,8400(6 classes + x y w h). Im unsure what the shapes of the targets and the predictions should be and what steps I am missing between 1,10,8400 to the required prediciton shape. Also in what manner should I be extracting the data from the yaml as in with what split.
Beta Was this translation helpful? Give feedback.
All reactions