Skip to content

Question about converting custom dataset to coco api #1617

Closed
@kangkang59812

Description

@kangkang59812

bboxes[:, 2:] -= bboxes[:, :2]

If the box is [3,10,6,20](xyxy format),the converted box should be [3,10,4,11]. I think this code should be added 1. Because there are 4 pixels between [3,6] and 11 pixels between [10,20]. It actually computes the pixels in grid.
May be the original computation of the area need to do this as well. Such as this tutorial, https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html
area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions