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

Add suffix checks #4711

Merged
merged 4 commits into from
Sep 8, 2021
Merged

Add suffix checks #4711

merged 4 commits into from
Sep 8, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 8, 2021

Add additional suffix checks on YAML files and weights files in train/val/detect. Clearer error messages should help remove ambiguity about what weights formats are accepted by which files.

Initiated due to #4708 (comment)

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced weight file and YAML configuration validation in YOLOv5 to improve reliability and user feedback.

📊 Key Changes

  • Added function check_suffix() to validate weight file extensions.
  • Added function check_yaml() to validate YAML files and ensure they have the correct .yaml or .yml suffix.
  • Replaced check_file() calls with check_suffix() and check_yaml() where appropriate across various files (e.g., detect.py, train.py, and val.py).
  • Updated import statements removing check_file and adding new utility functions.

🎯 Purpose & Impact

  • Purpose: To ensure that model weights and configuration files provided by users are valid, preventing confusions or errors caused by incorrect file types.
  • Impact: Users will experience more robust error handling and clear messaging when file extensions do not meet the expected criteria, leading to smoother setup and training processes in YOLOv5.

@glenn-jocher glenn-jocher merged commit a2b3c71 into master Sep 8, 2021
@glenn-jocher glenn-jocher deleted the check/suffixes branch September 8, 2021 12:36
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
* Add suffix checks

* Cleanup

* Cleanup2

* Cleanup3
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Add suffix checks

* Cleanup

* Cleanup2

* Cleanup3
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.

Getting _pickle.UnpicklingError: invalid load key, '$'. error while accessing the val.py after tflite export
1 participant