Skip to content

Add support for TrainingSlicer #1996

Description

@nicholasgcoles

Search before asking

  • I have searched the Supervision issues and found no similar feature requests.

Description

I am happy to give this a shot, but wanted to make sure this would be useful.

For small object detection, I think it would be useful to slice training images. It would need a slightly different interface to InferenceSlicer.

Something like:

class TrainingSlicer:

    def __init__(
        self,
        callback: Callable[[np.ndarray, Detections], list[tuple[np.ndarray, Detections]]],
        slice_wh: tuple[int, int] = (320, 320),
        ....
    ):

    def __call__(self, image: np.ndarray, detections: Detections) -> list[tuple[np.ndarray, Detections]]:
        pass

Use case

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions