Skip to content

Commit

Permalink
Merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed May 23, 2024
2 parents 5f0950b + d9d25d1 commit 2289599
Show file tree
Hide file tree
Showing 163 changed files with 3,863 additions and 3,626 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- scriv-insert-here -->

<a id='changelog-2.14.0'></a>
## \[2.14.0\] - 2024-05-21

### Added

- Added security headers enforcing strict `Referrer-Policy` for cross origins and disabling MIME type sniffing via `X-Content-Type-Options`.
(<https://github.com/opencv/cvat/pull/7752>)

- \[Helm\] Ability to specify ServiceAccount for backend pods
(<https://github.com/cvat-ai/cvat/pull/7894>)

### Changed

- Working time rounding to a minimal value of 1 hour is not applied to the annotation speed metric any more
(<https://github.com/cvat-ai/cvat/pull/7898>)

- Total annotation speed metric renamed to Average annotation speed
(<https://github.com/cvat-ai/cvat/pull/7898>)

- Ground truth jobs are not considered when computing analytics report for a task/project
(<https://github.com/cvat-ai/cvat/pull/7919>)

### Fixed

- Fixed calculation of annotation speed metrics for analytics reports
(<https://github.com/opencv/cvat/pull/7144>)

- \[Helm\] Prevented spurious 200 OK responses from API endpoints
before the backend is ready
(<https://github.com/cvat-ai/cvat/pull/7859>)

- Analytic reports incorrect count of objects for a skeleton track/shape
(<https://github.com/cvat-ai/cvat/pull/7883>)

- Analytic reports incorrect number of objects for a track (always less by 1)
(<https://github.com/cvat-ai/cvat/pull/7883>)

- REST API allowed to create several attributes with the same name within one label
(<https://github.com/cvat-ai/cvat/pull/7890>)

- Job's/task's status are not updated when job's state updated to completed and stage is already acceptance
(<https://github.com/cvat-ai/cvat/pull/7901>)

- Exception: Cannot read properties of undefined (reading 'onBlockUpdated')
(<https://github.com/cvat-ai/cvat/pull/7913>)

- One more found way to create an empty mask
(<https://github.com/cvat-ai/cvat/pull/7915>)

- Slice function may not work in Google Chrome < 110
(<https://github.com/cvat-ai/cvat/pull/7916>)

- Selecting a skeleton by cursor does not work correctly when there are some hidden points
(<https://github.com/cvat-ai/cvat/pull/7921>)

<a id='changelog-2.13.0'></a>
## \[2.13.0\] - 2024-05-09

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ questions and get our support.
- [How to Use CVAT (Roboflow guide)](https://blog.roboflow.com/cvat/)
- [How to auto-label data in CVAT with one of 50,000+ models on Roboflow Universe](https://blog.roboflow.com/how-to-use-roboflow-models-in-cvat/)

<!-- prettier-ignore-start -->
<!-- Badges -->

[docker-server-pulls-img]: https://img.shields.io/docker/pulls/cvat/server.svg?style=flat-square&label=server%20pulls
Expand Down
4 changes: 0 additions & 4 deletions changelog.d/20231117_132419_andrey_fix_analytics.md

This file was deleted.

5 changes: 0 additions & 5 deletions changelog.d/20240507_140615_roman_allow_empty_services.md

This file was deleted.

4 changes: 4 additions & 0 deletions changelog.d/20240509_160805_boris_upgrade_react.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Changed

- Upgraded React and Antd dependencies, it leads to stylistic changes in the user interface
(<https://github.com/cvat-ai/cvat/pull/7466>)

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/20240515_144240_andrey_helm_update.md

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/20240516_093233_boris_fixed_annotation_speed.md

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/20240516_093537_boris_fixed_annotation_speed.md

This file was deleted.

4 changes: 4 additions & 0 deletions changelog.d/20240521_182333_klakhov_fix_conflicts_render.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- UI crash on hovering conflict related to hidden objects
(<https://github.com/cvat-ai/cvat/pull/7917>)
2 changes: 1 addition & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.20.1",
"version": "2.20.2",
"type": "module",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
Expand Down
6 changes: 5 additions & 1 deletion cvat-canvas/src/typescript/canvasModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,12 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
}

public highlight(clientIDs: number[], severity: HighlightSeverity | null): void {
const elementsIDs = clientIDs.filter((id: number): boolean => (
this.objects.find((_state: any): boolean => _state.clientID === id)
));

this.data.highlightedElements = {
elementsIDs: clientIDs,
elementsIDs,
severity,
};

Expand Down
13 changes: 10 additions & 3 deletions cvat-canvas/src/typescript/masksHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export class MasksHandlerImpl implements MasksHandler {
.reduce((acc: TwoCornerBox, rect: BoundingRect) => {
acc.top = Math.floor(Math.max(0, Math.min(rect.top, acc.top)));
acc.left = Math.floor(Math.max(0, Math.min(rect.left, acc.left)));
acc.bottom = Math.floor(Math.min(height, Math.max(rect.top + rect.height, acc.bottom)));
acc.right = Math.floor(Math.min(width, Math.max(rect.left + rect.width, acc.right)));
acc.bottom = Math.floor(Math.min(height - 1, Math.max(rect.top + rect.height, acc.bottom)));
acc.right = Math.floor(Math.min(width - 1, Math.max(rect.left + rect.width, acc.right)));
return acc;
}, {
left: Number.MAX_SAFE_INTEGER,
Expand Down Expand Up @@ -572,7 +572,14 @@ export class MasksHandlerImpl implements MasksHandler {
image.globalCompositeOperation = 'xor';
image.opacity = 0.5;
this.canvas.add(image);
this.drawnObjects.push(image);
/*
when we paste a mask, we do not need additional logic implemented
in MasksHandlerImpl::createDrawnObjectsArray.push using JS Proxy
because we will not work with any drawing tools here, and it will cause the issue
because this.tools may be undefined here
when it is used inside the push custom implementation
*/
this.drawnObjects = [image];
this.canvas.renderAll();
} finally {
resolve();
Expand Down
11 changes: 11 additions & 0 deletions cvat-canvas/src/typescript/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) 2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -535,5 +536,15 @@ export function segmentsFromPoints(points: number[], circuit = false): Segment[]
}, []);
}

export function toReversed<T>(array: Array<T>): Array<T> {
// actually toReversed already exists in ESMA specification
// but not all CVAT customers uses a browser fresh enough to use it
// instead of using a library with polyfills I will prefer just to rewrite it with reduceRight
return array.reduceRight<Array<T>>((acc, val: T) => {
acc.push(val);
return acc;
}, []);
}

export type Segment = [[number, number], [number, number]];
export type PropType<T, Prop extends keyof T> = T[Prop];
12 changes: 5 additions & 7 deletions cvat-canvas/src/typescript/sliceHandler.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (C) 2023 CVAT.ai Corporation
// Copyright (C) 2023-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import * as SVG from 'svg.js';
import {
stringifyPoints, translateToCanvas, translateFromCanvas, translateToSVG,
findIntersection, zipChannels, Segment, findClosestPointOnSegment, segmentsFromPoints,
toReversed,
} from './shared';
import {
Geometry, SliceData, Configuration, CanvasHint,
Expand Down Expand Up @@ -294,8 +295,7 @@ export class SliceHandlerImpl implements SliceHandler {
const d2 = Math.sqrt((p2[0] - p[0]) ** 2 + (p2[1] - p[1]) ** 2);

if (d2 > d1) {
// @ts-ignore error TS2551 (need to update typescript up to 5.2)
contour2.push(...otherPoints.toReversed().flat());
contour2.push(...toReversed<[number, number]>(otherPoints).flat());
} else {
contour2.push(...otherPoints.flat());
}
Expand All @@ -312,8 +312,7 @@ export class SliceHandlerImpl implements SliceHandler {
...firstSegmentPoint, // first intersection
// intermediate points (reversed if intersections order was swopped)
...(firstSegmentIdx === firstIntersectedSegmentIdx ?
// @ts-ignore error TS2551 (need to update typescript up to 5.2)
intermediatePoints : intermediatePoints.toReversed()
intermediatePoints : toReversed<[number, number]>(intermediatePoints)
).flat(),
// second intersection
...secondSegmentPoint,
Expand All @@ -326,8 +325,7 @@ export class SliceHandlerImpl implements SliceHandler {
...firstSegmentPoint, // first intersection
// intermediate points (reversed if intersections order was swopped)
...(firstSegmentIdx === firstIntersectedSegmentIdx ?
// @ts-ignore error TS2551 (need to update typescript up to 5.2)
intermediatePoints : intermediatePoints.toReversed()
intermediatePoints : toReversed<[number, number]>(intermediatePoints)
).flat(),
...secondSegmentPoint,
// all the previous contours points N, N-1, .. until (including) the first intersected segment
Expand Down
2 changes: 1 addition & 1 deletion cvat-cli/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cvat-sdk~=2.14.0
cvat-sdk~=2.15.0
Pillow>=10.3.0
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.14.0"
VERSION = "2.15.0"
2 changes: 1 addition & 1 deletion cvat-core/src/annotations-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async function runSingleFrameChain(
// Ignore deleted frames
if (!frameData.deleted) {
// Get annotations according to filter
const states: ObjectState[] = await getAnnotations(instance, frame, false, filters, null);
const states: ObjectState[] = await getAnnotations(instance, frame, false, filters);
const frameCollectionIDs = states.reduce<IDsToHandle>((acc, val) => {
if (val.objectType === ObjectType.SHAPE) {
acc.shapes.push(val.clientID as number);
Expand Down
Loading

0 comments on commit 2289599

Please sign in to comment.