Skip to content

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
@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.

1 participant