Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 3, 2022

Signed-off-by: Glenn Jocher [email protected]

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements to model loading and inference processes in YOLOv5.

πŸ“Š Key Changes

  • πŸ”§ Optimized output name retrieval for ONNX Runtime sessions.
  • βœ‚οΈ Simplified metadata loading from YAML files during model initialization.
  • πŸš€ Improved forward method by caching output names for ONNX and using torch.from_numpy for efficient tensor creation.
  • 🧹 Cleaned up conditional checks and default values in _load_metadata method.

🎯 Purpose & Impact

  • πŸš… Provides quicker setup for ONNX models by caching output names, leading to faster inference times.
  • πŸ“ Ensures more robust metadata handling, preventing errors and enabling smoother user experiences.
  • 🧠 Facilitates better memory management by avoiding unnecessary tensor conversions.
  • πŸ’Ό Reduces code complexity and potential bugs by refining the metadata loading process, beneficial for maintainers and contributors.

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher self-assigned this Sep 3, 2022
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit 63ecce6 into master Sep 3, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch September 3, 2022 23:33
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Update common.py

Signed-off-by: Glenn Jocher <[email protected]>

* Update common.py

Signed-off-by: Glenn Jocher <[email protected]>

* Update common.py

Signed-off-by: Glenn Jocher <[email protected]>

* Update common.py

Signed-off-by: Glenn Jocher <[email protected]>

Signed-off-by: Glenn Jocher <[email protected]>
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.

1 participant