Skip to content

Commit

Permalink
Merge remote-tracking branch 'develop' into az/worker_for_chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro committed Nov 13, 2024
2 parents 9e7893e + 5520212 commit 06125ca
Show file tree
Hide file tree
Showing 60 changed files with 894 additions and 386 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Bump version
run:
./dev/update_version.py --minor
./dev/update_version.py --patch

- name: Commit post-release changes
run: |
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

<a id='changelog-2.22.0'></a>
## \[2.22.0\] - 2024-11-11

### Added

- Feature to hide a mask during editing (<https://github.com/cvat-ai/cvat/pull/8554>)

- A quality setting to compare point groups without using bbox
(<https://github.com/cvat-ai/cvat/pull/8634>)

- A quality check option to consider empty frames matching
(<https://github.com/cvat-ai/cvat/pull/8652>)

### Changed

- Reduced memory usage of the utils container
(<https://github.com/cvat-ai/cvat/pull/8672>)

### Removed

- Removed unused business group
(<https://github.com/cvat-ai/cvat/pull/8607>)

### Fixed

- Propagation creates copies on non-existing frames in a ground truth job
(<https://github.com/cvat-ai/cvat/pull/8550>)

- Exporting projects with tasks containing honeypots. Honeypots are no longer exported.
(<https://github.com/cvat-ai/cvat/pull/8597>)

- Error after creating GT job on Create job page with frame selection method `random_per_job`
(<https://github.com/cvat-ai/cvat/pull/8623>)

- Fixed issue 'Cannot read properties of undefined (reading 'push')'
(<https://github.com/cvat-ai/cvat/pull/8648>)

- Re-newed import/export request failed immediately if the previous failed
(<https://github.com/cvat-ai/cvat/pull/8649>)

- Fixed automatic zooming in attribute annotation mode for masks
(<https://github.com/cvat-ai/cvat/pull/8657>)

- Export dataset in CVAT format misses frames in tasks with non-default frame step
(<https://github.com/cvat-ai/cvat/pull/8662>)

- Incorrect progress representation on `Requests` page
(<https://github.com/cvat-ai/cvat/pull/8668>)

<a id='changelog-2.21.3'></a>
## \[2.21.3\] - 2024-10-31

Expand Down
4 changes: 0 additions & 4 deletions changelog.d/20241016_133802_sekachev.bs_fixed_propagation.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/20241018_142148_klakhov_hide_mask.md

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/20241031_152803_klakhov_fix_create_job.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Changed

- \[Helm\] Traefik sticky sessions for the backend service are disabled
(<https://github.com/cvat-ai/cvat/pull/8659>)
27 changes: 19 additions & 8 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1918,15 +1918,26 @@ export class CanvasViewImpl implements CanvasView, Listener {
this.gridPattern.setAttribute('height', `${size.height}`);
} else if (reason === UpdateReasons.SHAPE_FOCUSED) {
const { padding, clientID } = this.controller.focusData;
const drawnState = this.drawnStates[clientID];
const object = this.svgShapes[clientID];
if (object) {
const bbox: SVG.BBox = object.bbox();
this.onFocusRegion(
bbox.x - padding,
bbox.y - padding,
bbox.width + padding * 2,
bbox.height + padding * 2,
);
if (drawnState && object) {
const { offset } = this.geometry;
let [x, y, width, height] = [0, 0, 0, 0];

if (drawnState.shapeType === 'mask') {
const [xtl, ytl, xbr, ybr] = drawnState.points.slice(-4);
x = xtl + offset;
y = ytl + offset;
width = xbr - xtl + 1;
height = ybr - ytl + 1;
} else {
const bbox: SVG.BBox = object.bbox();
({
x, y, width, height,
} = bbox);
}

this.onFocusRegion(x - padding, y - padding, width + padding * 2, height + padding * 2);
}
} else if (reason === UpdateReasons.SHAPE_ACTIVATED) {
this.activate(this.controller.activeElement);
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.22.0
cvat-sdk~=2.22.1
Pillow>=10.3.0
setuptools>=70.0.0 # 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.22.0"
VERSION = "2.22.1"
27 changes: 27 additions & 0 deletions cvat-core/src/quality-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export enum TargetMetric {
RECALL = 'recall',
}

export enum PointSizeBase {
IMAGE_SIZE = 'image_size',
GROUP_BBOX_SIZE = 'group_bbox_size',
}

export default class QualitySettings {
#id: number;
#targetMetric: TargetMetric;
Expand All @@ -22,6 +27,7 @@ export default class QualitySettings {
#task: number;
#iouThreshold: number;
#oksSigma: number;
#pointSizeBase: PointSizeBase;
#lineThickness: number;
#lowOverlapThreshold: number;
#orientedLines: boolean;
Expand All @@ -32,6 +38,7 @@ export default class QualitySettings {
#objectVisibilityThreshold: number;
#panopticComparison: boolean;
#compareAttributes: boolean;
#matchEmptyFrames: boolean;
#descriptions: Record<string, string>;

constructor(initialData: SerializedQualitySettingsData) {
Expand All @@ -42,6 +49,7 @@ export default class QualitySettings {
this.#maxValidationsPerJob = initialData.max_validations_per_job;
this.#iouThreshold = initialData.iou_threshold;
this.#oksSigma = initialData.oks_sigma;
this.#pointSizeBase = initialData.point_size_base as PointSizeBase;
this.#lineThickness = initialData.line_thickness;
this.#lowOverlapThreshold = initialData.low_overlap_threshold;
this.#orientedLines = initialData.compare_line_orientation;
Expand All @@ -52,6 +60,7 @@ export default class QualitySettings {
this.#objectVisibilityThreshold = initialData.object_visibility_threshold;
this.#panopticComparison = initialData.panoptic_comparison;
this.#compareAttributes = initialData.compare_attributes;
this.#matchEmptyFrames = initialData.match_empty_frames;
this.#descriptions = initialData.descriptions;
}

Expand Down Expand Up @@ -79,6 +88,14 @@ export default class QualitySettings {
this.#oksSigma = newVal;
}

get pointSizeBase(): PointSizeBase {
return this.#pointSizeBase;
}

set pointSizeBase(newVal: PointSizeBase) {
this.#pointSizeBase = newVal;
}

get lineThickness(): number {
return this.#lineThickness;
}
Expand Down Expand Up @@ -183,6 +200,14 @@ export default class QualitySettings {
this.#maxValidationsPerJob = newVal;
}

get matchEmptyFrames(): boolean {
return this.#matchEmptyFrames;
}

set matchEmptyFrames(newVal: boolean) {
this.#matchEmptyFrames = newVal;
}

get descriptions(): Record<string, string> {
const descriptions: Record<string, string> = Object.keys(this.#descriptions).reduce((acc, key) => {
const camelCaseKey = _.camelCase(key);
Expand All @@ -197,6 +222,7 @@ export default class QualitySettings {
const result: SerializedQualitySettingsData = {
iou_threshold: this.#iouThreshold,
oks_sigma: this.#oksSigma,
point_size_base: this.#pointSizeBase,
line_thickness: this.#lineThickness,
low_overlap_threshold: this.#lowOverlapThreshold,
compare_line_orientation: this.#orientedLines,
Expand All @@ -210,6 +236,7 @@ export default class QualitySettings {
target_metric: this.#targetMetric,
target_metric_threshold: this.#targetMetricThreshold,
max_validations_per_job: this.#maxValidationsPerJob,
match_empty_frames: this.#matchEmptyFrames,
};

return result;
Expand Down
1 change: 1 addition & 0 deletions cvat-core/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class Request {
return this.#status.toLowerCase() as RQStatus;
}

// The `progress` represents a value between 0 and 1
get progress(): number | undefined {
return this.#progress;
}
Expand Down
33 changes: 18 additions & 15 deletions cvat-core/src/requests-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RequestsManager {
requestDelayIdx: number | null,
request: Request | null,
timeout: number | null;
promise?: Promise<Request>;
promise: Promise<Request>;
}>;

private requestStack: number[];
Expand Down Expand Up @@ -71,6 +71,7 @@ class RequestsManager {
}
return this.listening[requestID].promise;
}

const promise = new Promise<Request>((resolve, reject) => {
const timeoutCallback = async (): Promise<void> => {
// We make sure that no more than REQUESTS_COUNT requests are sent simultaneously
Expand Down Expand Up @@ -131,27 +132,29 @@ class RequestsManager {
message: `Could not get a status of the request ${requestID}. ${error.toString()}`,
})));
}

delete this.listening[requestID];
reject(error);
}
}
};

if (initialRequest?.status === RQStatus.FAILED) {
reject(new RequestError(initialRequest?.message));
} else {
this.listening[requestID] = {
onUpdate: callback ? [callback] : [],
timeout: window.setTimeout(timeoutCallback),
request: initialRequest,
requestDelayIdx: 0,
};
}
Promise.resolve().then(() => {
// running as microtask to make sure "promise" was initialized
if (initialRequest?.status === RQStatus.FAILED) {
reject(new RequestError(initialRequest?.message));
} else {
this.listening[requestID] = {
onUpdate: callback ? [callback] : [],
timeout: window.setTimeout(timeoutCallback),
request: initialRequest,
requestDelayIdx: 0,
promise,
};
}
});
});

this.listening[requestID] = {
...this.listening[requestID],
promise,
};
return promise;
}

Expand Down
2 changes: 2 additions & 0 deletions cvat-core/src/server-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export interface SerializedQualitySettingsData {
max_validations_per_job?: number;
iou_threshold?: number;
oks_sigma?: number;
point_size_base?: string;
line_thickness?: number;
low_overlap_threshold?: number;
compare_line_orientation?: boolean;
Expand All @@ -257,6 +258,7 @@ export interface SerializedQualitySettingsData {
object_visibility_threshold?: number;
panoptic_comparison?: boolean;
compare_attributes?: boolean;
match_empty_frames?: boolean;
descriptions?: Record<string, string>;
}

Expand Down
2 changes: 1 addition & 1 deletion cvat-sdk/gen/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

GENERATOR_VERSION="v6.0.1"

VERSION="2.22.0"
VERSION="2.22.1"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
Expand Down
Loading

0 comments on commit 06125ca

Please sign in to comment.