Skip to content

Move supervision to an optional extra #1074

@robmarkcole

Description

@robmarkcole

Search before asking

  • I have searched the RF-DETR issues and found no similar feature requests.

Description

RF-DETR currently requires supervision as a core dependency, mainly because public inference APIs return sv.Detections and docs/examples use Supervision annotators.

For users who only need model training or basic inference, this pulls in extra dependencies, including OpenCV transitively. It would be useful to support a minimal install path that can train and run inference without supervision.

Suggested direction:

  • Move supervision out of base dependencies and into an extra
  • Keep core model forward, training, and basic inference working without supervision.
  • Return a lightweight native result type or plain dict/list from minimal inference.
  • Provide optional helpers to convert native outputs to sv.Detections when supervision is installed.
  • Move annotation/video/visualization examples behind the documented extra.

Acceptance criteria:

  • Base install can train and run basic image inference without supervision.
  • sv.Detections support remains available through an optional extra.
  • Missing optional dependency errors include clear install guidance.

Use case

No response

Additional

No response

Are you willing to submit a PR?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions