Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Support rotation in detector results (cvat-ai#6961)
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamKyle authored and mikhail-treskin committed Oct 25, 2023
1 parent bf22f8d commit 22dfe07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,9 @@ export class ToolsControlComponent extends React.PureComponent<Props, State> {
objectType: ObjectType.SHAPE,
frame,
occluded: false,
rotation: [
ShapeType.RECTANGLE, ShapeType.ELLIPSE,
].includes(data.type) ? (data.rotation || 0) : 0,
source: core.enums.Source.AUTO,
attributes: (data.attributes as { name: string, value: string }[])
.reduce((acc, attr) => {
Expand Down
3 changes: 3 additions & 0 deletions cvat/apps/lambda_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ def reset(self):
"source": "auto"
}

if shape["type"] in ("rectangle", "ellipse"):
shape["rotation"] = anno.get("rotation", 0)

if anno["type"] == "mask" and "points" in anno and conv_mask_to_poly:
shape["type"] = "polygon"
shape["points"] = anno["points"]
Expand Down

0 comments on commit 22dfe07

Please sign in to comment.