Skip to content

Commit

Permalink
Merge pull request #7510 from opencv/release-2.11.0
Browse files Browse the repository at this point in the history
Release v2.11.0
  • Loading branch information
cvat-bot[bot] authored Feb 23, 2024
2 parents aecaba6 + 0a14ea5 commit a942f09
Show file tree
Hide file tree
Showing 178 changed files with 2,762 additions and 2,853 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/cancel.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- '**/*.md'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
testing:
if: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- 'site/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CYPRESS_VERIFY_TIMEOUT: 180000 # https://docs.cypress.io/guides/guides/command-line#cypress-verify
CVAT_VERSION: "local"
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

<a id='changelog-2.11.0'></a>
## \[2.11.0\] - 2024-02-23

### Added

- Added `dataset:export` and `dataset:import` events that are logged when
the user initiates an export or import of a project, task or job
(<https://github.com/opencv/cvat/pull/7476>)

### Changed

- Now menus in the web interface are triggered by click, not by hover as before
(<https://github.com/opencv/cvat/pull/7431>)

### Removed

- Removed support for the TFRecord dataset format
(<https://github.com/opencv/cvat/pull/7416>)

### Fixed

- On quality page for a task, only the first page with jobs has quality report metrics
(<https://github.com/opencv/cvat/pull/7441>)

- Side effects of data changes, such as the sending of webhooks,
are no longer triggered until after the changes have been committed
to the database
(<https://github.com/opencv/cvat/pull/7460>,
<https://github.com/opencv/cvat/pull/7477>)

<a id='changelog-2.10.3'></a>
## \[2.10.3\] - 2024-02-09

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ For more information about the supported formats, see:
| [YOLO](https://pjreddie.com/darknet/yolo/) | ✔️ | ✔️ |
| [MS COCO Object Detection](http://cocodataset.org/#format-data) | ✔️ | ✔️ |
| [MS COCO Keypoints Detection](http://cocodataset.org/#format-data) | ✔️ | ✔️ |
| [TFrecord](https://www.tensorflow.org/tutorials/load_data/tfrecord) | ✔️ | ✔️ |
| [MOT](https://motchallenge.net/) | ✔️ | ✔️ |
| [MOTS PNG](https://www.vision.rwth-aachen.de/page/mots) | ✔️ | ✔️ |
| [LabelMe 3.0](http://labelme.csail.mit.edu/Release3.0) | ✔️ | ✔️ |
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.3
cvat-sdk~=2.11.0
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-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.10.3"
VERSION = "2.11.0"
36 changes: 3 additions & 33 deletions cvat-core/src/analytics-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,11 @@
//
// SPDX-License-Identifier: MIT

import {
SerializedAnalyticsEntry, SerializedAnalyticsReport, SerializedDataEntry, SerializedTransformationEntry,
} from './server-response-types';
import { ArgumentError } from './exceptions';

export interface SerializedDataEntry {
date?: string;
value?: number | Record<string, number>
}

export interface SerializedTransformBinaryOp {
left: string;
operator: string;
right: string;
}

export interface SerializedTransformationEntry {
name: string;
binary?: SerializedTransformBinaryOp;
}

export interface SerializedAnalyticsEntry {
name?: string;
title?: string;
description?: string;
granularity?: string;
default_view?: string;
data_series?: Record<string, SerializedDataEntry[]>;
transformations?: SerializedTransformationEntry[];
}

export interface SerializedAnalyticsReport {
id?: number;
target?: string;
created_date?: string;
statistics?: SerializedAnalyticsEntry[];
}

export enum AnalyticsReportTarget {
JOB = 'job',
TASK = 'task',
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 @@ -6,7 +6,7 @@ import { omit, throttle } from 'lodash';
import { ArgumentError } from './exceptions';
import { SerializedCollection } from './server-response-types';
import { Job, Task } from './session';
import { LogType, ObjectType } from './enums';
import { EventScope, ObjectType } from './enums';
import ObjectState from './object-state';
import { getAnnotations, getCollection } from './annotations';

Expand Down Expand Up @@ -114,7 +114,7 @@ async function runSingleFrameChain(
cancelled: () => boolean,
): Promise<void> {
type IDsToHandle = { shapes: number[] };
const event = await instance.logger.log(LogType.annotationsAction, {
const event = await instance.logger.log(EventScope.annotationsAction, {
from: frameFrom,
to: frameTo,
chain: actionsChain.map((action) => action.name).join(' => '),
Expand Down
87 changes: 41 additions & 46 deletions cvat-core/src/api-implementation.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 @@ -13,10 +13,12 @@ import {
isBoolean,
isInteger,
isString,
isPageSize,
checkFilter,
checkExclusiveFields,
checkObjectType,
filterFieldsToSnakeCase,
fieldsToSnakeCase,
} from './common';

import User from './user';
Expand Down Expand Up @@ -136,6 +138,8 @@ export default function implementAPI(cvat: CVATCore): CVATCore {
return result;
});

implementationMixin(cvat.server.apiSchema, serverProxy.server.apiSchema);

implementationMixin(cvat.assets.create, async (file: File, guideId: number): Promise<SerializedAsset> => {
if (!(file instanceof File)) {
throw new ArgumentError('Assets expect a file');
Expand Down Expand Up @@ -400,34 +404,36 @@ export default function implementAPI(cvat: CVATCore): CVATCore {
});

implementationMixin(cvat.analytics.quality.reports, async (filter) => {
let updatedParams: Record<string, string> = {};
if ('taskId' in filter) {
updatedParams = {
task_id: filter.taskId,
sort: '-created_date',
target: filter.target,
};
}
if ('jobId' in filter) {
updatedParams = {
job_id: filter.jobId,
sort: '-created_date',
target: filter.target,
};
}
const reportsData = await serverProxy.analytics.quality.reports(updatedParams);
checkFilter(filter, {
page: isInteger,
pageSize: isPageSize,
parentID: isInteger,
projectID: isInteger,
taskID: isInteger,
jobID: isInteger,
target: isString,
filter: isString,
search: isString,
sort: isString,
});

return reportsData.map((report) => new QualityReport({ ...report }));
const params = fieldsToSnakeCase({ ...filter, sort: '-created_date' });

const reportsData = await serverProxy.analytics.quality.reports(params);
const reports = Object.assign(
reportsData.map((report) => new QualityReport({ ...report })),
{ count: reportsData.count },
);
return reports;
});
implementationMixin(cvat.analytics.quality.conflicts, async (filter) => {
let updatedParams: Record<string, string> = {};
if ('reportId' in filter) {
updatedParams = {
report_id: filter.reportId,
};
}
checkFilter(filter, {
reportID: isInteger,
});

const conflictsData = await serverProxy.analytics.quality.conflicts(updatedParams);
const params = fieldsToSnakeCase(filter);

const conflictsData = await serverProxy.analytics.quality.conflicts(params);
const conflicts = conflictsData.map((conflict) => new QualityConflict({ ...conflict }));
const frames = Array.from(new Set(conflicts.map((conflict) => conflict.frame)))
.sort((a, b) => a - b);
Expand Down Expand Up @@ -496,8 +502,14 @@ export default function implementAPI(cvat: CVATCore): CVATCore {

return mergedConflicts;
});
implementationMixin(cvat.analytics.quality.settings.get, async (taskID: number) => {
const settings = await serverProxy.analytics.quality.settings.get(taskID);
implementationMixin(cvat.analytics.quality.settings.get, async (filter) => {
checkFilter(filter, {
taskID: isInteger,
});

const params = fieldsToSnakeCase(filter);

const settings = await serverProxy.analytics.quality.settings.get(params);
return new QualitySettings({ ...settings });
});
implementationMixin(cvat.analytics.performance.reports, async (filter) => {
Expand All @@ -511,25 +523,8 @@ export default function implementAPI(cvat: CVATCore): CVATCore {

checkExclusiveFields(filter, ['jobID', 'taskID', 'projectID'], ['startDate', 'endDate']);

const updatedParams: Record<string, string> = {};

if ('taskID' in filter) {
updatedParams.task_id = filter.taskID;
}
if ('jobID' in filter) {
updatedParams.job_id = filter.jobID;
}
if ('projectID' in filter) {
updatedParams.project_id = filter.projectID;
}
if ('startDate' in filter) {
updatedParams.start_date = filter.startDate;
}
if ('endDate' in filter) {
updatedParams.end_date = filter.endDate;
}

const reportData = await serverProxy.analytics.performance.reports(updatedParams);
const params = fieldsToSnakeCase(filter);
const reportData = await serverProxy.analytics.performance.reports(params);
return new AnalyticsReport(reportData);
});
implementationMixin(cvat.frames.getMeta, async (type, id) => {
Expand Down
20 changes: 12 additions & 8 deletions cvat-core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// SPDX-License-Identifier: MIT

import PluginRegistry from './plugins';
import loggerStorage from './logger-storage';
import { EventLogger } from './log';
import logger from './logger';
import { Event } from './event';
import ObjectState from './object-state';
import Statistics from './statistics';
import Comment from './comment';
Expand Down Expand Up @@ -129,6 +129,10 @@ function build(): CVATCore {
const result = await PluginRegistry.apiWrapper(cvat.server.installedApps);
return result;
},
async apiSchema() {
const result = await PluginRegistry.apiWrapper(cvat.server.apiSchema);
return result;
},
},
projects: {
async get(filter = {}) {
Expand Down Expand Up @@ -242,7 +246,7 @@ function build(): CVATCore {
return result;
},
},
logger: loggerStorage,
logger,
config: {
get backendAPI() {
return config.backendAPI;
Expand Down Expand Up @@ -346,17 +350,17 @@ function build(): CVATCore {
},
},
quality: {
async reports(filter: any) {
async reports(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.analytics.quality.reports, filter);
return result;
},
async conflicts(filter: any) {
async conflicts(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.analytics.quality.conflicts, filter);
return result;
},
settings: {
async get(taskID: number) {
const result = await PluginRegistry.apiWrapper(cvat.analytics.quality.settings.get, taskID);
async get(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.analytics.quality.settings.get, filter);
return result;
},
},
Expand All @@ -367,7 +371,7 @@ function build(): CVATCore {
Project: implementProject(Project),
Task: implementTask(Task),
Job: implementJob(Job),
EventLogger,
Event,
Attribute,
Label,
Statistics,
Expand Down
15 changes: 14 additions & 1 deletion cvat-core/src/common.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) 2022-2023s CVAT.ai Corporation
// Copyright (C) 2022-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import { snakeCase } from 'lodash';
import { ArgumentError } from './exceptions';

export function isBoolean(value): boolean {
Expand Down Expand Up @@ -145,3 +146,15 @@ export function filterFieldsToSnakeCase(filter: Record<string, string>, keysToSn
export function isResourceURL(url: string): boolean {
return /\/([0-9]+)$/.test(url);
}

export function isPageSize(value: number | 'all'): boolean {
return isInteger(value) || value === 'all';
}

export function fieldsToSnakeCase(params: Record<string, any>): Record<string, any> {
const result = {};
for (const [k, v] of Object.entries(params)) {
result[snakeCase(k)] = v;
}
return result;
}
2 changes: 1 addition & 1 deletion cvat-core/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export enum Source {
GT = 'Ground truth',
}

export enum LogType {
export enum EventScope {
loadTool = 'load:cvat',

loadJob = 'load:job',
Expand Down
Loading

0 comments on commit a942f09

Please sign in to comment.