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

Update DetectMultiBackend for tuple outputs 2 #9275

Merged
merged 7 commits into from
Sep 4, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

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

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

๐Ÿ› ๏ธ PR Summary

Made with โค๏ธ by Ultralytics Actions

๐ŸŒŸ Summary

Improved model inference and validation by streamlining output handling.

๐Ÿ“Š Key Changes

  • ๐Ÿ”จ Modified forward method in common.py to handle outputs more effectively.
  • ๐Ÿšฎ Removed val parameter from forward method to simplify the calling interface.
  • โž• Added from_numpy method to convert NumPy arrays to PyTorch tensors only when necessary.
  • โœจ Updated non_max_suppression in general.py to accept list/tuple inputs, catering to different model output types.
  • ๐Ÿงน Cleaned up inference and loss computation in val.py by eliminating unnecessary conditionals.

๐ŸŽฏ Purpose & Impact

  • ๐Ÿš€ Streamlining the output processing enhances code maintainability and reduces potential for bugs.
  • ๐Ÿ“ˆ The removal of superfluous parameters leads to clearer function calls, making the API easier for developers to use.
  • ๐Ÿง  The impact on users includes potentially faster inference times and smoother integration when using the model for different purposes, such as training or validation.

@glenn-jocher glenn-jocher merged commit 7aa263c into master Sep 4, 2022
@glenn-jocher glenn-jocher deleted the update/dmb branch September 4, 2022 13:39
@glenn-jocher glenn-jocher self-assigned this Sep 4, 2022
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Update DetectMultiBackend for tuple outputs 2

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

* Update

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

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

* Update

* Update

* Update

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