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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexibility in Detections.merge #1177

Merged
merged 10 commits into from
May 10, 2024
Merged

Conversation

LinasKo
Copy link
Collaborator

@LinasKo LinasKo commented May 8, 2024

Description

  • Detections.merge now merges detections when some of them are None or empty.
  • Missing keys in data should not be an issue, unless further detections containing new data in those.
  • Expanded tests with the new behaviour.

See the tests to see expected behaviour.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

馃摀 Google Colab

  • (Slicer with segmentation model still fails, but with a different error)
  • Roboflow model (with data is now merged with Detections.empty successfully).
  • Multiple new tests were written - all pass.

Any specific deployment considerations

None

Docs

  • Docs updated? What were the changes:

* Detections.merge is much friendlier now. If there's a None
  or an empty array, it will merge it happily rather than
  complaining that everything needs to be either None or [].
* Data merge follows suit.
@LinasKo LinasKo mentioned this pull request May 8, 2024
4 tasks
supervision/detection/utils.py Outdated Show resolved Hide resolved
supervision/detection/utils.py Outdated Show resolved Hide resolved
supervision/detection/utils.py Outdated Show resolved Hide resolved
supervision/detection/utils.py Show resolved Hide resolved
@LinasKo
Copy link
Collaborator Author

LinasKo commented May 9, 2024

@SkalskiP, resolved as requested. Ready for review.

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

2 participants