kornia/kornia
Ver no GitHub[Feature]: Replace manual DETR box processing with Kornia BoundingBox API
Open
#3.530 aberto em 27 de jan. de 2026
help wantedtriage
Métricas do repositório
- Stars
- (8.677 stars)
- Métricas de merge de PR
- (Mesclagem média 19d 9h) (7 fundiu PRs em 30d)
Description
Title: [Refactor] Replace manual DETR box processing with Kornia BoundingBox API
Description
The forward method in the DETR post-processor currently performs manual tensor arithmetic to convert bounding box coordinates and formats:
# Manual conversion from cxcywh -> xywh
cxcy, wh = boxes[..., :2], boxes[..., 2:]
boxes_xy = torch.cat([cxcy - wh * 0.5, wh], -1)
There are TODO and NOTE comments explicitly suggesting the replacement of this manual logic with Kornia's BoundingBox API or geometry functional API.
Using raw tensor operations for geometry is error-prone and less readable.
Goal
Refactor the post-processing logic to use Kornia's geometry primitives.