Skip to content

Commit

Permalink
fix: fix bbox conversion to Pascal VOC to use 1-based pixel index
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsbarnard committed Aug 1, 2024
1 parent 67613f9 commit 440afb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fathomnet/dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def to_pascal_voc(
E.difficult("0"),
E.occluded(str(int(box.occluded) if box.occluded is not None else 0)),
E.bndbox(
E.xmin(str(box.x)),
E.xmax(str(box.x + box.width)),
E.ymin(str(box.y)),
E.ymax(str(box.y + box.height)),
E.xmin(str(1 + box.x)),
E.xmax(str(1 + box.x + box.width)),
E.ymin(str(1 + box.y)),
E.ymax(str(1 + box.y + box.height)),
),
)
for box in boxes
Expand Down

0 comments on commit 440afb0

Please sign in to comment.