Skip to content

Accept PyTorch tensors and JAX arrays as inputs out of the box #74

Description

@Smirkey

It would be great if powerboxes could accept common tensor / array types directly, especially:

  • PyTorch tensors
  • JAX arrays
  • NumPy arrays

The goal is to let users call powerboxes APIs without having to manually convert inputs first.

For example, this should ideally work out of the box:

pb.iou(torch_boxes, other_torch_boxes)
pb.nms(torch_boxes, scores)
pb.area(jax_boxes)
pb.convert(boxes, in_fmt="xywh", out_fmt="xyxy")

A few important points i think:

  • framework support should remain optional if possible
  • format / dtype semantics should stay explicit and predictable
  • behaviour should be consistent across supported input types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions