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

data.yaml names.keys() integer assert #10190

Merged
merged 2 commits into from
Nov 17, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 17, 2022

Check to avoid #10180

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved data integrity checks for dataset labels in YOLOv5.

πŸ“Š Key Changes

  • Converted the label format in the dataset configuration from a list or tuple to a dictionary if not already in dictionary form.
  • Added an assertion to ensure that all keys in the data['names'] dictionary are integers, reinforcing consistent label formatting.

🎯 Purpose & Impact

  • Ensures that the names of the classes in the dataset configuration (data.yaml) are always stored in a dictionary format with integer keys, which is more reliable and less prone to errors. πŸ› οΈ
  • The added integer key assertion prevents potential issues with class indexing, leading to more robust and predictable behavior when training models. πŸ“ˆ
  • Users will benefit from more stable input data handling, which can improve the training process's efficiency and accuracy. πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher linked an issue Nov 17, 2022 that may be closed by this pull request
1 task
@glenn-jocher glenn-jocher self-assigned this Nov 17, 2022
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit 1510111 into master Nov 17, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-3 branch November 17, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to Infer from a trained custom model
1 participant