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

Code refactor #7923

Merged
merged 3 commits into from
May 22, 2022
Merged

Code refactor #7923

merged 3 commits into from
May 22, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 22, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement and optimization of the Ultralytics YOLOv5 codebase for better performance and maintenance.

πŸ“Š Key Changes

  • Improved REST API route check for the POST method.
  • Simplified file write permission check function removing an unnecessary conditional branch.
  • Optimized checking for Chinese characters in strings using bool for clarity.
  • Streamlined truthy check on file paths.
  • Refined dataset downloading logic, prioritizing direct downloads over alternative methods.
  • Cleaned up URL to file conversion function to be more concise.
  • Updated image weighting function for simplicity and performance.
  • Removed an unused list conversion in the coco80_to_coco91_class function.
  • Enhanced logging output readability by using f-strings.
  • Removed commented out code and unnecessary variables for clarity.

🎯 Purpose & Impact

  • Ensure cleaner, more readable code, which makes it easier for developers to work on and contribute to the project. πŸ§ΉπŸ‘¨β€πŸ’»
  • Performance tweaks might lead to minor speed improvements in file operations and data processing. ⚑️
  • Logging improvements make it easier for users to follow what's happening, helping with debugging and general understanding. πŸͺ΅πŸ”Ž
  • Overall, these changes contribute to a more efficient and maintainable codebase, potentially reducing bugs and paving the way for future features. πŸš€πŸ”§

@glenn-jocher glenn-jocher self-assigned this May 22, 2022
@glenn-jocher glenn-jocher changed the title Code refactor for general.py Code refactor May 22, 2022
@glenn-jocher glenn-jocher merged commit cee5959 into master May 22, 2022
@glenn-jocher glenn-jocher deleted the update/general branch May 22, 2022 13:24
tdhooghe pushed a commit to tdhooghe/yolov5 that referenced this pull request Jun 10, 2022
* Code refactor for general.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Code refactor for general.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

None yet

1 participant