From be5b8f4ac728c7f52aa3e1273bb38692f9466864 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Tue, 27 Oct 2020 10:31:34 +0300 Subject: [PATCH 01/24] fixed 'List of tasks' visualization --- components/analytics/kibana/export.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/analytics/kibana/export.json b/components/analytics/kibana/export.json index d4896f5b..63ae7373 100644 --- a/components/analytics/kibana/export.json +++ b/components/analytics/kibana/export.json @@ -99,7 +99,7 @@ "_id": "ec510550-c238-11e8-8e1b-758ef07f6de8", "_type": "index-pattern", "_source": { - "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"application\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"application.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"box count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"duration\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"event.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"frame count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"object count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"points count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"polygon count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"polyline count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"task\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"task.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"timestamp\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"track count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"userid\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"userid.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"working_time\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"application\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"application.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"box count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"duration\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"event.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"frame count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"object count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"points count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"polygon count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"polyline count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"task\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"task\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"timestamp\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"track count\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"userid\",\"type\":\"string\",\"count\":2,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"userid.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"working_time\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", "title": "cvat*", "timeFieldName": "@timestamp", "fieldFormatMap": "{\"duration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\",\"outputFormat\":\"asSeconds\"}},\"working_time\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\",\"outputFormat\":\"asHours\"}}}" @@ -164,7 +164,7 @@ "_type": "visualization", "_source": { "title": "List of tasks", - "visState": "{\"title\":\"List of tasks\",\"type\":\"table\",\"params\":{\"perPage\":20,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"sort\":{\"columnIndex\":2,\"direction\":\"desc\"},\"showTotal\":false,\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"working_time\",\"customLabel\":\"Working time (h)\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"task.keyword\",\"size\":1000,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Task\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"userid.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_key\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"User\"}}]}", + "visState": "{\"title\":\"List of tasks\",\"type\":\"table\",\"params\":{\"perPage\":20,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"sort\":{\"columnIndex\":2,\"direction\":\"desc\"},\"showTotal\":false,\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"working_time\",\"customLabel\":\"Working time (h)\"}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"task\",\"size\":1000,\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Task\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"userid.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_key\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"User\"}}]}", "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":2,\"direction\":\"desc\"}}}}", "description": "", "version": 1, From 256e85d87118db5bb8ce1024df95ef8e3e67adba Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Tue, 27 Oct 2020 10:56:47 +0300 Subject: [PATCH 02/24] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b38365f8..9ffdf465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed CVAT startup process if the user has `umask 077` in .bashrc file () - Exception: Cannot read property "each" of undefined after drawing a single point () - Cannot read property 'label' of undefined (Fixed?) () +- 'List of tasks' Kibana visualization () ### Security From d35f472dbfe9465fa76f9db722ca4f86bb5bb3e3 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinin Date: Tue, 27 Oct 2020 12:19:13 +0300 Subject: [PATCH 03/24] Added usage npm ci --- CONTRIBUTING.md | 6 +++--- Dockerfile.ui | 8 ++++---- cvat-ui/package-lock.json | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb17d973..277d2bc5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,9 +67,9 @@ patches and features. - Install npm packages for UI and start UI debug server (run the following command from CVAT root directory): ```sh - npm install && \ - cd cvat-core && npm install && \ - cd ../cvat-ui && npm install && npm start + npm ci && \ + cd cvat-core && npm ci && \ + cd ../cvat-ui && npm ci && npm start ``` > Note for Mac users diff --git a/Dockerfile.ui b/Dockerfile.ui index 6af7763c..a12b60d8 100644 --- a/Dockerfile.ui +++ b/Dockerfile.ui @@ -25,19 +25,19 @@ RUN npm config set loglevel info # Install cvat-data dependencies WORKDIR /tmp/cvat-data/ -RUN npm install +RUN npm ci # Install cvat-core dependencies WORKDIR /tmp/cvat-core/ -RUN npm install +RUN npm ci # Install cvat-canvas dependencies WORKDIR /tmp/cvat-canvas/ -RUN npm install +RUN npm ci # Install cvat-ui dependencies WORKDIR /tmp/cvat-ui/ -RUN npm install +RUN npm ci # Build source code COPY cvat-data/ /tmp/cvat-data/ diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 4ed13697..eb1ae134 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -12874,7 +12874,6 @@ "requires": { "axios": "^0.20.0", "browser-or-node": "^1.2.1", - "cvat-data": "file:../cvat-data", "detect-browser": "^5.0.0", "error-stack-parser": "^2.0.2", "form-data": "^2.5.0", From 617f171d63b8d8bd6a62c5537b8be0aca2ed91f2 Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Tue, 27 Oct 2020 13:37:29 +0300 Subject: [PATCH 04/24] Cypress test. Split/merge features. --- .../case_13_merge_split_features.js | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js new file mode 100644 index 00000000..3d8913c2 --- /dev/null +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2020 Intel Corporation + * + * SPDX-License-Identifier: MIT + */ + +/// + +import { taskName } from '../../support/const'; + +context('Merge/split features', () => { + const caseId = '13'; + const createRectangleShape2Points = { + points: 'By 2 Points', + type: 'Shape', + switchLabel: false, + firstX: 250, + firstY: 350, + secondX: 350, + secondY: 450, + }; + const createRectangleShape2PointsSecond = { + points: 'By 2 Points', + type: 'Shape', + switchLabel: false, + firstX: createRectangleShape2Points.firstX + 300, + firstY: createRectangleShape2Points.firstY, + secondX: createRectangleShape2Points.secondX + 300, + secondY: createRectangleShape2Points.secondY, + }; + let iconStarCss = ''; + const frameNum = 0; + + before(() => { + cy.openTaskJob(taskName); + }); + + function checkFrameNumber(frameNum) { + cy.get('.cvat-player-frame-selector').within(() => { + cy.get('input[role="spinbutton"]').should('have.value', frameNum); + }); + } + + describe(`Testing case "${caseId}"`, () => { + it('Create rectangle shape on first frame', () => { + cy.createRectangle(createRectangleShape2Points); + checkFrameNumber(frameNum) + }); + it('Create rectangle shape on third frame with another position', () => { + cy.get('.cvat-player-next-button').click().click(); + checkFrameNumber(frameNum + 2) + cy.createRectangle(createRectangleShape2PointsSecond); + }); + it('Merge the objects with "Merge button"', () => { + cy.get('.cvat-merge-control').click(); + cy.get('#cvat_canvas_shape_2').click(); + cy.get('.cvat-player-previous-button').click().click(); + checkFrameNumber(frameNum) + cy.get('#cvat_canvas_shape_1').click(); + cy.get('.cvat-merge-control').click(); + }); + it('Get a track with keyframes on first and third frame', () => { + cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK'); + cy.get('#cvat-objects-sidebar-state-item-3').within(() => { + cy.get('.ant-row-flex').within(() => { + cy.get('.anticon-star').should('have.css', 'color').then($iconStarCss => { + iconStarCss = $iconStarCss + expect(iconStarCss).to.be.eq('rgb(36, 36, 36)') + }); + }); + }); + cy.get('.cvat-player-next-button').click().click(); + checkFrameNumber(frameNum + 2) + cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK'); + cy.get('#cvat-objects-sidebar-state-item-3').within(() => { + cy.get('.ant-row-flex').within(() => { + cy.get('.anticon-star').should('have.css', 'color', iconStarCss) + }); + }); + }); + it('On the second frame and on the fourth frame the track is invisible', () => { + cy.get('.cvat-player-previous-button').click(); + checkFrameNumber(frameNum + 1) + cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); + cy.get('.cvat-player-next-button').click().click(); + checkFrameNumber(frameNum + 3) + cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); + }); + }); +}); From 343e4e551506dc76556bb55fd3398a360e67e758 Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Tue, 27 Oct 2020 17:19:27 +0300 Subject: [PATCH 05/24] Continue writing the test. Try to fix "Cypress failed to make a connection to the Chrome DevTools Protocol" Adding selection lable name when goint to AAM to cypress command. Fix some test for avid fail when the label order is reversed --- .../case_13_merge_split_features.js | 34 ++++++++++++------- ...d_attribute_correspond_chosen_attribute.js | 15 +++----- .../issue_1750_err_aam_switch_frames.js | 18 +++++----- tests/cypress/plugins/index.js | 8 +++++ tests/cypress/support/commands.js | 27 +++++++++------ 5 files changed, 59 insertions(+), 43 deletions(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js index 3d8913c2..21e64c1d 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -1,8 +1,6 @@ -/* - * Copyright (C) 2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - */ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT /// @@ -43,19 +41,19 @@ context('Merge/split features', () => { describe(`Testing case "${caseId}"`, () => { it('Create rectangle shape on first frame', () => { + checkFrameNumber(frameNum); cy.createRectangle(createRectangleShape2Points); - checkFrameNumber(frameNum) }); it('Create rectangle shape on third frame with another position', () => { cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 2) + checkFrameNumber(frameNum + 2); cy.createRectangle(createRectangleShape2PointsSecond); }); it('Merge the objects with "Merge button"', () => { cy.get('.cvat-merge-control').click(); cy.get('#cvat_canvas_shape_2').click(); cy.get('.cvat-player-previous-button').click().click(); - checkFrameNumber(frameNum) + checkFrameNumber(frameNum); cy.get('#cvat_canvas_shape_1').click(); cy.get('.cvat-merge-control').click(); }); @@ -65,18 +63,18 @@ context('Merge/split features', () => { cy.get('#cvat-objects-sidebar-state-item-3').within(() => { cy.get('.ant-row-flex').within(() => { cy.get('.anticon-star').should('have.css', 'color').then($iconStarCss => { - iconStarCss = $iconStarCss - expect(iconStarCss).to.be.eq('rgb(36, 36, 36)') + iconStarCss = $iconStarCss; + expect(iconStarCss).to.be.eq('rgb(36, 36, 36)'); }); }); }); cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 2) + checkFrameNumber(frameNum + 2); cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK'); cy.get('#cvat-objects-sidebar-state-item-3').within(() => { cy.get('.ant-row-flex').within(() => { - cy.get('.anticon-star').should('have.css', 'color', iconStarCss) + cy.get('.anticon-star').should('have.css', 'color', iconStarCss); }); }); }); @@ -88,5 +86,17 @@ context('Merge/split features', () => { checkFrameNumber(frameNum + 3) cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); }); + // it('Go to the second frame and remove "outside" flag from the track. The track now visible.', () => { + // cy.get('.cvat-player-previous-button').click().click(); + // checkFrameNumber(frameNum + 1) + // cy.get('#cvat-objects-sidebar-state-item-3').within(() => { + // cy.get('.ant-row-flex').within(() => { + // cy.get('.anticon-star').should('have.css', 'color').then($iconStarCss => { + // iconStarCss = $iconStarCss + // expect(iconStarCss).to.be.eq('rgb(36, 36, 36)') + // }); + // }); + // }); + // }); }); }); diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js index 13926213..34458402 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js @@ -1,8 +1,6 @@ -/* - * Copyright (C) 2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - */ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT /// @@ -30,12 +28,7 @@ context('The highlighted attribute in AAM should correspond to the chosen attrib cy.createRectangle(createRectangleShape2Points); }); it('Go to AAM', () => { - cy.changeAnnotationMode('Attribute annotation'); - // Select the necessary label in any case - cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { - cy.get('.ant-select-selection').click(); - }); - cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); + cy.changeAnnotationMode('Attribute annotation', labelName); }); it('Check if highlighted attribute correspond to the chosen attribute in right panel', () => { cy.get('.cvat_canvas_text').within(() => { diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js index ee7652cd..ea972d23 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js @@ -1,8 +1,6 @@ -/* - * Copyright (C) 2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - */ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT /// @@ -39,11 +37,7 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o cy.createRectangle(createRectangleShape2PointsSecond); }); it('Go to AAM', () => { - cy.get('.cvat-workspace-selector').click(); - cy.get('.ant-select-dropdown-menu-item') - .contains('Attribute annotation') - .click() - .should('contain.text', 'Attribute annotation'); + cy.changeAnnotationMode('Attribute annotation', labelName); }); it('Go to next frame', () => { cy.get('.cvat-player-next-button').click(); @@ -65,6 +59,10 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o }); it('Page with the error is missing', () => { cy.contains('Oops, something went wrong').should('not.exist'); + cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { + cy.get('.ant-select-selection').click(); + }); + cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); cy.get('.attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 2 [2/2]`); }); }); diff --git a/tests/cypress/plugins/index.js b/tests/cypress/plugins/index.js index 00a306e2..f1af3f8c 100644 --- a/tests/cypress/plugins/index.js +++ b/tests/cypress/plugins/index.js @@ -16,5 +16,13 @@ module.exports = (on, config) => { return null; }, }); + // Try to resolve "Cypress failed to make a connection to the Chrome DevTools Protocol" + // https://github.com/cypress-io/cypress/issues/7450 + on('before:browser:launch', (browser, launchOptions) => { + if (browser.name === 'chrome' && browser.isHeadless) { + launchOptions.args.push('--disable-gpu'); + return launchOptions + } + }); return config; }; diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 889551c4..076c246d 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -1,8 +1,6 @@ -/* - * Copyright (C) 2020 Intel Corporation - * - * SPDX-License-Identifier: MIT - */ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT /// @@ -124,10 +122,12 @@ Cypress.Commands.add('switchLabel', (labelName) => { }); Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => { - cy.get('.cvat-objects-sidebar-state-item').then((objectSidebar) => { - cy.get(`#cvat_canvas_shape_${objectSidebar.length}`).should('exist').and('be.visible'); - cy.get(`#cvat-objects-sidebar-state-item-${objectSidebar.length}`) - .should('contain', objectSidebar.length).and('contain', `${objectType} ${objectParameters.type.toUpperCase()}`).within(() => { + cy.get('.cvat_canvas_shape').last().should('have.attr', 'id').then(($cvatCanvasShapeId) => { + const arrCvatCanvasShapeId = $cvatCanvasShapeId.split('_') + const idNumCanvasShape = arrCvatCanvasShapeId[arrCvatCanvasShapeId.length - 1] + cy.get(`#cvat_canvas_shape_${idNumCanvasShape}`).should('exist').and('be.visible'); + cy.get(`#cvat-objects-sidebar-state-item-${idNumCanvasShape}`) + .should('contain', idNumCanvasShape).and('contain', `${objectType} ${objectParameters.type.toUpperCase()}`).within(() => { cy.get('.ant-select-selection-selected-value').should('have.text', selectedValueGlobal); }); }); @@ -217,10 +217,17 @@ Cypress.Commands.add('closeSettings', () => { }); }); -Cypress.Commands.add('changeAnnotationMode', (mode) => { +Cypress.Commands.add('changeAnnotationMode', (mode, labelName) => { cy.get('.cvat-workspace-selector').click(); cy.get('.ant-select-dropdown-menu-item').contains(mode).click(); cy.get('.cvat-workspace-selector').should('contain.text', mode); + if (mode === 'Attribute annotation') { + // Select the necessary label in any case + cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { + cy.get('.ant-select-selection').click(); + }); + cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); + } }); Cypress.Commands.add('createCuboid', (createCuboidParams) => { From 7df9c4cf1cbd6f823d60931cefe7d365002ffd4c Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 28 Oct 2020 02:41:06 +0000 Subject: [PATCH 06/24] fix: upgrade @types/react-router-dom from 5.1.5 to 5.1.6 Snyk has created this PR to upgrade @types/react-router-dom from 5.1.5 to 5.1.6. See this package in npm: https://www.npmjs.com/package/@types/react-router-dom See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr --- cvat-ui/package-lock.json | 6 +++--- cvat-ui/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 4ed13697..5b33bb5a 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1254,9 +1254,9 @@ } }, "@types/react-router-dom": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.5.tgz", - "integrity": "sha512-ArBM4B1g3BWLGbaGvwBGO75GNFbLDUthrDojV2vHLih/Tq8M+tgvY1DSwkuNrPSwdp/GUL93WSEpTZs8nVyJLw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.6.tgz", + "integrity": "sha512-gjrxYqxz37zWEdMVvQtWPFMFj1dRDb4TGOcgyOfSXTrEXdF92L00WE3C471O3TV/RF1oskcStkXsOU0Ete4s/g==", "requires": { "@types/history": "*", "@types/react": "*", diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 432c439d..f808b3b5 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -53,7 +53,7 @@ "@types/react-dom": "^16.9.0", "@types/react-redux": "^7.1.2", "@types/react-router": "^5.0.5", - "@types/react-router-dom": "^5.1.0", + "@types/react-router-dom": "^5.1.6", "@types/react-share": "^3.0.3", "@types/redux-logger": "^3.0.8", "antd": "^3.26.18", From 9c07dbfd7e76f321eb158361cc81355363092f05 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 28 Oct 2020 12:45:08 +0300 Subject: [PATCH 07/24] Additional CSS classes in CVAT to cypress testing (#2366) --- .../objects-side-bar/object-item-buttons.tsx | 157 ++++++++++++++---- 1 file changed, 127 insertions(+), 30 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx index 4324efbb..dbb13d24 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx @@ -7,7 +7,9 @@ import { Row, Col } from 'antd/lib/grid'; import Icon from 'antd/lib/icon'; import Tooltip from 'antd/lib/tooltip'; -import { ObjectOutsideIcon, FirstIcon, LastIcon, PreviousIcon, NextIcon } from 'icons'; +import { + ObjectOutsideIcon, FirstIcon, LastIcon, PreviousIcon, NextIcon, +} from 'icons'; import { ObjectType, ShapeType } from 'reducers/interfaces'; interface Props { @@ -93,6 +95,37 @@ function ItemButtonsComponent(props: Props): JSX.Element { const hiddenStyle = hiddenDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; const keyframeStyle = keyframeDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; + const classes = { + firstKeyFrame: { className: 'cvat-object-item-button-first-keyframe' }, + prevKeyFrame: { className: 'cvat-object-item-button-prev-keyframe' }, + nextKeyFrame: { className: 'cvat-object-item-button-next-keyframe' }, + lastKeyFrame: { className: 'cvat-object-item-button-last-keyframe' }, + outside: { + enabled: { className: 'cvat-object-item-button-outside cvat-object-item-button-outside-enabled' }, + disabled: { className: 'cvat-object-item-button-outside' }, + }, + lock: { + enabled: { className: 'cvat-object-item-button-lock cvat-object-item-button-lock-enabled' }, + disabled: { className: 'cvat-object-item-button-lock' }, + }, + occluded: { + enabled: { className: 'cvat-object-item-button-occluded cvat-object-item-button-occluded-enabled' }, + disabled: { className: 'cvat-object-item-button-occluded' }, + }, + pinned: { + enabled: { className: 'cvat-object-item-button-pinned cvat-object-item-button-pinned-enabled' }, + disabled: { className: 'cvat-object-item-button-pinned' }, + }, + hidden: { + enabled: { className: 'cvat-object-item-button-hidden cvat-object-item-button-hidden-enabled' }, + disabled: { className: 'cvat-object-item-button-hidden' }, + }, + keyframe: { + enabled: { className: 'cvat-object-item-button-keyframe cvat-object-item-button-keyframe-enabled' }, + disabled: { className: 'cvat-object-item-button-keyframe' }, + }, + }; + if (objectType === ObjectType.TRACK) { return ( @@ -100,34 +133,62 @@ function ItemButtonsComponent(props: Props): JSX.Element { {navigateFirstKeyframe ? ( - + ) : ( - + )} {navigatePrevKeyframe ? ( - + ) : ( - + )} {navigateNextKeyframe ? ( - + ) : ( - + )} {navigateLastKeyframe ? ( - + ) : ( - + )} @@ -135,45 +196,72 @@ function ItemButtonsComponent(props: Props): JSX.Element { {outside ? ( - + ) : ( - + )} {locked ? ( - + ) : ( - + )} {occluded ? ( - + ) : ( - + )} {keyframe ? ( - + ) : ( - + )} @@ -181,9 +269,14 @@ function ItemButtonsComponent(props: Props): JSX.Element { {pinned ? ( - + ) : ( - + )} @@ -202,9 +295,9 @@ function ItemButtonsComponent(props: Props): JSX.Element { {locked ? ( - + ) : ( - + )} @@ -221,33 +314,37 @@ function ItemButtonsComponent(props: Props): JSX.Element { {locked ? ( - + ) : ( - + )} {occluded ? ( - + ) : ( - + )} {shapeType !== ShapeType.POINTS && ( {pinned ? ( - + ) : ( - + )} From b2eb45e961b041c5479e105b7e6dc5a376491090 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 28 Oct 2020 12:45:49 +0300 Subject: [PATCH 08/24] Updated sass (#2367) --- cvat-canvas/package-lock.json | 304 +++++----------------------- cvat-canvas/package.json | 2 +- cvat-ui/package-lock.json | 359 +++++++--------------------------- cvat-ui/package.json | 2 +- 4 files changed, 119 insertions(+), 548 deletions(-) diff --git a/cvat-canvas/package-lock.json b/cvat-canvas/package-lock.json index 729f2e53..8fed7d27 100644 --- a/cvat-canvas/package-lock.json +++ b/cvat-canvas/package-lock.json @@ -1824,9 +1824,9 @@ "dev": true }, "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", "dev": true }, "babel-loader": { @@ -4950,12 +4950,6 @@ "globule": "^1.0.0" } }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, "get-stdin": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-0.1.0.tgz", @@ -5093,13 +5087,13 @@ } }, "globule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", - "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.12", + "lodash": "~4.17.10", "minimatch": "~3.0.2" } }, @@ -5149,13 +5143,33 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } } }, "has": { @@ -5481,9 +5495,9 @@ "dev": true }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -5951,9 +5965,9 @@ "dev": true }, "js-base64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", - "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", "dev": true }, "js-levenshtein": { @@ -6732,9 +6746,9 @@ } }, "node-sass": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", - "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -6751,7 +6765,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -8135,9 +8149,9 @@ "dev": true }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "pstree.remy": { @@ -8624,12 +8638,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -8779,199 +8787,15 @@ "dev": true }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } + "yargs": "^13.3.2" } }, "sass-loader": { @@ -11187,38 +11011,6 @@ "errno": "~0.1.7" } }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index a41a5f11..d509f493 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -33,7 +33,7 @@ "eslint-config-airbnb-typescript": "^4.0.1", "eslint-config-typescript-recommended": "^1.4.17", "eslint-plugin-import": "^2.18.2", - "node-sass": "^4.13.1", + "node-sass": "^4.14.1", "nodemon": "^1.19.4", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.7.0", diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 4ed13697..4da6ce78 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -2598,9 +2598,9 @@ "dev": true }, "aws4": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz", - "integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", "dev": true }, "axe-core": { @@ -24558,28 +24558,6 @@ "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wide-align": "^1.1.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } } }, "gaze": { @@ -24725,13 +24703,13 @@ } }, "globule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", - "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.12", + "lodash": "~4.17.10", "minimatch": "~3.0.2" } }, @@ -24764,13 +24742,33 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } } }, "has": { @@ -25223,9 +25221,9 @@ "dev": true }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true }, "indent-string": { @@ -25720,9 +25718,9 @@ "dev": true }, "js-base64": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", - "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", "dev": true }, "js-levenshtein": { @@ -26668,9 +26666,9 @@ } }, "node-sass": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", - "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -26687,7 +26685,7 @@ "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -28229,9 +28227,9 @@ "dev": true }, "psl": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.6.0.tgz", - "integrity": "sha512-SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "public-encrypt": { @@ -29430,9 +29428,9 @@ } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -29442,7 +29440,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -29452,7 +29450,7 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, @@ -29628,221 +29626,15 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "dev": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } + "yargs": "^13.3.2" } }, "sass-loader": { @@ -30757,28 +30549,23 @@ "integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c=" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "number-is-nan": "^1.0.0" } } } @@ -31483,21 +31270,13 @@ "dev": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "trim-newlines": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 432c439d..8b722bcd 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", "html-webpack-plugin": "^3.2.0", - "node-sass": "^4.13.0", + "node-sass": "^4.14.1", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.7.0", "react-svg-loader": "^3.0.3", From 856003eba469324964ae773cbcb0c1e20e4ccbb8 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 28 Oct 2020 13:12:38 +0300 Subject: [PATCH 09/24] Updated internal links in the tool --- cvat-ui/.eslintrc.js | 2 +- cvat-ui/src/consts.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cvat-ui/.eslintrc.js b/cvat-ui/.eslintrc.js index 07afdef1..69937915 100644 --- a/cvat-ui/.eslintrc.js +++ b/cvat-ui/.eslintrc.js @@ -33,7 +33,7 @@ module.exports = { 'lines-between-class-members': 0, 'react/no-did-update-set-state': 0, // https://github.com/airbnb/javascript/issues/1875 quotes: ['error', 'single'], - 'max-len': ['error', { code: 120 }], + 'max-len': ['error', { code: 120, ignoreStrings: true }], 'func-names': ['warn', 'never'], 'operator-linebreak': ['error', 'after'], 'react/require-default-props': 'off', diff --git a/cvat-ui/src/consts.ts b/cvat-ui/src/consts.ts index 2128ba3f..3a54116a 100644 --- a/cvat-ui/src/consts.ts +++ b/cvat-ui/src/consts.ts @@ -4,18 +4,18 @@ const UNDEFINED_ATTRIBUTE_VALUE = '__undefined__'; const NO_BREAK_SPACE = '\u00a0'; -const CHANGELOG_URL = 'https://github.com/opencv/cvat/blob/develop/CHANGELOG.md'; -const LICENSE_URL = 'https://github.com/opencv/cvat/blob/develop/LICENSE'; +const CHANGELOG_URL = 'https://github.com/openvinotoolkit/cvat/blob/develop/CHANGELOG.md'; +const LICENSE_URL = 'https://github.com/openvinotoolkit/cvat/blob/develop/LICENSE'; const GITTER_URL = 'https://gitter.im/opencv-cvat'; const GITTER_PUBLIC_URL = 'https://gitter.im/opencv-cvat/public'; const FORUM_URL = 'https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit'; -const GITHUB_URL = 'https://github.com/opencv/cvat'; +const GITHUB_URL = 'https://github.com/openvinotoolkit/cvat'; const GITHUB_IMAGE_URL = - 'https://raw.githubusercontent.com/opencv/cvat/develop/cvat/apps/documentation/static/documentation/images/cvat.jpg'; + 'https://raw.githubusercontent.com/openvinotoolkit/cvat/develop/cvat/apps/documentation/static/documentation/images/cvat.jpg'; const SHARE_MOUNT_GUIDE_URL = - 'https://github.com/opencv/cvat/blob/master/cvat/apps/documentation/installation.md#share-path'; + 'https://github.com/openvinotoolkit/cvat/blob/master/cvat/apps/documentation/installation.md#share-path'; const NUCLIO_GUIDE = - 'https://github.com/opencv/cvat/blob/develop/cvat/apps/documentation/installation.md#semi-automatic-and-automatic-annotation'; + 'https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/documentation/installation.md#semi-automatic-and-automatic-annotation'; const CANVAS_BACKGROUND_COLORS = ['#ffffff', '#f1f1f1', '#e5e5e5', '#d8d8d8', '#CCCCCC', '#B3B3B3', '#999999']; const NEW_LABEL_COLOR = '#b3b3b3'; From fc28c532e757a7c472098d9638109c2a90151727 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Wed, 28 Oct 2020 12:51:10 +0200 Subject: [PATCH 10/24] fix: upgrade moment from 2.29.0 to 2.29.1 (#2364) Snyk has created this PR to upgrade moment from 2.29.0 to 2.29.1. See this package in npm: https://www.npmjs.com/package/moment See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr --- cvat-ui/package-lock.json | 6 +++--- cvat-ui/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 4da6ce78..cad6ad55 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -26431,9 +26431,9 @@ } }, "moment": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.0.tgz", - "integrity": "sha512-z6IJ5HXYiuxvFTI6eiQ9dm77uE0gyy1yXNApVHqTcnIKfY9tIwEjlzsZ6u1LQXvVgKeTnv9Xm7NDvJ7lso3MtA==" + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" }, "move-concurrently": { "version": "1.0.1", diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 8b722bcd..8eff093b 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -62,7 +62,7 @@ "cvat-core": "file:../cvat-core", "dotenv-webpack": "^1.8.0", "error-stack-parser": "^2.0.6", - "moment": "^2.29.0", + "moment": "^2.29.1", "platform": "^1.3.6", "prop-types": "^15.7.2", "react": "^16.13.1", From c9de0b98798062bbeebfd5405fe10649e91df429 Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Wed, 28 Oct 2020 15:09:41 +0300 Subject: [PATCH 11/24] Finish writing the test. --- .../case_13_merge_split_features.js | 86 +++++++++++++------ 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js index 21e64c1d..d67ec05b 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -26,8 +26,10 @@ context('Merge/split features', () => { secondX: createRectangleShape2Points.secondX + 300, secondY: createRectangleShape2Points.secondY, }; - let iconStarCss = ''; const frameNum = 0; + // Check the 'X' coordinate. 'Y' coordinate is the same. + let xCoordinatesObjectFirstFrame = 0; + let xCoordinatesObjectThirdFrame = 0; before(() => { cy.openTaskJob(taskName); @@ -43,11 +45,17 @@ context('Merge/split features', () => { it('Create rectangle shape on first frame', () => { checkFrameNumber(frameNum); cy.createRectangle(createRectangleShape2Points); + cy.get('#cvat_canvas_shape_1').should('have.attr', 'x').then(xCoords => { + xCoordinatesObjectFirstFrame = Math.floor(xCoords); + }); }); it('Create rectangle shape on third frame with another position', () => { cy.get('.cvat-player-next-button').click().click(); checkFrameNumber(frameNum + 2); cy.createRectangle(createRectangleShape2PointsSecond); + cy.get('#cvat_canvas_shape_2').should('have.attr', 'x').then(xCoords => { + xCoordinatesObjectThirdFrame = Math.floor(xCoords); + }); }); it('Merge the objects with "Merge button"', () => { cy.get('.cvat-merge-control').click(); @@ -59,44 +67,66 @@ context('Merge/split features', () => { }); it('Get a track with keyframes on first and third frame', () => { cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); - cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK'); - cy.get('#cvat-objects-sidebar-state-item-3').within(() => { - cy.get('.ant-row-flex').within(() => { - cy.get('.anticon-star').should('have.css', 'color').then($iconStarCss => { - iconStarCss = $iconStarCss; - expect(iconStarCss).to.be.eq('rgb(36, 36, 36)'); - }); - }); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-keyframe-enabled').should('exist'); }); cy.get('.cvat-player-next-button').click().click(); checkFrameNumber(frameNum + 2); cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); - cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK'); - cy.get('#cvat-objects-sidebar-state-item-3').within(() => { - cy.get('.ant-row-flex').within(() => { - cy.get('.anticon-star').should('have.css', 'color', iconStarCss); - }); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-keyframe-enabled').should('exist'); }); }); it('On the second frame and on the fourth frame the track is invisible', () => { cy.get('.cvat-player-previous-button').click(); - checkFrameNumber(frameNum + 1) + checkFrameNumber(frameNum + 1); cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 3) + checkFrameNumber(frameNum + 3); cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); }); - // it('Go to the second frame and remove "outside" flag from the track. The track now visible.', () => { - // cy.get('.cvat-player-previous-button').click().click(); - // checkFrameNumber(frameNum + 1) - // cy.get('#cvat-objects-sidebar-state-item-3').within(() => { - // cy.get('.ant-row-flex').within(() => { - // cy.get('.anticon-star').should('have.css', 'color').then($iconStarCss => { - // iconStarCss = $iconStarCss - // expect(iconStarCss).to.be.eq('rgb(36, 36, 36)') - // }); - // }); - // }); - // }); + it('Go to the second frame and remove "outside" flag from the track. The track now visible.', () => { + cy.get('.cvat-player-previous-button').click().click(); + checkFrameNumber(frameNum + 1); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-outside').click(); + cy.get('.cvat-object-item-button-outside-enabled').should('not.exist'); + }); + cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); + }); + it('Remove "keyframe" flag from the track. Track now interpolated between position on the first and the third frames.', () => { + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-keyframe').click(); + cy.get('.cvat-object-item-button-keyframe-enabled').should('not.exist'); + }); + cy.get('#cvat_canvas_shape_3').should('have.attr', 'x').then(xCoords => { + // expected 9785 to be within 9642..9928 + expect(Math.floor(xCoords)).to.be.within(xCoordinatesObjectFirstFrame, xCoordinatesObjectThirdFrame); + }); + }); + it('On the fourth frame remove "keyframe" flag from the track. The track now visible and "outside" flag is disabled.', () => { + cy.get('.cvat-player-next-button').click().click(); + checkFrameNumber(frameNum + 3); + cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-keyframe').click(); + cy.get('.cvat-object-item-button-keyframe-enabled').should('not.exist'); + cy.get('.cvat-object-item-button-outside-enabled').should('not.exist'); + }); + cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); + }); + it('Split a track with "split" button. Previous track became invisible (has "outside" flag). One more track and it is visible.', () => { + cy.get('.cvat-split-track-control').click(); + // A single click does not reproduce the split a track scenario in cypress test. + cy.get('#cvat_canvas_shape_3').click().click(); + cy.get('#cvat_canvas_shape_4').should('exist').and('be.hidden'); + cy.get('#cvat-objects-sidebar-state-item-4').should('contain', '4').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-outside-enabled').should('exist'); + }); + cy.get('#cvat_canvas_shape_5').should('exist').and('be.visible'); + cy.get('#cvat-objects-sidebar-state-item-5').should('contain', '5').and('contain', 'RECTANGLE TRACK').within(() => { + cy.get('.cvat-object-item-button-outside-enabled').should('not.exist'); + cy.get('.cvat-object-item-button-keyframe-enabled').should('exist'); + }); + }); }); }); From 0baeee7e03a6fc0a5ae0030181f8147ac097847c Mon Sep 17 00:00:00 2001 From: Dmitry Kalinin Date: Wed, 28 Oct 2020 17:42:02 +0300 Subject: [PATCH 12/24] Added CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49d49d3b..fd6157ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated `docker-compose` file version from `2.3` to `3.3`() - Added auto inference of url schema from host in CLI, if provided () - Track frames in skips between annotation is presented in MOT and MOTS formats are marked `outside` () +- UI packages installation with `npm ci` instead of `npm install` () ### Deprecated From b4b1971c3e8ad7e93c26ccdf17c906259da44578 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinin Date: Wed, 28 Oct 2020 17:45:00 +0300 Subject: [PATCH 13/24] Fixed README --- cvat-core/README.md | 2 +- cvat-ui/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cvat-core/README.md b/cvat-core/README.md index 487de911..22d8faa9 100644 --- a/cvat-core/README.md +++ b/cvat-core/README.md @@ -18,7 +18,7 @@ If you make changes in this package, please do following: - Dependencies installation ```bash -npm install +npm ci ``` - Building the module from sources in the `dist` directory: diff --git a/cvat-ui/README.md b/cvat-ui/README.md index d020214a..c32879e6 100644 --- a/cvat-ui/README.md +++ b/cvat-ui/README.md @@ -20,7 +20,7 @@ you also need to do `npm install` to update `package-lock.json` - Installing dependencies: ```bash -cd ../cvat-core && npm install && cd - && npm install +cd ../cvat-core && npm ci && cd - && npm ci ``` - Running development UI server with autorebuild on change From 611f332238d7b0a6f84c53e508ad6979c0530cab Mon Sep 17 00:00:00 2001 From: Zhiltsov Max Date: Wed, 28 Oct 2020 17:57:01 +0300 Subject: [PATCH 14/24] update datumaro to 0.1.3 --- cvat/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat/requirements/base.txt b/cvat/requirements/base.txt index 60613b43..4d9dabf1 100644 --- a/cvat/requirements/base.txt +++ b/cvat/requirements/base.txt @@ -44,4 +44,4 @@ tensorflow==2.2.1 # Optional requirement of Datumaro # archives. Don't use as a python module because it has GPL license. patool==1.12 diskcache==5.0.2 -git+https://github.com/openvinotoolkit/datumaro@v0.1.2 \ No newline at end of file +git+https://github.com/openvinotoolkit/datumaro@v0.1.3 \ No newline at end of file From 1cb0fabd39dafcd8b5845df1ca86c65dd7cdca8b Mon Sep 17 00:00:00 2001 From: Zhiltsov Max Date: Wed, 28 Oct 2020 17:57:16 +0300 Subject: [PATCH 15/24] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49d49d3b..b13c3526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Exception: Cannot read property "each" of undefined after drawing a single point () - Cannot read property 'label' of undefined (Fixed?) () - Excluded track frames marked `outside` in `CVAT for Images` export () +- An error on exporting not `jpg` or `png` images in TF Detection API format () ### Security From bac7c7c24b6d5cdb51a102ae67e8cb2a8c99e07a Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 29 Oct 2020 22:02:53 +0000 Subject: [PATCH 16/24] fix: upgrade detect-browser from 5.1.1 to 5.2.0 Snyk has created this PR to upgrade detect-browser from 5.1.1 to 5.2.0. See this package in npm: https://www.npmjs.com/package/detect-browser See this project in Snyk: https://app.snyk.io/org/cvat/project/6ec290d2-fdd9-480b-aeef-3552213525dd?utm_source=github&utm_medium=upgrade-pr --- cvat-core/package-lock.json | 10 +++------- cvat-core/package.json | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cvat-core/package-lock.json b/cvat-core/package-lock.json index 0b31ce41..6128b1d4 100644 --- a/cvat-core/package-lock.json +++ b/cvat-core/package-lock.json @@ -2822,10 +2822,6 @@ }, "cvat-data": { "version": "file:../cvat-data", - "requires": { - "async-mutex": "^0.2.4", - "jszip": "3.5.0" - }, "dependencies": { "@babel/cli": { "version": "7.6.4", @@ -9637,9 +9633,9 @@ } }, "detect-browser": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.1.1.tgz", - "integrity": "sha512-5n2aWI57qC3kZaK4j2zYsG6L1LrxgLptGCNhMQgdKhVn6cSdcq43pp6xHPfTHG3TYM6myF4tIPWiZtfdVDgb9w==" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz", + "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA==" }, "detect-file": { "version": "1.0.0", diff --git a/cvat-core/package.json b/cvat-core/package.json index ece057ac..0227549f 100644 --- a/cvat-core/package.json +++ b/cvat-core/package.json @@ -36,7 +36,7 @@ "axios": "^0.20.0", "browser-or-node": "^1.2.1", "cvat-data": "../cvat-data", - "detect-browser": "^5.0.0", + "detect-browser": "^5.2.0", "error-stack-parser": "^2.0.2", "form-data": "^2.5.0", "jest-config": "^24.8.0", From 8028d46f029c1290d189a946174bfced599851a0 Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Fri, 30 Oct 2020 15:56:12 +0300 Subject: [PATCH 17/24] Applying comments. --- .../case_13_merge_split_features.js | 26 +++++-------- ...d_attribute_correspond_chosen_attribute.js | 2 +- .../issue_1540_add_remove_tag.js | 4 +- .../issue_1750_err_aam_switch_frames.js | 7 +--- tests/cypress/support/commands.js | 38 ++++++++++++------- 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js index d67ec05b..4db92a6a 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -35,23 +35,22 @@ context('Merge/split features', () => { cy.openTaskJob(taskName); }); - function checkFrameNumber(frameNum) { + function goCheckFrameNumber(frameNum) { cy.get('.cvat-player-frame-selector').within(() => { - cy.get('input[role="spinbutton"]').should('have.value', frameNum); + cy.get('input[role="spinbutton"]').clear().type(`${frameNum}{Enter}`).should('have.value', frameNum); }); } describe(`Testing case "${caseId}"`, () => { it('Create rectangle shape on first frame', () => { - checkFrameNumber(frameNum); + goCheckFrameNumber(frameNum); cy.createRectangle(createRectangleShape2Points); cy.get('#cvat_canvas_shape_1').should('have.attr', 'x').then(xCoords => { xCoordinatesObjectFirstFrame = Math.floor(xCoords); }); }); it('Create rectangle shape on third frame with another position', () => { - cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 2); + goCheckFrameNumber(frameNum + 2); cy.createRectangle(createRectangleShape2PointsSecond); cy.get('#cvat_canvas_shape_2').should('have.attr', 'x').then(xCoords => { xCoordinatesObjectThirdFrame = Math.floor(xCoords); @@ -60,8 +59,7 @@ context('Merge/split features', () => { it('Merge the objects with "Merge button"', () => { cy.get('.cvat-merge-control').click(); cy.get('#cvat_canvas_shape_2').click(); - cy.get('.cvat-player-previous-button').click().click(); - checkFrameNumber(frameNum); + goCheckFrameNumber(frameNum); cy.get('#cvat_canvas_shape_1').click(); cy.get('.cvat-merge-control').click(); }); @@ -70,24 +68,20 @@ context('Merge/split features', () => { cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { cy.get('.cvat-object-item-button-keyframe-enabled').should('exist'); }); - cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 2); + goCheckFrameNumber(frameNum + 2); cy.get('#cvat_canvas_shape_3').should('exist').and('be.visible'); cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { cy.get('.cvat-object-item-button-keyframe-enabled').should('exist'); }); }); it('On the second frame and on the fourth frame the track is invisible', () => { - cy.get('.cvat-player-previous-button').click(); - checkFrameNumber(frameNum + 1); + goCheckFrameNumber(frameNum + 1); cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); - cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 3); + goCheckFrameNumber(frameNum + 3); cy.get('#cvat_canvas_shape_3').should('exist').and('be.hidden'); }); it('Go to the second frame and remove "outside" flag from the track. The track now visible.', () => { - cy.get('.cvat-player-previous-button').click().click(); - checkFrameNumber(frameNum + 1); + goCheckFrameNumber(frameNum + 1); cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { cy.get('.cvat-object-item-button-outside').click(); cy.get('.cvat-object-item-button-outside-enabled').should('not.exist'); @@ -106,7 +100,7 @@ context('Merge/split features', () => { }); it('On the fourth frame remove "keyframe" flag from the track. The track now visible and "outside" flag is disabled.', () => { cy.get('.cvat-player-next-button').click().click(); - checkFrameNumber(frameNum + 3); + goCheckFrameNumber(frameNum + 3); cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { cy.get('.cvat-object-item-button-keyframe').click(); cy.get('.cvat-object-item-button-keyframe-enabled').should('not.exist'); diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js index 34458402..991f91d6 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1425_highlighted_attribute_correspond_chosen_attribute.js @@ -28,7 +28,7 @@ context('The highlighted attribute in AAM should correspond to the chosen attrib cy.createRectangle(createRectangleShape2Points); }); it('Go to AAM', () => { - cy.changeAnnotationMode('Attribute annotation', labelName); + cy.changeWorkspace('Attribute annotation', labelName); }); it('Check if highlighted attribute correspond to the chosen attribute in right panel', () => { cy.get('.cvat_canvas_text').within(() => { diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1540_add_remove_tag.js b/tests/cypress/integration/actions_tasks_objects/issue_1540_add_remove_tag.js index 3f5d83be..f5a402ad 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1540_add_remove_tag.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1540_add_remove_tag.js @@ -17,11 +17,11 @@ context('Check if the UI not to crash after remove a tag', () => { describe(`Testing issue "${issueId}"`, () => { it('Add a tag', () => { - cy.changeAnnotationMode('Tag annotation'); + cy.changeWorkspace('Tag annotation'); cy.get('.cvat-tag-annotation-sidebar-buttons').within(() => { cy.get('button').contains('Add tag').click({ force: true }); }); - cy.changeAnnotationMode('Standard'); + cy.changeWorkspace('Standard'); }); it('Remove the tag', () => { cy.get('#cvat-objects-sidebar-state-item-1') diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js index ea972d23..150911ba 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1750_err_aam_switch_frames.js @@ -37,7 +37,7 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o cy.createRectangle(createRectangleShape2PointsSecond); }); it('Go to AAM', () => { - cy.changeAnnotationMode('Attribute annotation', labelName); + cy.changeWorkspace('Attribute annotation', labelName); }); it('Go to next frame', () => { cy.get('.cvat-player-next-button').click(); @@ -59,10 +59,7 @@ context('An error occurs in AAM when switching to 2 frames, if the frames have o }); it('Page with the error is missing', () => { cy.contains('Oops, something went wrong').should('not.exist'); - cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { - cy.get('.ant-select-selection').click(); - }); - cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); + cy.changeLabelAAM(labelName); cy.get('.attribute-annotation-sidebar-object-switcher').should('contain', `${labelName} 2 [2/2]`); }); }); diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 076c246d..b81bfe72 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -122,12 +122,16 @@ Cypress.Commands.add('switchLabel', (labelName) => { }); Cypress.Commands.add('checkObjectParameters', (objectParameters, objectType) => { - cy.get('.cvat_canvas_shape').last().should('have.attr', 'id').then(($cvatCanvasShapeId) => { - const arrCvatCanvasShapeId = $cvatCanvasShapeId.split('_') - const idNumCanvasShape = arrCvatCanvasShapeId[arrCvatCanvasShapeId.length - 1] - cy.get(`#cvat_canvas_shape_${idNumCanvasShape}`).should('exist').and('be.visible'); - cy.get(`#cvat-objects-sidebar-state-item-${idNumCanvasShape}`) - .should('contain', idNumCanvasShape).and('contain', `${objectType} ${objectParameters.type.toUpperCase()}`).within(() => { + let listCanvasShapeId = []; + cy.document().then((doc) => { + const listCanvasShape = Array.from(doc.querySelectorAll('.cvat_canvas_shape')); + for (let i = 0; i < listCanvasShape.length; i++) { + listCanvasShapeId.push(listCanvasShape[i].id.match(/\d+$/)); + } + const maxId = Math.max(...listCanvasShapeId); + cy.get(`#cvat_canvas_shape_${maxId}`).should('exist').and('be.visible'); + cy.get(`#cvat-objects-sidebar-state-item-${maxId}`) + .should('contain', maxId).and('contain', `${objectType} ${objectParameters.type.toUpperCase()}`).within(() => { cy.get('.ant-select-selection-selected-value').should('have.text', selectedValueGlobal); }); }); @@ -217,17 +221,23 @@ Cypress.Commands.add('closeSettings', () => { }); }); -Cypress.Commands.add('changeAnnotationMode', (mode, labelName) => { +Cypress.Commands.add('changeWorkspace', (mode, labelName) => { cy.get('.cvat-workspace-selector').click(); cy.get('.ant-select-dropdown-menu-item').contains(mode).click(); cy.get('.cvat-workspace-selector').should('contain.text', mode); - if (mode === 'Attribute annotation') { - // Select the necessary label in any case - cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { - cy.get('.ant-select-selection').click(); - }); - cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); - } + cy.changeLabelAAM(labelName); +}); + +Cypress.Commands.add('changeLabelAAM', (labelName) => { + cy.get('.cvat-workspace-selector').then((value) => { + const cvatWorkspaceSelectorValue = value.text(); + if (cvatWorkspaceSelectorValue === 'Attribute annotation') { + cy.get('.attribute-annotation-sidebar-basics-editor').within(() => { + cy.get('.ant-select-selection').click(); + }); + cy.get('.ant-select-dropdown-menu-item').contains(labelName).click(); + } + }); }); Cypress.Commands.add('createCuboid', (createCuboidParams) => { From 1600340a65df3ba0d5f5fb378f6fdc80c1e16b2d Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Fri, 30 Oct 2020 17:59:31 +0300 Subject: [PATCH 18/24] Deleted unnecessary code. --- .../actions_tasks_objects/case_13_merge_split_features.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js index 4db92a6a..3ef65781 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js +++ b/tests/cypress/integration/actions_tasks_objects/case_13_merge_split_features.js @@ -99,7 +99,6 @@ context('Merge/split features', () => { }); }); it('On the fourth frame remove "keyframe" flag from the track. The track now visible and "outside" flag is disabled.', () => { - cy.get('.cvat-player-next-button').click().click(); goCheckFrameNumber(frameNum + 3); cy.get('#cvat-objects-sidebar-state-item-3').should('contain', '3').and('contain', 'RECTANGLE TRACK').within(() => { cy.get('.cvat-object-item-button-keyframe').click(); From b9bc4e908963758c4a4c6707176677afca0c3905 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 2 Nov 2020 02:41:20 +0000 Subject: [PATCH 19/24] fix: upgrade @types/react from 16.9.51 to 16.9.52 Snyk has created this PR to upgrade @types/react from 16.9.51 to 16.9.52. See this package in npm: https://www.npmjs.com/package/@types/react See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr --- cvat-ui/package-lock.json | 6 +++--- cvat-ui/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 05cec51c..a78e8173 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1208,9 +1208,9 @@ "dev": true }, "@types/react": { - "version": "16.9.51", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.51.tgz", - "integrity": "sha512-lQa12IyO+DMlnSZ3+AGHRUiUcpK47aakMMoBG8f7HGxJT8Yfe+WE128HIXaHOHVPReAW0oDS3KAI0JI2DDe1PQ==", + "version": "16.9.52", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.52.tgz", + "integrity": "sha512-EHRjmnxiNivwhGdMh9sz1Yw9AUxTSZFxKqdBWAAzyZx3sufWwx6ogqHYh/WB1m/I4ZpjkoZLExF5QTy2ekVi/Q==", "requires": { "@types/prop-types": "*", "csstype": "^3.0.2" diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 1e70e6e0..581b927b 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@types/platform": "^1.3.3", - "@types/react": "^16.9.51", + "@types/react": "^16.9.52", "@types/react-color": "^3.0.4", "@types/react-dom": "^16.9.0", "@types/react-redux": "^7.1.2", From fd767f95a14745c3a489a45bdc7ac00812588aaf Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Thu, 5 Nov 2020 12:26:06 +0200 Subject: [PATCH 20/24] fix: upgrade multiple dependencies with Snyk (#2394) Snyk has created this PR to upgrade: - react from 16.13.1 to 16.14.0. See this package in npm: https://www.npmjs.com/package/react - react-dom from 16.13.1 to 16.14.0. See this package in npm: https://www.npmjs.com/package/react-dom See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr --- cvat-ui/package-lock.json | 12 ++++++------ cvat-ui/package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index a78e8173..d76e4fe4 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -28850,9 +28850,9 @@ } }, "react": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", - "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -28883,9 +28883,9 @@ } }, "react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 581b927b..4bbdd7a7 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -65,10 +65,10 @@ "moment": "^2.29.1", "platform": "^1.3.6", "prop-types": "^15.7.2", - "react": "^16.13.1", + "react": "^16.14.0", "react-color": "^2.18.1", "react-cookie": "^4.0.3", - "react-dom": "^16.13.1", + "react-dom": "^16.14.0", "react-hotkeys": "^2.0.0", "react-redux": "^7.1.1", "react-router": "^5.1.0", From bbfa880d1fcd6bfb9073640ce7bdfdade1e5c7ba Mon Sep 17 00:00:00 2001 From: Maria Khrustaleva Date: Thu, 5 Nov 2020 22:48:59 +0300 Subject: [PATCH 21/24] Added ability to correct upload video with a rotation record in the metadata (#2218) * Added ability to correct upload video with a rotation record in the metadata * fix sizes of rotated preview * fix sizes of rotated frame * Added tests for uploaded video with rotation record in metadata * Used OpenCV instead of PIL * Fixed tests * Update CHANGELOG * fix * Moved function Co-authored-by: Nikita Manovich --- CHANGELOG.md | 2 +- cvat/apps/engine/media_extractors.py | 21 ++++++- cvat/apps/engine/prepare.py | 28 ++++++++- cvat/apps/engine/task.py | 1 + .../tests/assets/test_rotated_90_video.mp4 | Bin 0 -> 8808 bytes cvat/apps/engine/tests/test_rest_api.py | 53 +++++++++++++++++- cvat/apps/engine/utils.py | 14 +++++ 7 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 cvat/apps/engine/tests/assets/test_rotated_90_video.mp4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a5cd4ec..4f4fd382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.2.0] - Unreleased ### Added - - Removed Z-Order flag from task creation process - Ability to login into CVAT-UI with token from api/v1/auth/login () - Added layout grids toggling ('ctrl + alt + Enter') @@ -29,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ability to upload prepared meta information along with a video when creating a task () - Optional chaining plugin for cvat-canvas and cvat-ui () - MOTS png mask format support () +- Ability to correct upload video with a rotation record in the metadata () ### Changed diff --git a/cvat/apps/engine/media_extractors.py b/cvat/apps/engine/media_extractors.py index 21430838..b58bf98c 100644 --- a/cvat/apps/engine/media_extractors.py +++ b/cvat/apps/engine/media_extractors.py @@ -14,6 +14,7 @@ import av import numpy as np from pyunpack import Archive from PIL import Image, ImageFile +from cvat.apps.engine.utils import rotate_image # fixes: "OSError:broken data stream" when executing line 72 while loading images downloaded from the web # see: https://stackoverflow.com/questions/42462431/oserror-broken-data-stream-when-reading-image-file @@ -228,6 +229,16 @@ class VideoReader(IMediaReader): for image in packet.decode(): frame_num += 1 if self._has_frame(frame_num - 1): + if packet.stream.metadata.get('rotate'): + old_image = image + image = av.VideoFrame().from_ndarray( + rotate_image( + image.to_ndarray(format='bgr24'), + 360 - int(container.streams.video[0].metadata.get('rotate')) + ), + format ='bgr24' + ) + image.pts = old_image.pts yield (image, self._source_path[0], image.pts) def __iter__(self): @@ -252,7 +263,15 @@ class VideoReader(IMediaReader): container = self._get_av_container() stream = container.streams.video[0] preview = next(container.decode(stream)) - return self._get_preview(preview.to_image()) + return self._get_preview(preview.to_image() if not stream.metadata.get('rotate') \ + else av.VideoFrame().from_ndarray( + rotate_image( + preview.to_ndarray(format='bgr24'), + 360 - int(container.streams.video[0].metadata.get('rotate')) + ), + format ='bgr24' + ).to_image() + ) def get_image_size(self, i): image = (next(iter(self)))[0] diff --git a/cvat/apps/engine/prepare.py b/cvat/apps/engine/prepare.py index 9465b680..9ee54630 100644 --- a/cvat/apps/engine/prepare.py +++ b/cvat/apps/engine/prepare.py @@ -6,6 +6,7 @@ import av from collections import OrderedDict import hashlib import os +from cvat.apps.engine.utils import rotate_image class WorkWithVideo: def __init__(self, **kwargs): @@ -24,7 +25,6 @@ class WorkWithVideo: video_stream.thread_type = 'AUTO' return video_stream - class AnalyzeVideo(WorkWithVideo): def check_type_first_frame(self): container = self._open_video_container(self.source_path, mode='r') @@ -76,7 +76,17 @@ class PrepareInfo(WorkWithVideo): @property def frame_sizes(self): + container = self._open_video_container(self.source_path, 'r') frame = next(iter(self.key_frames.values())) + if container.streams.video[0].metadata.get('rotate'): + frame = av.VideoFrame().from_ndarray( + rotate_image( + frame.to_ndarray(format='bgr24'), + 360 - int(container.streams.video[0].metadata.get('rotate')) + ), + format ='bgr24' + ) + self._close_video_container(container) return (frame.width, frame.height) def check_key_frame(self, container, video_stream, key_frame): @@ -150,6 +160,14 @@ class PrepareInfo(WorkWithVideo): if frame_number < start_chunk_frame_number: continue elif frame_number < end_chunk_frame_number and not ((frame_number - start_chunk_frame_number) % step): + if video_stream.metadata.get('rotate'): + frame = av.VideoFrame().from_ndarray( + rotate_image( + frame.to_ndarray(format='bgr24'), + 360 - int(container.streams.video[0].metadata.get('rotate')) + ), + format ='bgr24' + ) yield frame elif (frame_number - start_chunk_frame_number) % step: continue @@ -177,6 +195,14 @@ class UploadedMeta(PrepareInfo): container.seek(offset=next(iter(self.key_frames.values())), stream=video_stream) for packet in container.demux(video_stream): for frame in packet.decode(): + if video_stream.metadata.get('rotate'): + frame = av.VideoFrame().from_ndarray( + rotate_image( + frame.to_ndarray(format='bgr24'), + 360 - int(container.streams.video[0].metadata.get('rotate')) + ), + format ='bgr24' + ) self._close_video_container(container) return (frame.width, frame.height) diff --git a/cvat/apps/engine/task.py b/cvat/apps/engine/task.py index fad3654f..e724d242 100644 --- a/cvat/apps/engine/task.py +++ b/cvat/apps/engine/task.py @@ -294,6 +294,7 @@ def _create_thread(tid, data): if settings.USE_CACHE and db_data.storage_method == StorageMethodChoice.CACHE: for media_type, media_files in media.items(): + if not media_files: continue diff --git a/cvat/apps/engine/tests/assets/test_rotated_90_video.mp4 b/cvat/apps/engine/tests/assets/test_rotated_90_video.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..31bd0737b602e0b9b865e006194021449da024d4 GIT binary patch literal 8808 zcmb7~UuYaf9LMMGl53#}O|MDw*Y--P2&OSfFR?xd(FVywLC#_bMr1G93k}`Pop+Z* zE7-%@V2Ke6^$&>zX|-uf9zq*q@DEKOguWOmm3XjV5BlPp_|Pg;t>2lu>|XQF?=9@@ z-0o**Z$3LS`2;A-7mt%xIul2(i6C77h!s_qwTv5<V zz)lvx&J@5d6u>U~npW7dIr1{W;o)?}3+Fc1mX-Otl6T8;Uw(NDZA#`p${mYB9gD&o zi$WZW!W)a)+IFGNJ&~?B@&>1E5!wbhZ7d3HEDCKb3T-S3Z9u1DM6n!gnc#=xTKDPl zE!!z7+yhzLnr|CB%6hkMr>JnJWOd`&$pYA!0@#HD*yRFPTb@q~e$b=6?wR7`jTk%T zhe&xe3wbmPc{B@oGz)n&>&VLlr>vssW~SpG^|g*`pLhd==P@3gBFv1Hykq9HEzkujvlUB+eFK1ll-621IW~kVmtS zN3)Pevyex#w!BK!=ha*zhHiLXT(vx1%o7=nmPJ*E$K|T}I}TOd9fzvk&eOxx2*(<# z+)}z`e+T!NowGb0Pcj#PH=2bwnuR%=olxD zXH{@V=BuJRl2zdy$*TB{WF2{OIHBF&-b~FlAw=K1;3e8NW=&XB4JWu<)o_AC)o_AC z;Vo|Lb1}uTwN-1u3zm1f;UW=njQRpS+Db7wcx6!xURe}_R~E(Kl|?all_=Bd9Bp!{ zq;&oY)BNOANocNushD!Aghb_335m+75)zeDB_t}RN=Ve!R)gueTBEpu>)=kCsjnEp zXrnBOHp-%Cqb!Ox%A#naBV@50YjQ?7q?P}~b#1qe2KN}(wXrC)u_&~$D73LCv`KV= zD3-0QR=s~{aP@FwhefM6^%ObqqFKZuG>ce-W)X|fEMgIwb>!ilS2A7i8sg+FTSZzU z^9(^CN3)Pevyex#kVmtSN3*uPI@G*N=}Pf2Cl7C1Gd@xt%|af{LLSXR9?e3YV(${c zh3A|Zi6rp~+c1;Ib!_t%&u>CtbzxQ|Z||dDaNv=HLbT_z>(g$$KL0Ke3!T8B*Agex zH9dJ)E;o7Y^~=MDxqWM{DfhO^kDFMtr8p4Q6LEa23mb8~l2;4P%H^xhcONqKfe?=P zO?_?ITd=!Dyt1gyJ9u0-Vk(7?{m#;b?~%^Xpl*aE87kRv7C}#MxY1c$N(Q6>R5>LceZ-``;@LvOYqvVpGXLip`6uT2ixyofd zk=^fnRwv#-68<<23SgeSLO!HglI>ERMb} ze)M*foIiqH*N%pgeXWNZTLX>FO-){$ Date: Thu, 5 Nov 2020 12:01:09 -0800 Subject: [PATCH 22/24] Include Projects using CVAT section, add Onepanel (#2358) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0ca054f4..a3957fb6 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,6 @@ Other ways to ask questions and get our support: - [Intel AI blog: New Computer Vision Tool Accelerates Annotation of Digital Images and Video](https://www.intel.ai/introducing-cvat) - [Intel Software: Computer Vision Annotation Tool: A Universal Approach to Data Annotation](https://software.intel.com/en-us/articles/computer-vision-annotation-tool-a-universal-approach-to-data-annotation) - [VentureBeat: Intel open-sources CVAT, a toolkit for data labeling](https://venturebeat.com/2019/03/05/intel-open-sources-cvat-a-toolkit-for-data-labeling/) + +## Projects using CVAT +- [Onepanel](https://github.com/onepanelio/core) - Onepanel is an open source vision AI platform that fully integrates CVAT with scalable data processing and parallelized training pipelines. From 3b29621c721d3d8ef314fdb8dd6b7964695e4fe7 Mon Sep 17 00:00:00 2001 From: Anastasia Yasakova Date: Thu, 5 Nov 2020 23:05:28 +0300 Subject: [PATCH 23/24] Add ImageNet format (#2376) * Add ImageNet format * Add ImageNet to documentation --- cvat/apps/dataset_manager/formats/README.md | 33 +++++++++++++++ cvat/apps/dataset_manager/formats/imagenet.py | 41 +++++++++++++++++++ cvat/apps/dataset_manager/formats/registry.py | 3 +- .../dataset_manager/tests/test_formats.py | 3 ++ cvat/apps/engine/tests/test_rest_api.py | 3 ++ 5 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 cvat/apps/dataset_manager/formats/imagenet.py diff --git a/cvat/apps/dataset_manager/formats/README.md b/cvat/apps/dataset_manager/formats/README.md index c3a9b6d0..b4728701 100644 --- a/cvat/apps/dataset_manager/formats/README.md +++ b/cvat/apps/dataset_manager/formats/README.md @@ -18,6 +18,7 @@ - [PASCAL VOC and mask](#voc) - [YOLO](#yolo) - [TF detection API](#tfrecord) + - [ImageNet](#imagenet) ## How to add a new annotation format support @@ -802,3 +803,35 @@ taskname.zip/ ``` - supported annotations: Rectangles, Polygons, Masks (as polygons) + +### [ImageNet](http://www.image-net.org) + +#### ImageNet Dumper + +Downloaded file: a zip archive of the following structure: + +```bash +# if we save images: +taskname.zip/ +└── label1/ + ├── label1_image1.jpg + └── label1_image2.jpg +└── label2/ + ├── label2_image1.jpg + ├── label2_image3.jpg + └── label2_image4.jpg + +# if we keep only annotation: +taskname.zip/ +└── .txt +└── synsets.txt + +``` + +- supported annotations: Labels + +#### ImageNet Loader + +Uploaded file: a zip archive of the structure above + +- supported annotations: Labels diff --git a/cvat/apps/dataset_manager/formats/imagenet.py b/cvat/apps/dataset_manager/formats/imagenet.py new file mode 100644 index 00000000..d9847549 --- /dev/null +++ b/cvat/apps/dataset_manager/formats/imagenet.py @@ -0,0 +1,41 @@ +# Copyright (C) 2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +import os.path as osp +from glob import glob + +import zipfile +from tempfile import TemporaryDirectory + +from datumaro.components.project import Dataset +from cvat.apps.dataset_manager.bindings import CvatTaskDataExtractor, \ + import_dm_annotations +from cvat.apps.dataset_manager.util import make_zip_archive + +from .registry import dm_env, exporter, importer + + +@exporter(name='ImageNet', ext='ZIP', version='1.0') +def _export(dst_file, task_data, save_images=False): + extractor = CvatTaskDataExtractor(task_data, include_images=save_images) + extractor = Dataset.from_extractors(extractor) # apply lazy transform + with TemporaryDirectory() as temp_dir: + if save_images: + dm_env.converters.get('imagenet').convert(extractor, + save_dir=temp_dir, save_images=save_images) + else: + dm_env.converters.get('imagenet_txt').convert(extractor, + save_dir=temp_dir, save_images=save_images) + + make_zip_archive(temp_dir, dst_file) + +@importer(name='ImageNet', ext='ZIP', version='1.0') +def _import(src_file, task_data): + with TemporaryDirectory() as tmp_dir: + zipfile.ZipFile(src_file).extractall(tmp_dir) + if glob(osp.join(tmp_dir, '*.txt')): + dataset = dm_env.make_importer('imagenet_txt')(tmp_dir).make_dataset() + else: + dataset = dm_env.make_importer('imagenet')(tmp_dir).make_dataset() + import_dm_annotations(dataset, task_data) \ No newline at end of file diff --git a/cvat/apps/dataset_manager/formats/registry.py b/cvat/apps/dataset_manager/formats/registry.py index c84d60fc..c175a42b 100644 --- a/cvat/apps/dataset_manager/formats/registry.py +++ b/cvat/apps/dataset_manager/formats/registry.py @@ -90,4 +90,5 @@ import cvat.apps.dataset_manager.formats.mot import cvat.apps.dataset_manager.formats.mots import cvat.apps.dataset_manager.formats.pascal_voc import cvat.apps.dataset_manager.formats.tfrecord -import cvat.apps.dataset_manager.formats.yolo \ No newline at end of file +import cvat.apps.dataset_manager.formats.yolo +import cvat.apps.dataset_manager.formats.imagenet \ No newline at end of file diff --git a/cvat/apps/dataset_manager/tests/test_formats.py b/cvat/apps/dataset_manager/tests/test_formats.py index 1eb3e2b5..07640a24 100644 --- a/cvat/apps/dataset_manager/tests/test_formats.py +++ b/cvat/apps/dataset_manager/tests/test_formats.py @@ -271,6 +271,7 @@ class TaskExportTest(_DbTestBase): 'Segmentation mask 1.1', 'TFRecord 1.0', 'YOLO 1.1', + 'ImageNet 1.0', }) def test_import_formats_query(self): @@ -287,6 +288,7 @@ class TaskExportTest(_DbTestBase): 'Segmentation mask 1.1', 'TFRecord 1.0', 'YOLO 1.1', + 'ImageNet 1.0', }) def test_exports(self): @@ -322,6 +324,7 @@ class TaskExportTest(_DbTestBase): ('Segmentation mask 1.1', 'voc'), ('TFRecord 1.0', 'tf_detection_api'), ('YOLO 1.1', 'yolo'), + ('ImageNet 1.0', 'imagenet_txt'), ]: with self.subTest(format=format_name): if not dm.formats.registry.EXPORT_FORMATS[format_name].ENABLED: diff --git a/cvat/apps/engine/tests/test_rest_api.py b/cvat/apps/engine/tests/test_rest_api.py index 583f210b..446783e7 100644 --- a/cvat/apps/engine/tests/test_rest_api.py +++ b/cvat/apps/engine/tests/test_rest_api.py @@ -3406,6 +3406,9 @@ class TaskAnnotationAPITestCase(JobAnnotationAPITestCase): + polygon_shapes_with_attrs annotations["tags"] = tags_with_attrs + tags_wo_attrs + elif annotation_format == "ImageNet 1.0": + annotations["tags"] = tags_wo_attrs + else: raise Exception("Unknown format {}".format(annotation_format)) From 0ec7803dbe492f778df93e8f395ddd702aa25808 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 7 Nov 2020 02:45:31 +0000 Subject: [PATCH 24/24] fix: upgrade @types/react from 16.9.52 to 16.9.53 Snyk has created this PR to upgrade @types/react from 16.9.52 to 16.9.53. See this package in npm: https://www.npmjs.com/package/@types/react See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr --- cvat-ui/package-lock.json | 6 +++--- cvat-ui/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index d76e4fe4..2c4f592b 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1208,9 +1208,9 @@ "dev": true }, "@types/react": { - "version": "16.9.52", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.52.tgz", - "integrity": "sha512-EHRjmnxiNivwhGdMh9sz1Yw9AUxTSZFxKqdBWAAzyZx3sufWwx6ogqHYh/WB1m/I4ZpjkoZLExF5QTy2ekVi/Q==", + "version": "16.9.53", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.53.tgz", + "integrity": "sha512-4nW60Sd4L7+WMXH1D6jCdVftuW7j4Za6zdp6tJ33Rqv0nk1ZAmQKML9ZLD4H0dehA3FZxXR/GM8gXplf82oNGw==", "requires": { "@types/prop-types": "*", "csstype": "^3.0.2" diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 4bbdd7a7..4a5aa1b7 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@types/platform": "^1.3.3", - "@types/react": "^16.9.52", + "@types/react": "^16.9.53", "@types/react-color": "^3.0.4", "@types/react-dom": "^16.9.0", "@types/react-redux": "^7.1.2",