Skip to content

Commit

Permalink
Fix automatic tag annotation support (#7839)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerferhatt committed May 30, 2024
1 parent da71018 commit 483502a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- A classifier model can not be used on annotation view (unknown object shape error)
(<https://github.com/cvat-ai/cvat/pull/7839>)
4 changes: 2 additions & 2 deletions cvat-core/src/lambda-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) 2022-2023 CVAT.ai Corporation
// Copyright (C) 2022-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -21,7 +21,7 @@ export interface InteractorResults {
}

export interface DetectedShape {
type: ShapeType;
type: ShapeType | 'tag';
rotation?: number;
attributes: { name: string; value: string }[];
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,16 @@ export class ToolsControlComponent extends React.PureComponent<Props, State> {

if (!jobLabel) return null;

if (data.type === 'tag') {
return new core.classes.ObjectState({
frame,
label: jobLabel,
attributes: loadAttributes(data.attributes, jobLabel),
objectType: ObjectType.TAG,
source: core.enums.Source.AUTO,
});
}

const objectData = {
label: jobLabel,
objectType: ObjectType.SHAPE,
Expand Down

0 comments on commit 483502a

Please sign in to comment.