Skip to content

Commit d5ef45a

Browse files
authored
Release v2.4.4
### Added - Introduced a new configuration option for controlling the invocation of Nuclio functions. (<#6146>) ### Changed - Relocated SAM masks decoder to frontend operation. (<#6019>) - Switched `person-reidentification-retail-0300` and `faster_rcnn_inception_v2_coco` Nuclio functions with `person-reidentification-retail-0277` and `faster_rcnn_inception_resnet_v2_atrous_coco` respectively. (<#6129>) - Upgraded OpenVINO-based Nuclio functions to utilize the OpenVINO 2022.3 runtime. (<#6129>) ### Fixed - Resolved issues with tracking multiple objects (30 and more) using the TransT tracker. (<#6073>) - Addressed azure.core.exceptions.ResourceExistsError: The specified blob already exists. (<#6082>) - Corrected image scaling issues when transitioning between images of different resolutions. (<#6081>) - Fixed inaccurate reporting of completed job counts. (<#6098>) - Allowed OpenVINO-based Nuclio functions to be deployed to Kubernetes. (<#6129>) - Improved skeleton size checks after drawing. (<#6156>) - Fixed HRNet CPU serverless function. (<#6150>) - Prevented sending of empty list of events. (<#6154>)
2 parents 8a2c23f + fa4a200 commit d5ef45a

File tree

95 files changed

