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

feature/115_how_to_select_detections_by_index #118

Merged
merged 2 commits into from Jun 5, 2023

Conversation

SkalskiP
Copy link
Collaborator

@SkalskiP SkalskiP commented Jun 5, 2023

Description

This PR extends the Detections API to allow selection in several new ways. PR implements the scope of work described in #115 issue.

import supervision as sv

detections = sv.Detections(...)

# select detections by index
first_detection = detections[0]

# select detections by list or array of indexes
few_detections = detections[[0, 2, 4]]

# select detections by index slice
first_detections = detections[:2]

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested?

More unit tests.

Docs

  • Docs updated? What were the changes:

@SkalskiP SkalskiP self-assigned this Jun 5, 2023
@SkalskiP SkalskiP added enhancement New feature or request version: 0.9.0 Feature to be added in `0.9.0` release labels Jun 5, 2023
@SkalskiP SkalskiP merged commit 86aee5e into main Jun 5, 2023
4 checks passed
@SkalskiP SkalskiP mentioned this pull request Jun 5, 2023
1 task
@SkalskiP SkalskiP deleted the feature/115_how_to_select_detections_by_index branch August 8, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request version: 0.9.0 Feature to be added in `0.9.0` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant