Skip to content

Commit

Permalink
Merge branch 'develop' into mk/fix_issue_with_azure_connection_str
Browse files Browse the repository at this point in the history
  • Loading branch information
Marishka17 authored Jan 9, 2024
2 parents 808ca7e + 64d6d7a commit a02bcd8
Show file tree
Hide file tree
Showing 58 changed files with 929 additions and 595 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/*.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
cvat-sdk/**/*.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/Dockerfile*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/isort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
cvat-sdk/**/*.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/*.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
with:
node-version: '16.x'
- id: files
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v41.0.0
with:
files: |
**/*.css
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018-2022 Intel Corporation
Copyright (c) 2022 CVAT.ai Corporation
Copyright (c) 2022-2024 CVAT.ai Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions changelog.d/20231225_115001_boris_retry_if_504.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Creating duplicating annotations when nginx throws 504 timeout status (workaround)
(<https://github.com/opencv/cvat/pull/7286>)
6 changes: 6 additions & 0 deletions changelog.d/20231227_100059_boris_update_pillow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Fixed

- `TIFF` images are saved as `JPEG` images with `.tif` extension in original chunks
(<https://github.com/opencv/cvat/pull/7100>)
- EXIF rotated TIFF images are handled incorrectly
(<https://github.com/opencv/cvat/pull/7100>)
4 changes: 4 additions & 0 deletions changelog.d/20231227_104741_maria_fix_rq_scheduler_launch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- RQ Scheduler launch, broken in PR 7245
(<https://github.com/opencv/cvat/pull/7293>)
7 changes: 7 additions & 0 deletions changelog.d/20231228_131558_boris_fixed_couple_of_gt_bugs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Fixed

- UI crashes if user highligts conflict related to annotations hidden by a filter
(<https://github.com/opencv/cvat/pull/7299>)
- Annotations conflicts are not highligted properly on the first frame of a job
(<https://github.com/opencv/cvat/pull/7299>)

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

- Error message `Edge's nodeFrom ${dataNodeFrom} or nodeTo ${dataNodeTo} do not to refer to any node`
when upload a file with some abscent skeleton nodes (<https://github.com/opencv/cvat/pull/7302>)
- Wrong context menu position in skeleton configurator (Firefox only)
(<https://github.com/opencv/cvat/pull/7302>)
- Fixed console error `(Error: <rect> attribute width: A negative value is not valid`
appearing when skeleton with all outside elements is created (<https://github.com/opencv/cvat/pull/7302>)
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.19.0",
"version": "2.19.1",
"type": "module",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/src/typescript/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CanvasImpl implements Canvas {
this.model.activate(clientID, attributeID);
}

public highlight(clientIDs: number[] | null, severity: HighlightSeverity | null = null): void {
public highlight(clientIDs: number[], severity: HighlightSeverity | null = null): void {
this.model.highlight(clientIDs, severity);
}

Expand Down
23 changes: 8 additions & 15 deletions cvat-canvas/src/typescript/canvasModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export enum HighlightSeverity {
}

export interface HighlightedElements {
elementsIDs: number [];
severity: HighlightSeverity;
elementsIDs: number[];
severity: HighlightSeverity | null;
}

export enum RectDrawingMethod {
Expand Down Expand Up @@ -267,7 +267,7 @@ export interface CanvasModel {
setup(frameData: any, objectStates: any[], zLayer: number): void;
setupIssueRegions(issueRegions: Record<number, { hidden: boolean; points: number[] }>): void;
activate(clientID: number | null, attributeID: number | null): void;
highlight(clientIDs: number[] | null, severity: HighlightSeverity): void;
highlight(clientIDs: number[], severity: HighlightSeverity): void;
rotate(rotationAngle: number): void;
focus(clientID: number, padding: number): void;
fit(): void;
Expand Down Expand Up @@ -641,18 +641,11 @@ export class CanvasModelImpl extends MasterImpl implements CanvasModel {
this.notify(UpdateReasons.SHAPE_ACTIVATED);
}

public highlight(clientIDs: number[] | null, severity: HighlightSeverity | null): void {
if (Array.isArray(clientIDs)) {
this.data.highlightedElements = {
elementsIDs: clientIDs,
severity,
};
} else {
this.data.highlightedElements = {
elementsIDs: [],
severity: null,
};
}
public highlight(clientIDs: number[], severity: HighlightSeverity | null): void {
this.data.highlightedElements = {
elementsIDs: clientIDs,
severity,
};

this.notify(UpdateReasons.SHAPE_HIGHLIGHTED);
}
Expand Down
21 changes: 12 additions & 9 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3070,11 +3070,7 @@ export class CanvasViewImpl implements CanvasView, Listener {

const SVGElement = makeSVGFromTemplate(state.label.structure.svg);

let xtl = Number.MAX_SAFE_INTEGER;
let ytl = Number.MAX_SAFE_INTEGER;
let xbr = Number.MIN_SAFE_INTEGER;
let ybr = Number.MIN_SAFE_INTEGER;

let [xtl, ytl, xbr, ybr] = [null, null, null, null];
const svgElements: Record<number, SVG.Element> = {};
const templateElements = Array.from(SVGElement.children()).filter((el: SVG.Element) => el.type === 'circle');
for (let i = 0; i < state.elements.length; i++) {
Expand All @@ -3084,10 +3080,10 @@ export class CanvasViewImpl implements CanvasView, Listener {
const [cx, cy] = this.translateToCanvas(points);

if (!element.outside) {
xtl = Math.min(xtl, cx);
ytl = Math.min(ytl, cy);
xbr = Math.max(xbr, cx);
ybr = Math.max(ybr, cy);
xtl = xtl === null ? cx : Math.min(xtl, cx);
ytl = ytl === null ? cy : Math.min(ytl, cy);
xbr = xbr === null ? cx : Math.max(xbr, cx);
ybr = ybr === null ? cy : Math.max(ybr, cy);
}

const templateElement = templateElements.find((el: SVG.Circle) => el.attr('data-label-id') === element.label.id);
Expand Down Expand Up @@ -3182,6 +3178,13 @@ export class CanvasViewImpl implements CanvasView, Listener {
}
}

// if all elements were outside, set coordinates to zeros
xtl = xtl || 0;
ytl = ytl || 0;
xbr = xbr || 0;
ybr = ybr || 0;

// apply bounding box margin
xtl -= consts.SKELETON_RECT_MARGIN;
ytl -= consts.SKELETON_RECT_MARGIN;
xbr += consts.SKELETON_RECT_MARGIN;
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.10.0
Pillow>=10.0.1
Pillow>=10.1.0
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
2 changes: 1 addition & 1 deletion cvat-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "14.0.0",
"version": "14.0.3",
"type": "module",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "src/api.ts",
Expand Down
4 changes: 2 additions & 2 deletions cvat-core/src/annotations-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ObjectState from './object-state';
import { getAnnotations, getCollection } from './annotations';

export interface SingleFrameActionInput {
collection: Omit<SerializedCollection, 'tracks' | 'tags'>;
collection: Omit<SerializedCollection, 'tracks' | 'tags' | 'version'>;
frameData: {
width: number;
height: number;
Expand All @@ -20,7 +20,7 @@ export interface SingleFrameActionInput {
}

export interface SingleFrameActionOutput {
collection: Omit<SerializedCollection, 'tracks' | 'tags'>;
collection: Omit<SerializedCollection, 'tracks' | 'tags' | 'version'>;
}

export enum ActionParameterType {
Expand Down
12 changes: 6 additions & 6 deletions cvat-core/src/annotations-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SkeletonShape, SkeletonTrack, PolygonShape, CuboidShape,
RectangleShape, PolylineShape, PointsShape, EllipseShape,
} from './annotations-objects';
import { SerializedCollection, SerializedTrack } from './server-response-types';
import { SerializedCollection, SerializedShape, SerializedTrack } from './server-response-types';
import AnnotationsFilter from './annotations-filter';
import { checkObjectType } from './common';
import Statistics from './statistics';
Expand Down Expand Up @@ -116,7 +116,7 @@ export default class Collection {
};
}

import(data: SerializedCollection): ImportedCollection {
import(data: Omit<SerializedCollection, 'version'>): ImportedCollection {
const result = {
tags: [],
shapes: [],
Expand Down Expand Up @@ -159,16 +159,16 @@ export default class Collection {
return result;
}

export(): SerializedCollection {
export(): Omit<SerializedCollection, 'version'> {
const data = {
tracks: this.tracks.filter((track) => !track.removed).map((track) => track.toJSON()),
tracks: this.tracks.filter((track) => !track.removed).map((track) => track.toJSON() as SerializedTrack),
shapes: Object.values(this.shapes)
.reduce((accumulator, frameShapes) => {
accumulator.push(...frameShapes);
return accumulator;
}, [])
.filter((shape) => !shape.removed)
.map((shape) => shape.toJSON()),
.map((shape) => shape.toJSON() as SerializedShape),
tags: Object.values(this.tags)
.reduce((accumulator, frameTags) => {
accumulator.push(...frameTags);
Expand Down Expand Up @@ -331,7 +331,7 @@ export default class Collection {
}

if (object.shapeType === ShapeType.SKELETON) {
for (const element of (object as SkeletonShape | SkeletonTrack).elements) {
for (const element of (object as unknown as SkeletonShape | SkeletonTrack).elements) {
// for each track/shape element get its first objectState and keep it
elements[element.label.id] = [
...(elements[element.label.id] || []), element,
Expand Down
Loading

0 comments on commit a02bcd8

Please sign in to comment.