Skip to content

Commit

Permalink
Merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Sekachev committed Jan 27, 2021
2 parents d406384 + d48cc53 commit 1488a0c
Show file tree
Hide file tree
Showing 17 changed files with 262 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The cursor jumps to the end of the line when renaming a task (<https://github.com/openvinotoolkit/cvat/pull/2669>)
- SSLCertVerificationError when remote source is used (<https://github.com/openvinotoolkit/cvat/pull/2683>)
- Fixed filters select overflow (<https://github.com/openvinotoolkit/cvat/pull/2614>)
- Cuboids are missed in annotations statistics (<https://github.com/openvinotoolkit/cvat/pull/2704>)
- The list of files attached to the task is not displayed (<https://github.com/openvinotoolkit/cvat/pull/2706>)

### Security
Expand Down Expand Up @@ -121,6 +122,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added auto inference of url schema from host in CLI, if provided (<https://github.com/openvinotoolkit/cvat/pull/2240>)
- Track frames in skips between annotation is presented in MOT and MOTS formats are marked `outside` (<https://github.com/openvinotoolkit/cvat/pull/2198>)
- UI packages installation with `npm ci` instead of `npm install` (<https://github.com/openvinotoolkit/cvat/pull/2350>)
- Logstash is improved for using with configurable elasticsearch outputs (<https://github.com/openvinotoolkit/cvat/pull/2531>)

### Removed

Expand Down
4 changes: 4 additions & 0 deletions components/analytics/docker-compose.analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ services:
ELK_VERSION: 6.4.0
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
environment:
LOGSTASH_OUTPUT_HOST: elasticsearch:9200
LOGSTASH_OUTPUT_USER:
LOGSTASH_OUTPUT_PASS:
depends_on: ['cvat_elasticsearch']
restart: always

Expand Down
11 changes: 9 additions & 2 deletions components/analytics/kibana/export.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,21 @@
"_type": "visualization",
"_source": {
"title": "Timeline for exceptions",
"visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"customBucket\":{\"enabled\":true,\"id\":\"1-bucket\",\"params\":{\"filters\":[{\"input\":{\"query\":\"event:\\\"Send exception\\\"\"},\"label\":\"\"}]},\"schema\":{\"aggFilter\":[],\"deprecate\":false,\"editor\":false,\"group\":\"none\",\"max\":null,\"min\":0,\"name\":\"bucketAgg\",\"params\":[],\"title\":\"Bucket Agg\"},\"type\":\"filters\"},\"customLabel\":\"Exceptions\",\"customMetric\":{\"enabled\":true,\"id\":\"1-metric\",\"params\":{\"customLabel\":\"Exceptions\"},\"schema\":{\"aggFilter\":[\"!top_hits\",\"!percentiles\",\"!percentile_ranks\",\"!median\",\"!std_dev\",\"!sum_bucket\",\"!avg_bucket\",\"!min_bucket\",\"!max_bucket\",\"!derivative\",\"!moving_avg\",\"!serial_diff\",\"!cumulative_sum\"],\"deprecate\":false,\"editor\":false,\"group\":\"none\",\"max\":null,\"min\":0,\"name\":\"metricAgg\",\"params\":[],\"title\":\"Metric Agg\"},\"type\":\"count\"}},\"schema\":\"metric\",\"type\":\"sum_bucket\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"customInterval\":\"2h\",\"customLabel\":\"Time\",\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"}],\"params\":{\"addLegend\":true,\"addTimeMarker\":true,\"addTooltip\":true,\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"labels\":{\"show\":true,\"truncate\":100},\"position\":\"bottom\",\"scale\":{\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{},\"type\":\"category\"}],\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"legendPosition\":\"right\",\"seriesParams\":[{\"data\":{\"id\":\"1\",\"label\":\"Exceptions\"},\"drawLinesBetweenPoints\":true,\"mode\":\"stacked\",\"show\":\"true\",\"showCircles\":true,\"type\":\"histogram\",\"valueAxis\":\"ValueAxis-1\"}],\"times\":[],\"type\":\"histogram\",\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"labels\":{\"filter\":false,\"rotate\":0,\"show\":true,\"truncate\":100},\"name\":\"LeftAxis-1\",\"position\":\"left\",\"scale\":{\"mode\":\"normal\",\"type\":\"linear\"},\"show\":true,\"style\":{},\"title\":{\"text\":\"Exceptions\"},\"type\":\"value\"}]},\"title\":\"Timeline for exceptions\",\"type\":\"histogram\"}",
"visState": "{\"title\":\"Timeline for exceptions\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum_bucket\",\"params\":{\"customBucket\":{\"id\":\"1-bucket\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"event:\\\"Send exception\\\"\",\"language\":\"lucene\"},\"label\":\"\"}]}},\"customMetric\":{\"id\":\"1-metric\",\"enabled\":true,\"type\":\"count\",\"params\":{\"customLabel\":\"Exceptions\"}},\"customLabel\":\"Exceptions\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-15h\",\"to\":\"now\"},\"useNormalizedEsInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Time\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":false,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Exceptions\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Exceptions\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"orderBucketsBySum\":false}}",
"uiStateJSON": "{}",
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"ec510550-c238-11e8-8e1b-758ef07f6de8\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
}
},
"references": [
{
"id": "ec510550-c238-11e8-8e1b-758ef07f6de8",
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
"type": "index-pattern"
}
],
"_meta": {
"savedObjectVersion": 2
}
Expand Down
10 changes: 8 additions & 2 deletions components/analytics/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,19 @@ output {

if [type] == "client" {
elasticsearch {
hosts => ["elasticsearch:9200"]
hosts => ["${LOGSTASH_OUTPUT_HOST}"]
index => "cvat.client"
user => "${LOGSTASH_OUTPUT_USER:}"
password => "${LOGSTASH_OUTPUT_PASS:}"
manage_template => false
}
} else if [type] == "server" {
elasticsearch {
hosts => ["elasticsearch:9200"]
hosts => ["${LOGSTASH_OUTPUT_HOST}"]
index => "cvat.server"
user => "${LOGSTASH_OUTPUT_USER:}"
password => "${LOGSTASH_OUTPUT_PASS:}"
manage_template => false
}
}
}
12 changes: 6 additions & 6 deletions cvat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cvat-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
},
"dependencies": {
"@ant-design/icons": "^4.3.0",
"@types/lodash": "^4.14.166",
"@types/lodash": "^4.14.167",
"@types/platform": "^1.3.3",
"@types/react": "^16.14.2",
"@types/react-color": "^3.0.4",
"@types/react-dom": "^16.9.10",
"@types/react-redux": "^7.1.14",
"@types/react-redux": "^7.1.15",
"@types/react-router": "^5.1.9",
"@types/react-router-dom": "^5.1.7",
"@types/react-share": "^3.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function AnnotationsFiltersInput(props: StateToProps & DispatchToProps): JSX.Ele
width: 700,
title: 'How to use filters?',
content: filtersHelpModalContent(searchForwardShortcut, searchBackwardShortcut),
className: 'cvat-annotations-filters-help-modal-window',
});
}}
onMouseEnter={() => setDropdownVisible(false)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -34,7 +34,7 @@ export default function StatisticsModalComponent(props: Props): JSX.Element {
cancelButtonProps: { style: { display: 'none' } },
okButtonProps: { style: { width: 100 } },
onOk: closeStatistics,
width: 1000,
width: 1024,
visible,
closable: false,
};
Expand All @@ -54,6 +54,7 @@ export default function StatisticsModalComponent(props: Props): JSX.Element {
polygon: `${data.label[key].polygon.shape} / ${data.label[key].polygon.track}`,
polyline: `${data.label[key].polyline.shape} / ${data.label[key].polyline.track}`,
points: `${data.label[key].points.shape} / ${data.label[key].points.track}`,
cuboid: `${data.label[key].cuboid.shape} / ${data.label[key].cuboid.track}`,
tags: data.label[key].tags,
manually: data.label[key].manually,
interpolated: data.label[key].interpolated,
Expand All @@ -67,6 +68,7 @@ export default function StatisticsModalComponent(props: Props): JSX.Element {
polygon: `${data.total.polygon.shape} / ${data.total.polygon.track}`,
polyline: `${data.total.polyline.shape} / ${data.total.polyline.track}`,
points: `${data.total.points.shape} / ${data.total.points.track}`,
cuboid: `${data.total.cuboid.shape} / ${data.total.cuboid.track}`,
tags: data.total.tags,
manually: data.total.manually,
interpolated: data.total.interpolated,
Expand Down Expand Up @@ -108,6 +110,11 @@ export default function StatisticsModalComponent(props: Props): JSX.Element {
dataIndex: 'points',
key: 'points',
},
{
title: makeShapesTracksTitle('Cuboids'),
dataIndex: 'cuboid',
key: 'cuboid',
},
{
title: <Text strong> Tags </Text>,
dataIndex: 'tags',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -86,6 +86,7 @@ class CreateTaskContent extends React.PureComponent<Props & RouteComponentProps,
notification.info({
message: 'The task has been created',
btn,
className: 'cvat-notification-create-task-success',
});

if (this.basicConfigurationComponent.current) {
Expand Down Expand Up @@ -149,6 +150,7 @@ class CreateTaskContent extends React.PureComponent<Props & RouteComponentProps,
notification.error({
message: 'Could not create a task',
description: 'A task must contain at least one label or belong to some project',
className: 'cvat-notification-create-task-fail',
});
return;
}
Expand All @@ -157,6 +159,7 @@ class CreateTaskContent extends React.PureComponent<Props & RouteComponentProps,
notification.error({
message: 'Could not create a task',
description: 'A task must contain at least one file',
className: 'cvat-notification-create-task-fail',
});
return;
}
Expand All @@ -179,6 +182,7 @@ class CreateTaskContent extends React.PureComponent<Props & RouteComponentProps,
notification.error({
message: 'Could not create a task',
description: error.toString(),
className: 'cvat-notification-create-task-fail',
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/components/labels-editor/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function validateParsedLabel(label: Label): void {
throw new Error(`Label "${label.name}". ` + `Label color must be a string. Got ${typeof label.color}`);
}

if (!label.color.match(/^#[0-9a-f]{6}$|^$/)) {
if (!label.color.match(/^#[0-9a-fA-F]{6}$|^$/)) {
throw new Error(
`Label "${label.name}". ` +
`Type of label color must be only a valid color string. Got value ${label.color}`,
Expand Down
8 changes: 5 additions & 3 deletions cvat/apps/dataset_manager/formats/cvat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from cvat.apps.dataset_manager.util import make_zip_archive
from cvat.apps.engine.frame_provider import FrameProvider
from datumaro.components.extractor import DatasetItem
from datumaro.util.image import save_image

from .registry import exporter, importer

Expand Down Expand Up @@ -441,8 +440,11 @@ def load(file_object, annotations):
elif el.tag == 'image':
image_is_opened = True
frame_id = annotations.abs_frame_id(match_dm_item(
DatasetItem(id=el.attrib['id'], image=el.attrib['name']),
annotations))
DatasetItem(id=el.attrib['name'],
attributes={'frame': el.attrib['id']}
),
task_data=annotations
))
elif el.tag in supported_shapes and (track is not None or image_is_opened):
attributes = []
shape = {
Expand Down
2 changes: 1 addition & 1 deletion cvat/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ tensorflow==2.4.0 # Optional requirement of Datumaro
patool==1.12
diskcache==5.0.2
open3d==0.11.2
git+https://github.com/openvinotoolkit/datumaro@v0.1.4
datumaro==0.1.5.1 --no-binary=datumaro
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

/// <reference types="cypress" />

context('Try to create a task without necessary arguments.', () => {
const caseId = '40';
const labelName = `Case ${caseId}`;
const taskName = `New annotation task for ${labelName}`;
const imagesCount = 1;
const imageFileName = `image_${labelName.replace(' ', '_').toLowerCase()}`;
const width = 800;
const height = 800;
const posX = 10;
const posY = 10;
const color = 'gray';
const archiveName = `${imageFileName}.zip`;
const archivePath = `cypress/fixtures/${archiveName}`;
const imagesFolder = `cypress/fixtures/${imageFileName}`;
const directoryToArchive = imagesFolder;

before(() => {
cy.visit('auth/login');
cy.login();
cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount);
cy.createZipArchive(directoryToArchive, archivePath);
cy.get('#cvat-create-task-button').click();
});

after(() => {
cy.goToTaskList();
cy.getTaskID(taskName).then(($taskID) => {
cy.deleteTask(taskName, $taskID);
});
});

describe(`Testing "${labelName}"`, () => {
it('Try to create a task without any fields. A task is not created.', () => {
cy.get('.cvat-create-task-submit-section').click();
cy.get('.cvat-notification-create-task-fail').should('exist');
cy.closeNotification('.cvat-notification-create-task-fail');
});

it('Input a task name. A task is not created.', () => {
cy.get('[id="name"]').type(taskName);
cy.get('.cvat-create-task-submit-section').click();
cy.get('.cvat-notification-create-task-fail').should('exist');
cy.closeNotification('.cvat-notification-create-task-fail');
});

it('Input task labels. A task is not created.', () => {
cy.addNewLabel(labelName);
cy.get('.cvat-create-task-submit-section').click();
cy.get('.cvat-notification-create-task-fail').should('exist');
cy.closeNotification('.cvat-notification-create-task-fail');
});

it('Add some files. A task created.', () => {
cy.get('input[type="file"]').attachFile(archiveName, { subjectType: 'drag-n-drop' });
cy.get('.cvat-create-task-submit-section').click();
cy.get('.cvat-notification-create-task-fail').should('not.exist');
cy.get('.cvat-notification-create-task-success').should('exist');
// Check that the interface is prepared for creating the next task.
cy.get('[id="name"]').should('have.value', '');
cy.get('.cvat-constructor-viewer-item').should('not.exist');
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright (C) 2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

/// <reference types="cypress" />

context('Changing a label name via label constructor.', () => {
const caseId = '42';
const firstLabelName = `First case ${caseId}`;
const secondLabelName = `Second case ${caseId}`;

before(() => {
cy.visit('auth/login');
cy.login();
cy.get('#cvat-create-task-button').click();
});

describe(`Testing case "${caseId}"`, () => {
it('Set empty label name. Press "Done" button. Alert exist.', () => {
cy.get('.cvat-constructor-viewer-new-item').click(); // Open label constructor
cy.contains('[type="submit"]', 'Done').click();
cy.contains('[role="alert"]', 'Please specify a name').should('exist').and('be.visible');
});

it('Change label name to any other correct value. Press "Done" button. The label created.', () => {
cy.get('[placeholder="Label name"]').type(firstLabelName);
cy.contains('[type="submit"]', 'Done').click({ force: true });
cy.get('.cvat-constructor-viewer-item').should('exist').and('have.text', firstLabelName);
});

it('Change label name to any other correct value. Press "Cancel". Label name is not changed.', () => {
cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click();
cy.get('[placeholder="Label name"]').clear().type(secondLabelName);
cy.contains('[type="button"]', 'Cancel').click();
cy.get('.cvat-constructor-viewer-item').should('exist').and('have.text', firstLabelName);
});

it('Change label name to any other correct value. Press "Done". Label name changed.', () => {
cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click();
cy.get('[placeholder="Label name"]').clear().type(secondLabelName);
cy.contains('[type="submit"]', 'Done').click();
cy.get('.cvat-constructor-viewer-item')
.should('exist')
.and('have.length', 1)
.and('have.text', secondLabelName);
});
});
});
Loading

0 comments on commit 1488a0c

Please sign in to comment.