Skip to content

Commit

Permalink
Merge pull request #8190 from cvat-ai/release-2.16.1
Browse files Browse the repository at this point in the history
Release v2.16.1
  • Loading branch information
cvat-bot[bot] committed Jul 18, 2024
2 parents 8ca0236 + 6bf922c commit 04853fe
Show file tree
Hide file tree
Showing 38 changed files with 823 additions and 154 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

<a id='changelog-2.16.1'></a>
## \[2.16.1\] - 2024-07-18

### Added

- Datumaro format now supports skeletons
(<https://github.com/cvat-ai/cvat/pull/8165>)

### Changed

- Quality analytics page will now report job assignees from quality reports
instead of current job assignees
(<https://github.com/cvat-ai/cvat/pull/8123>)

- When exporting projects in COCO format, images in different subsets are now stored in different subfolders
(<https://github.com/cvat-ai/cvat/pull/8171>)

- On task export, put images to folders depending on subset
(<https://github.com/cvat-ai/cvat/pull/8176>)

### Fixed

- User interface crashed if there are active creating task requests on a project page
(<https://github.com/cvat-ai/cvat/pull/8187>)

- Permission error: organization owner cannot export dataset and backup
(<https://github.com/cvat-ai/cvat/pull/8185>)

<a id='changelog-2.16.0'></a>
## \[2.16.0\] - 2024-07-15

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.16.0
cvat-sdk~=2.16.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.16.0"
VERSION = "2.16.1"
12 changes: 12 additions & 0 deletions cvat-core/src/quality-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

import { SerializedQualityReportData } from './server-response-types';
import User from './user';

export interface QualitySummary {
frameCount: number;
Expand Down Expand Up @@ -36,6 +37,7 @@ export default class QualityReport {
#target: string;
#createdDate: string;
#gtLastUpdated: string;
#assignee: User | null;
#summary: Partial<SerializedQualityReportData['summary']>;

constructor(initialData: SerializedQualityReportData) {
Expand All @@ -47,6 +49,12 @@ export default class QualityReport {
this.#gtLastUpdated = initialData.gt_last_updated;
this.#createdDate = initialData.created_date;
this.#summary = initialData.summary;

if (initialData.assignee) {
this.#assignee = new User(initialData.assignee);
} else {
this.#assignee = null;
}
}

get id(): number {
Expand Down Expand Up @@ -77,6 +85,10 @@ export default class QualityReport {
return this.#createdDate;
}

get assignee(): User | null {
return this.#assignee;
}

get summary(): QualitySummary {
return {
frameCount: this.#summary.frame_count,
Expand Down
1 change: 1 addition & 0 deletions cvat-core/src/server-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ export interface SerializedQualityReportData {
target: string;
created_date?: string;
gt_last_updated?: string;
assignee?: SerializedUser | null;
summary?: {
frame_count: number;
frame_share: number;
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.16.0"
VERSION="2.16.1"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
Expand Down
12 changes: 6 additions & 6 deletions cvat-ui/src/components/analytics-page/task-quality/job-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ function JobListComponent(props: Props): JSX.Element {
function collectUsers(path: string): ColumnFilterItem[] {
return Array.from<string | null>(
new Set(
jobs.map((job: any) => {
if (job[path] === null) {
Object.values(jobsReports).map((report: QualityReport) => {
if (report[path] === null) {
return null;
}

return job[path].username;
return report[path].username;
}),
),
).map((value: string | null) => ({ text: value || 'Is Empty', value: value || false }));
Expand Down Expand Up @@ -127,8 +127,8 @@ function JobListComponent(props: Props): JSX.Element {
dataIndex: 'assignee',
key: 'assignee',
className: 'cvat-job-item-assignee',
render: (jobInstance: any): JSX.Element => (
<Text>{jobInstance?.assignee?.username}</Text>
render: (report: QualityReport): JSX.Element => (
<Text>{report?.assignee?.username}</Text>
),
sorter: sorter('assignee.assignee.username'),
filters: collectUsers('assignee'),
Expand Down Expand Up @@ -232,7 +232,7 @@ function JobListComponent(props: Props): JSX.Element {
job: job.id,
download: job,
stage: job,
assignee: job,
assignee: report,
quality: report,
conflicts: report,
frame_intersection: report,
Expand Down
20 changes: 5 additions & 15 deletions cvat-ui/src/components/project-page/project-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import notification from 'antd/lib/notification';
import { getCore, Project, Task } from 'cvat-core-wrapper';
import { CombinedState, Indexable } from 'reducers';
import { getProjectTasksAsync } from 'actions/projects-actions';
import { cancelInferenceAsync } from 'actions/models-actions';
import CVATLoadingSpinner from 'components/common/loading-spinner';
import TaskItem from 'components/tasks-page/task-item';
import TaskItem from 'containers/tasks-page/task-item';
import MoveTaskModal from 'components/move-task-modal/move-task-modal';
import ModelRunnerDialog from 'components/model-runner-modal/model-runner-dialog';
import {
Expand Down Expand Up @@ -60,10 +59,7 @@ export default function ProjectPageComponent(): JSX.Element {
const [updatingProject, setUpdatingProject] = useState(false);
const mounted = useRef(false);

const ribbonPlugins = useSelector((state: CombinedState) => state.plugins.components.taskItem.ribbon);
const deletes = useSelector((state: CombinedState) => state.projects.activities.deletes);
const taskDeletes = useSelector((state: CombinedState) => state.tasks.activities.deletes);
const tasksActiveInferences = useSelector((state: CombinedState) => state.models.inferences);
const tasks = useSelector((state: CombinedState) => state.tasks.current);
const tasksCount = useSelector((state: CombinedState) => state.tasks.count);
const tasksQuery = useSelector((state: CombinedState) => state.projects.tasksGettingQuery);
Expand Down Expand Up @@ -120,12 +116,12 @@ export default function ProjectPageComponent(): JSX.Element {
}, [tasksQuery]);

useEffect(() => {
if (projectInstance && id in deletes && deletes[id]) {
if (deletes[id]) {
history.push('/projects');
}
}, [deletes]);

if (fechingProject) {
if (fechingProject || id in deletes) {
return <Spin size='large' className='cvat-spinner' />;
}

Expand Down Expand Up @@ -153,14 +149,8 @@ export default function ProjectPageComponent(): JSX.Element {
.map((task: Task) => (
<TaskItem
key={task.id}
ribbonPlugins={ribbonPlugins}
deleted={task.id in taskDeletes ? taskDeletes[task.id] : false}
hidden={false}
activeInference={tasksActiveInferences[task.id] || null}
cancelAutoAnnotation={() => {
dispatch(cancelInferenceAsync(task.id));
}}
taskInstance={task}
taskID={task.id}
idx={tasks.indexOf(task)}
/>
))}
</React.Fragment>
Expand Down
22 changes: 7 additions & 15 deletions cvat-ui/src/reducers/projects-reducer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) 2022-2023 CVAT.ai Corporation
// Copyright (C) 2022-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

import { AnyAction } from 'redux';
import { omit } from 'lodash';

import { ProjectsActionTypes } from 'actions/projects-actions';
import { BoundariesActionTypes } from 'actions/boundaries-actions';
Expand Down Expand Up @@ -117,49 +118,40 @@ export default (state: ProjectsState = defaultState, action: AnyAction): Project
}
case ProjectsActionTypes.DELETE_PROJECT: {
const { projectId } = action.payload;
const { deletes } = state.activities;

deletes[projectId] = false;

return {
...state,
activities: {
...state.activities,
deletes: {
...deletes,
...state.activities.deletes,
[projectId]: false,
},
},
};
}
case ProjectsActionTypes.DELETE_PROJECT_SUCCESS: {
const { projectId } = action.payload;
const { deletes } = state.activities;

deletes[projectId] = true;

return {
...state,
activities: {
...state.activities,
deletes: {
...deletes,
...state.activities.deletes,
[projectId]: true,
},
},
};
}
case ProjectsActionTypes.DELETE_PROJECT_FAILED: {
const { projectId } = action.payload;
const { deletes } = state.activities;

delete deletes[projectId];

return {
...state,
activities: {
...state.activities,
deletes: {
...deletes,
},
deletes: omit(state.activities.deletes, projectId),
},
};
}
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/utils/platform-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function showPlatformNotification(): boolean {
}

export function showUnsupportedNotification(): boolean {
const necessaryFeatures = [window.ResizeObserver, Object.fromEntries];
const necessaryFeatures = [window.ResizeObserver, Object.fromEntries, Object.hasOwn];

const unsupportedFeatures = necessaryFeatures.some((feature) => typeof feature === 'undefined');
return !featuresNotificationShown && unsupportedFeatures;
Expand Down
2 changes: 1 addition & 1 deletion cvat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

from cvat.utils.version import get_version

VERSION = (2, 16, 0, 'final', 0)
VERSION = (2, 16, 1, 'final', 0)

__version__ = get_version(VERSION)
15 changes: 11 additions & 4 deletions cvat/apps/dataset_manager/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class CommonData(InstanceLabelData):
Tag = namedtuple('Tag', 'frame, label, attributes, source, group, id')
Tag.__new__.__defaults__ = (0, None)
Frame = namedtuple(
'Frame', 'idx, id, frame, name, width, height, labeled_shapes, tags, shapes, labels')
'Frame', 'idx, id, frame, name, width, height, labeled_shapes, tags, shapes, labels, subset')
Label = namedtuple('Label', 'id, name, color, type')

def __init__(self,
Expand All @@ -223,6 +223,7 @@ def __init__(self,
self._db_data = db_task.data
self._use_server_track_ids = use_server_track_ids
self._required_frames = included_frames
self._db_subset = db_task.subset

super().__init__(db_task)

Expand Down Expand Up @@ -268,6 +269,7 @@ def _init_frame_info(self):
"path": "frame_{:06d}".format(self.abs_frame_id(frame)),
"width": self._db_data.video.width,
"height": self._db_data.video.height,
"subset": self._db_subset,
} for frame in self.rel_range
}
else:
Expand All @@ -278,6 +280,7 @@ def _init_frame_info(self):
"path": db_image.path,
"width": db_image.width,
"height": db_image.height,
"subset": self._db_subset,
} for db_image in queryset
}

Expand Down Expand Up @@ -409,6 +412,7 @@ def get_frame(idx):
frames[frame] = CommonData.Frame(
idx=idx,
id=frame_info.get("id", 0),
subset=frame_info["subset"],
frame=frame,
name=frame_info["path"],
height=frame_info["height"],
Expand Down Expand Up @@ -1487,12 +1491,14 @@ def __init__(
dimension: DimensionType = DimensionType.DIM_2D,
**kwargs
):
instance_meta = instance_data.meta[instance_data.META_FIELD]
dm.SourceExtractor.__init__(
self, media_type=dm.Image if dimension == DimensionType.DIM_2D else PointCloud
self,
media_type=dm.Image if dimension == DimensionType.DIM_2D else PointCloud,
subset=instance_meta['subset'],
)
CVATDataExtractorMixin.__init__(self, **kwargs)

instance_meta = instance_data.meta[instance_data.META_FIELD]
self._categories = self._load_categories(instance_meta['labels'])
self._user = self._load_user_info(instance_meta) if dimension == DimensionType.DIM_3D else {}
self._dimension = dimension
Expand Down Expand Up @@ -1527,6 +1533,7 @@ def __init__(
dm_item = dm.DatasetItem(
id=osp.splitext(frame_data.name)[0],
annotations=dm_anno, media=dm_image,
subset=frame_data.subset,
attributes={'frame': frame_data.frame
})
elif dimension == DimensionType.DIM_3D:
Expand All @@ -1543,7 +1550,7 @@ def __init__(
dm_item = dm.DatasetItem(
id=osp.splitext(osp.split(frame_data.name)[-1])[0],
annotations=dm_anno, media=PointCloud(dm_image[0]), related_images=dm_image[1],
attributes=attributes
attributes=attributes, subset=frame_data.subset,
)

dm_items.append(dm_item)
Expand Down
4 changes: 2 additions & 2 deletions cvat/apps/dataset_manager/formats/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _export(dst_file, temp_dir, instance_data, save_images=False):
with GetCVATDataExtractor(instance_data, include_images=save_images) as extractor:
dataset = Dataset.from_extractors(extractor, env=dm_env)
dataset.export(temp_dir, 'coco_instances', save_images=save_images,
merge_images=True)
merge_images=False)

make_zip_archive(temp_dir, dst_file)

Expand All @@ -44,7 +44,7 @@ def _export(dst_file, temp_dir, instance_data, save_images=False):
with GetCVATDataExtractor(instance_data, include_images=save_images) as extractor:
dataset = Dataset.from_extractors(extractor, env=dm_env)
dataset.export(temp_dir, 'coco_person_keypoints', save_images=save_images,
merge_images=True)
merge_images=False)

make_zip_archive(temp_dir, dst_file)

Expand Down
Loading

0 comments on commit 04853fe

Please sign in to comment.