Skip to content

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'

2 participants