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

Scope torchvision.utils.draw_bounding_boxes import #8915

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 9, 2022

Quick fix for #8898 (comment) until a more permanent fix is implemented

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Update to ClearML logger dependency in YOLOv5 for bounding box visualization.

πŸ“Š Key Changes

  • Moved the import statement for draw_bounding_boxes from torchvision.utils inside the try-except block.

🎯 Purpose & Impact

  • πŸ” The change ensures compatibility with specific versions of the torchvision package (enforcing a minimum version of 0.9.0).
  • βœ… Users will benefit from more reliable bounding box visualizations when using ClearML with YOLOv5 as this prevents import errors related to version mismatches.
  • ⏩ Developers can ensure that the necessary prerequisites are met for proper logger functionality, reducing potential issues with dependencies.

Quick fix for #8898 (comment) until a more permanent fix is implemented
@glenn-jocher glenn-jocher self-assigned this Aug 9, 2022
@glenn-jocher glenn-jocher merged commit 7ab1f50 into master Aug 9, 2022
@glenn-jocher glenn-jocher deleted the fix/clearml_torchvision branch August 9, 2022 18:29
@glenn-jocher glenn-jocher linked an issue Aug 9, 2022 that may be closed by this pull request
2 tasks
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Scope `torchvision.utils.draw_bounding_boxes` import

Quick fix for ultralytics#8898 (comment) until a more permanent fix is implemented

* Update clearml_utils.py
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.

ImportError: cannot import name 'draw_bounding_boxes' from 'torchvision.utils'
1 participant