Skip to content

Commit

Permalink
Fixed: Oriented bounding boxes broken with COCO format (#5219)
Browse files Browse the repository at this point in the history
* Fixed: Oriented bounding boxes broken with COCO format

* Updated changelog
  • Loading branch information
bsekachev authored Nov 4, 2022
1 parent 82700f6 commit bca5bb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
- Job assignee can not resolve an issue (<https://github.com/opencv/cvat/pull/5167>)
- Create manifest with cvat/server docker container command (<https://github.com/opencv/cvat/pull/5172>)
- Cannot assign a resource to a user who has an organization (<https://github.com/opencv/cvat/pull/5218>)
- Oriented bounding boxes broken with COCO format ss(<https://github.com/opencv/cvat/pull/5219>)

### Security
- TDB
Expand Down
3 changes: 3 additions & 0 deletions cvat/apps/dataset_manager/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,6 +1747,7 @@ def reduce_fn(acc, v):
elif ann.type != dm.AnnotationType.skeleton:
points = ann.points

rotation = ann.attributes.pop('rotation', 0.0)
# Use safe casting to bool instead of plain reading
# because in some formats return type can be different
# from bool / None
Expand Down Expand Up @@ -1794,6 +1795,7 @@ def reduce_fn(acc, v):
z_order=ann.z_order if ann.type != dm.AnnotationType.cuboid_3d else 0,
group=group_map.get(ann.group, 0),
source=source,
rotation=rotation,
attributes=attributes,
elements=elements,
))
Expand All @@ -1818,6 +1820,7 @@ def reduce_fn(acc, v):
points=points,
z_order=ann.z_order if ann.type != dm.AnnotationType.cuboid_3d else 0,
source=source,
rotation=rotation,
attributes=attributes,
)

Expand Down

0 comments on commit bca5bb6

Please sign in to comment.