+1601
-647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1601
-647
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"npm.exclude": "**/.env/**",
2121
"licenser.license": "Custom",
22-
"licenser.customHeader": "Copyright (C) @YEAR@ Intel Corporation\n\nSPDX-License-Identifier: MIT",
22+
"licenser.customHeader": "Copyright (C) @YEAR@ CVAT.ai Corporation\n\nSPDX-License-Identifier: MIT",
2323
"files.trimTrailingWhitespace": true,
2424
"sqltools.connections": [
2525
{

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## \[2.4.4] - 2023-05-18
9+
### Added
10+
- Introduced a new configuration option for controlling the invocation of Nuclio functions.
11+
(<https://github.com/opencv/cvat/pull/6146>)
12+
13+
### Changed
14+
- Relocated SAM masks decoder to frontend operation.
15+
(<https://github.com/opencv/cvat/pull/6019>)
16+
- Switched `person-reidentification-retail-0300` and `faster_rcnn_inception_v2_coco` Nuclio functions with `person-reidentification-retail-0277` and `faster_rcnn_inception_resnet_v2_atrous_coco` respectively.
17+
(<https://github.com/opencv/cvat/pull/6129>)
18+
- Upgraded OpenVINO-based Nuclio functions to utilize the OpenVINO 2022.3 runtime.
19+
(<https://github.com/opencv/cvat/pull/6129>)
20+
21+
### Fixed
22+
- Resolved issues with tracking multiple objects (30 and more) using the TransT tracker.
23+
(<https://github.com/opencv/cvat/pull/6073>)
24+
- Addressed azure.core.exceptions.ResourceExistsError: The specified blob already exists.
25+
(<https://github.com/opencv/cvat/pull/6082>)
26+
- Corrected image scaling issues when transitioning between images of different resolutions.
27+
(<https://github.com/opencv/cvat/pull/6081>)
28+
- Fixed inaccurate reporting of completed job counts.
29+
(<https://github.com/opencv/cvat/issues/6098>)
30+
- Allowed OpenVINO-based Nuclio functions to be deployed to Kubernetes.
31+
(<https://github.com/opencv/cvat/pull/6129>)
32+
- Improved skeleton size checks after drawing.
33+
(<https://github.com/opencv/cvat/pull/6156>)
34+
- Fixed HRNet CPU serverless function.
35+
(<https://github.com/opencv/cvat/pull/6150>)
36+
- Prevented sending of empty list of events.
37+
(<https://github.com/opencv/cvat/pull/6154>)
38+
839
## \[2.4.3] - 2023-04-24
940
### Changed
1041
- Docker images no longer include Ubuntu package sources or FFmpeg/OpenH264 sources

cvat-canvas/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-canvas",
3-
"version": "2.16.3",
3+
"version": "2.16.6",
44
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
55
"main": "src/canvas.ts",
66
"scripts": {

cvat-canvas/src/typescript/canvasModel.ts

+35-4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface Configuration {
7777
shapeOpacity?: number;
7878
controlPointsSize?: number;
7979
outlinedBorders?: string | false;
80+
resetZoom?: boolean;
8081
}
8182

8283
export interface BrushTool {
@@ -160,6 +161,7 @@ export enum UpdateReasons {
160161
IMAGE_ZOOMED = 'image_zoomed',
161162
IMAGE_FITTED = 'image_fitted',
162163
IMAGE_MOVED = 'image_moved',
164+
IMAGE_ROTATED = 'image_rotated',
163165
GRID_UPDATED = 'grid_updated',
164166

165167
ISSUE_REGIONS_UPDATED = 'issue_regions_updated',
@@ -312,11 +314,12 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
312314
imageIsDeleted: boolean;
313315
focusData: FocusData;
314316
gridSize: Size;
315-
left: number;
316317
objects: any[];
317318
issueRegions: Record<number, { hidden: boolean; points: number[] }>;
318319
scale: number;
319320
top: number;
321+
left: number;
322+
fittedScale: number;
320323
zLayer: number | null;
321324
drawData: DrawData;
322325
editData: MasksEditData;
@@ -355,6 +358,7 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
355358
selectedShapeOpacity: 0.5,
356359
shapeOpacity: 0.2,
357360
outlinedBorders: false,
361+
resetZoom: true,
358362
textFontSize: consts.DEFAULT_SHAPE_TEXT_SIZE,
359363
controlPointsSize: consts.BASE_POINT_SIZE,
360364
textPosition: consts.DEFAULT_SHAPE_TEXT_POSITION,
@@ -378,11 +382,12 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
378382
height: 100,
379383
width: 100,
380384
},
381-
left: 0,
382385
objects: [],
383386
issueRegions: {},
384387
scale: 1,
385388
top: 0,
389+
left: 0,
390+
fittedScale: 0,
386391
zLayer: null,
387392
selected: null,
388393
mode: Mode.IDLE,
@@ -506,6 +511,12 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
506511
return;
507512
}
508513

514+
const relativeScaling = this.data.scale / this.data.fittedScale;
515+
const prevImageLeft = this.data.left;
516+
const prevImageTop = this.data.top;
517+
const prevImageWidth = this.data.imageSize.width;
518+
const prevImageHeight = this.data.imageSize.height;
519+
509520
this.data.imageSize = {
510521
height: frameData.height as number,
511522
width: frameData.width as number,
@@ -516,6 +527,20 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
516527
if (this.data.imageIsDeleted) {
517528
this.data.angle = 0;
518529
}
530+
531+
this.fit();
532+
533+
// restore correct image position after switching to a new frame
534+
// if corresponding option is disabled
535+
// prevImageHeight and prevImageWidth are initialized by 0 by default
536+
if (prevImageHeight !== 0 && prevImageWidth !== 0 && !this.data.configuration.resetZoom) {
537+
const leftOffset = Math.round((this.data.imageSize.width - prevImageWidth) / 2);
538+
const topOffset = Math.round((this.data.imageSize.height - prevImageHeight) / 2);
539+
this.data.left = prevImageLeft - leftOffset;
540+
this.data.top = prevImageTop - topOffset;
541+
this.data.scale *= relativeScaling;
542+
}
543+
519544
this.notify(UpdateReasons.IMAGE_CHANGED);
520545
this.data.zLayer = zLayer;
521546
this.data.objects = objectStates;
@@ -562,7 +587,7 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
562587
public rotate(rotationAngle: number): void {
563588
if (this.data.angle !== rotationAngle && !this.data.imageIsDeleted) {
564589
this.data.angle = (360 + Math.floor(rotationAngle / 90) * 90) % 360;
565-
this.fit();
590+
this.notify(UpdateReasons.IMAGE_ROTATED);
566591
}
567592
}
568593

@@ -592,10 +617,13 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
592617
}
593618

594619
this.data.scale = Math.min(Math.max(this.data.scale, FrameZoom.MIN), FrameZoom.MAX);
595-
596620
this.data.top = this.data.canvasSize.height / 2 - this.data.imageSize.height / 2;
597621
this.data.left = this.data.canvasSize.width / 2 - this.data.imageSize.width / 2;
598622

623+
// scale is changed during zooming or translating
624+
// so, remember fitted scale to compute fit-relative scaling
625+
this.data.fittedScale = this.data.scale;
626+
599627
this.notify(UpdateReasons.IMAGE_FITTED);
600628
}
601629

@@ -813,6 +841,9 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
813841
if (typeof configuration.forceFrameUpdate === 'boolean') {
814842
this.data.configuration.forceFrameUpdate = configuration.forceFrameUpdate;
815843
}
844+
if (typeof configuration.resetZoom === 'boolean') {
845+
this.data.configuration.resetZoom = configuration.resetZoom;
846+
}
816847
if (typeof configuration.selectedShapeOpacity === 'number') {
817848
this.data.configuration.selectedShapeOpacity = configuration.selectedShapeOpacity;
818849
}

cvat-canvas/src/typescript/canvasView.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,12 @@ export class CanvasViewImpl implements CanvasView, Listener {
12201220
// Setup event handlers
12211221
this.canvas.addEventListener('dblclick', (e: MouseEvent): void => {
12221222
this.controller.fit();
1223+
this.canvas.dispatchEvent(
1224+
new CustomEvent('canvas.fit', {
1225+
bubbles: false,
1226+
cancelable: true,
1227+
}),
1228+
);
12231229
e.preventDefault();
12241230
});
12251231

@@ -1460,14 +1466,8 @@ export class CanvasViewImpl implements CanvasView, Listener {
14601466
} else if ([UpdateReasons.IMAGE_ZOOMED, UpdateReasons.IMAGE_FITTED].includes(reason)) {
14611467
this.moveCanvas();
14621468
this.transformCanvas();
1463-
if (reason === UpdateReasons.IMAGE_FITTED) {
1464-
this.canvas.dispatchEvent(
1465-
new CustomEvent('canvas.fit', {
1466-
bubbles: false,
1467-
cancelable: true,
1468-
}),
1469-
);
1470-
}
1469+
} else if (reason === UpdateReasons.IMAGE_ROTATED) {
1470+
this.transformCanvas();
14711471
} else if (reason === UpdateReasons.IMAGE_MOVED) {
14721472
this.moveCanvas();
14731473
} else if (reason === UpdateReasons.OBJECTS_UPDATED) {

cvat-canvas/src/typescript/drawHandler.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ function checkConstraint(shapeType: string, points: number[], box: Box | null =
7272
(points.length === 2 * 2 && (points[2] - points[0]) * (points[3] - points[1]) >= consts.AREA_THRESHOLD);
7373
}
7474

75+
if (shapeType === 'skeleton') {
76+
const [xtl, ytl, xbr, ybr] = points;
77+
return (xbr - xtl >= 1 || ybr - ytl >= 1);
78+
}
79+
7580
return false;
7681
}
7782

@@ -762,7 +767,7 @@ export class DrawHandlerImpl implements DrawHandler {
762767
this.release();
763768

764769
if (this.canceled) return;
765-
if (checkConstraint('rectangle', [xtl, ytl, xbr, ybr])) {
770+
if (checkConstraint('skeleton', [xtl, ytl, xbr, ybr])) {
766771
this.onDrawDone({
767772
clientID,
768773
shapeType,

cvat-canvas/src/typescript/interactionHandler.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (C) 2020-2022 Intel Corporation
2+
// Copyright (C) 2023 CVAT.ai Corporation
23
//
34
// SPDX-License-Identifier: MIT
45

@@ -146,13 +147,13 @@ export class InteractionHandlerImpl implements InteractionHandler {
146147
_e.stopPropagation();
147148
self.remove();
148149
this.shapesWereUpdated = true;
149-
const shouldRaiseEvent = this.shouldRaiseEvent(_e.ctrlKey);
150150
this.interactionShapes = this.interactionShapes.filter(
151151
(shape: SVG.Shape): boolean => shape !== self,
152152
);
153153
if (this.interactionData.startWithBox && this.interactionShapes.length === 1) {
154154
this.interactionShapes[0].style({ visibility: '' });
155155
}
156+
const shouldRaiseEvent = this.shouldRaiseEvent(_e.ctrlKey);
156157
if (shouldRaiseEvent) {
157158
this.onInteraction(this.prepareResult(), true, false);
158159
}
@@ -314,7 +315,7 @@ export class InteractionHandlerImpl implements InteractionHandler {
314315
'pointer-events': 'none',
315316
opacity: 0.5,
316317
}).addClass('cvat_canvas_interact_intermediate_shape');
317-
image.move(this.geometry.offset, this.geometry.offset);
318+
image.move(this.geometry.offset + left, this.geometry.offset + top);
318319
this.drawnIntermediateShape = image;
319320

320321
imageDataToDataURL(

cvat-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-core",
3-
"version": "9.0.1",
3+
"version": "9.1.1",
44
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
55
"main": "src/api.ts",
66
"scripts": {

cvat-core/src/lambda-manager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class LambdaManager {
126126

127127
if (response.status === RQStatus.QUEUED || response.status === RQStatus.STARTED) {
128128
onUpdate(response.status, response.progress || 0);
129-
this.listening[requestID].timeout = setTimeout(timeoutCallback, 2000);
129+
this.listening[requestID].timeout = setTimeout(timeoutCallback, 20000);
130130
} else {
131131
if (response.status === RQStatus.FINISHED) {
132132
onUpdate(response.status, response.progress || 100);
@@ -148,7 +148,7 @@ class LambdaManager {
148148
this.listening[requestID] = {
149149
onUpdate,
150150
functionID,
151-
timeout: setTimeout(timeoutCallback, 2000),
151+
timeout: setTimeout(timeoutCallback, 20000),
152152
};
153153
}
154154

cvat-core/src/logger-storage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Object.defineProperties(LoggerStorage.prototype.save, {
160160
writable: false,
161161
enumerable: false,
162162
value: async function implementation() {
163-
if (!this.collection) {
163+
if (!this.collection.length) {
164164
return;
165165
}
166166

cvat-core/src/plugins.ts

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
// Copyright (C) 2019-2022 Intel Corporation
2+
// Copyright (C) 2023 CVAT.ai Corporation
23
//
34
// SPDX-License-Identifier: MIT
45

56
import { PluginError } from './exceptions';
67

78
const plugins = [];
9+
10+
export interface APIWrapperEnterOptions {
11+
preventMethodCall?: boolean;
12+
}
13+
814
export default class PluginRegistry {
915
static async apiWrapper(wrappedFunc, ...args) {
10-
// I have to optimize the wrapper
1116
const pluginList = await PluginRegistry.list();
17+
const aggregatedOptions: APIWrapperEnterOptions = {
18+
preventMethodCall: false,
19+
};
20+
1221
for (const plugin of pluginList) {
1322
const pluginDecorators = plugin.functions.filter((obj) => obj.callback === wrappedFunc)[0];
1423
if (pluginDecorators && pluginDecorators.enter) {
1524
try {
16-
await pluginDecorators.enter.call(this, plugin, ...args);
25+
const options: APIWrapperEnterOptions | undefined = await pluginDecorators
26+
.enter.call(this, plugin, ...args);
27+
if (options?.preventMethodCall) {
28+
aggregatedOptions.preventMethodCall = true;
29+
}
1730
} catch (exception) {
1831
if (exception instanceof PluginError) {
1932
throw exception;
@@ -24,7 +37,10 @@ export default class PluginRegistry {
2437
}
2538
}
2639

27-
let result = await wrappedFunc.implementation.call(this, ...args);
40+
let result = null;
41+
if (!aggregatedOptions.preventMethodCall) {
42+
result = await wrappedFunc.implementation.call(this, ...args);
43+
}
2844

2945
for (const plugin of pluginList) {
3046
const pluginDecorators = plugin.functions.filter((obj) => obj.callback === wrappedFunc)[0];

cvat-ui/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-ui",
3-
"version": "1.50.8",
3+
"version": "1.51.0",
44
"description": "CVAT single-page application",
55
"main": "src/index.tsx",
66
"scripts": {
@@ -22,6 +22,7 @@
2222
"dependencies": {
2323
"@ant-design/icons": "^4.6.3",
2424
"@types/lodash": "^4.14.172",
25+
"@types/lru-cache": "^7.10.10",
2526
"@types/platform": "^1.3.4",
2627
"@types/react": "^16.14.15",
2728
"@types/react-color": "^3.0.5",
@@ -41,8 +42,10 @@
4142
"dotenv-webpack": "^8.0.1",
4243
"error-stack-parser": "^2.0.6",
4344
"lodash": "^4.17.21",
45+
"lru-cache": "^9.1.1",
4446
"moment": "^2.29.2",
4547
"mousetrap": "^1.6.5",
48+
"onnxruntime-web": "^1.14.0",
4649
"platform": "^1.3.6",
4750
"prop-types": "^15.7.2",
4851
"react": "^16.14.0",

0 commit comments

Comments
 (0)