Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix automatic tag annotation support #7839

Merged
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
Loading