From 0c0c6093a1f56afbc10530a2a698fc63fc6ec79e Mon Sep 17 00:00:00 2001 From: Nikita Manovich Date: Tue, 9 Feb 2021 08:56:37 +0300 Subject: [PATCH 01/13] fix: upgrade @types/lodash from 4.14.167 to 4.14.168 (#2781) Snyk has created this PR to upgrade @types/lodash from 4.14.167 to 4.14.168. See this package in npm: https://www.npmjs.com/package/@types/lodash See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr Co-authored-by: snyk-bot --- cvat-ui/package-lock.json | 9 +++++---- cvat-ui/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index eafa81e50341..eee95796ac76 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1217,9 +1217,9 @@ "dev": true }, "@types/lodash": { - "version": "4.14.167", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.167.tgz", - "integrity": "sha512-w7tQPjARrvdeBkX/Rwg95S592JwxqOjmms3zWQ0XZgSyxSLdzWaYH3vErBhdVS/lRBX7F8aBYcYJYTr5TMGOzw==" + "version": "4.14.168", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==" }, "@types/minimatch": { "version": "3.0.3", @@ -25415,7 +25415,8 @@ "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true }, "language-subtag-registry": { "version": "0.3.20", diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 4cb29daf787c..260f87dd2b77 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@ant-design/icons": "^4.3.0", - "@types/lodash": "^4.14.167", + "@types/lodash": "^4.14.168", "@types/platform": "^1.3.3", "@types/react": "^16.14.2", "@types/react-color": "^3.0.4", From 2da29e4f0b84985132cfcaa529a1c91fffe40b5d Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 9 Feb 2021 14:10:16 +0300 Subject: [PATCH 02/13] Do not call HOC component each render (#2780) * Fixed issue #2753 * Updated version & changelog * Wire opencv popover via HOC --- CHANGELOG.md | 1 + cvat-ui/package-lock.json | 2 +- cvat-ui/package.json | 2 +- .../controls-side-bar/draw-cuboid-control.tsx | 5 +-- .../controls-side-bar/draw-points-control.tsx | 5 +-- .../draw-polygon-control.tsx | 5 +-- .../draw-polyline-control.tsx | 5 +-- .../draw-rectangle-control.tsx | 5 +-- .../controls-side-bar/opencv-control.tsx | 8 ++-- .../controls-side-bar/rotate-control.tsx | 4 +- .../controls-side-bar/setup-tag-control.tsx | 5 +-- .../controls-side-bar/tools-control.tsx | 43 +++++++++---------- 12 files changed, 42 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b08362d5e6..b66384c05bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A couple of css-related issues (top bar disappear, wrong arrow position on collapse elements) () - Issue with point region doesn't work in Firefox () - Fixed cuboid perpective change () +- Annotation page popups (ai tools, drawing) reset state after detecting, tracking, drawing () ### Security diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index eee95796ac76..4a7b3604024b 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.14.0", + "version": "1.14.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 260f87dd2b77..87818b21f307 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.14.0", + "version": "1.14.1", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-cuboid-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-cuboid-control.tsx index 958b208bba78..0a86df2ebe90 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-cuboid-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-cuboid-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -19,10 +19,9 @@ interface Props { isDrawing: boolean; } +const CustomPopover = withVisibilityHandling(Popover, 'draw-cuboid'); function DrawPolygonControl(props: Props): JSX.Element { const { canvasInstance, isDrawing } = props; - const CustomPopover = withVisibilityHandling(Popover, 'draw-cuboid'); - const dynamcPopoverPros = isDrawing ? { overlayStyle: { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-points-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-points-control.tsx index 8127059d4a06..462e78c9d695 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-points-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-points-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -18,10 +18,9 @@ interface Props { isDrawing: boolean; } +const CustomPopover = withVisibilityHandling(Popover, 'draw-points'); function DrawPointsControl(props: Props): JSX.Element { const { canvasInstance, isDrawing } = props; - const CustomPopover = withVisibilityHandling(Popover, 'draw-points'); - const dynamcPopoverPros = isDrawing ? { overlayStyle: { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polygon-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polygon-control.tsx index 23f5e7549eb7..f07a324d7cf5 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polygon-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polygon-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -18,10 +18,9 @@ interface Props { isDrawing: boolean; } +const CustomPopover = withVisibilityHandling(Popover, 'draw-polygon'); function DrawPolygonControl(props: Props): JSX.Element { const { canvasInstance, isDrawing } = props; - const CustomPopover = withVisibilityHandling(Popover, 'draw-polygon'); - const dynamcPopoverPros = isDrawing ? { overlayStyle: { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polyline-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polyline-control.tsx index 2139ad4dcb9b..a1d3c157b3de 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polyline-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-polyline-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -18,10 +18,9 @@ interface Props { isDrawing: boolean; } +const CustomPopover = withVisibilityHandling(Popover, 'draw-polyline'); function DrawPolylineControl(props: Props): JSX.Element { const { canvasInstance, isDrawing } = props; - const CustomPopover = withVisibilityHandling(Popover, 'draw-polyline'); - const dynamcPopoverPros = isDrawing ? { overlayStyle: { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-rectangle-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-rectangle-control.tsx index 50efd5183f01..0d0462818f5b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-rectangle-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-rectangle-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -18,10 +18,9 @@ interface Props { isDrawing: boolean; } +const CustomPopover = withVisibilityHandling(Popover, 'draw-rectangle'); function DrawRectangleControl(props: Props): JSX.Element { const { canvasInstance, isDrawing } = props; - const CustomPopover = withVisibilityHandling(Popover, 'draw-rectangle'); - const dynamcPopoverPros = isDrawing ? { overlayStyle: { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx index af59821a378c..90b0e45befd5 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx @@ -29,6 +29,7 @@ import { createAnnotationsAsync, } from 'actions/annotation-actions'; import LabelSelector from 'components/label-selector/label-selector'; +import withVisibilityHandling from './handle-popover-visibility'; interface Props { labels: any[]; @@ -55,6 +56,7 @@ interface State { } const core = getCore(); +const CustomPopover = withVisibilityHandling(Popover, 'opencv-control'); function mapStateToProps(state: CombinedState): Props { const { @@ -73,7 +75,7 @@ function mapStateToProps(state: CombinedState): Props { return { isActivated: activeControl === ActiveControl.OPENCV_TOOLS, - canvasInstance, + canvasInstance: canvasInstance as Canvas, jobInstance, curZOrder, labels, @@ -402,14 +404,14 @@ class OpenCVControlComponent extends React.PureComponent - + ); } } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx index 380e6b55f8a6..3aa537eba7a0 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -18,9 +18,9 @@ interface Props { rotateFrame(rotation: Rotation): void; } +const CustomPopover = withVisibilityHandling(Popover, 'rotate-canvas'); function RotateControl(props: Props): JSX.Element { const { anticlockwiseShortcut, clockwiseShortcut, rotateFrame } = props; - const CustomPopover = withVisibilityHandling(Popover, 'rotate-canvas'); return ( { private onTracking = async (e: Event): Promise => { const { - isActivated, - jobInstance, - frame, - curZOrder, - fetchAnnotations, + isActivated, jobInstance, frame, curZOrder, fetchAnnotations, } = this.props; if (!isActivated) { @@ -520,8 +517,8 @@ export class ToolsControlComponent extends React.PureComponent { min={1} precision={0} max={jobInstance.stopFrame - frame} - onChange={(value: number | undefined | string): void => { - if (typeof value !== 'undefined') { + onChange={(value: number | undefined | string | null): void => { + if (typeof value !== 'undefined' && value !== null) { this.setState({ trackingFrames: +value, }); @@ -659,19 +656,20 @@ export class ToolsControlComponent extends React.PureComponent { try { this.setState({ mode: 'detection', fetching: true }); const result = await core.lambda.call(task, model, { ...body, frame }); - const states = result.map((data: any): any => ( - new core.classes.ObjectState({ - shapeType: data.type, - label: task.labels.filter((label: any): boolean => label.name === data.label)[0], - points: data.points, - objectType: ObjectType.SHAPE, - frame, - occluded: false, - source: 'auto', - attributes: {}, - zOrder: curZOrder, - }) - )); + const states = result.map( + (data: any): any => + new core.classes.ObjectState({ + shapeType: data.type, + label: task.labels.filter((label: any): boolean => label.name === data.label)[0], + points: data.points, + objectType: ObjectType.SHAPE, + frame, + occluded: false, + source: 'auto', + attributes: {}, + zOrder: curZOrder, + }), + ); await jobInstance.annotations.put(states); fetchAnnotations(); @@ -722,7 +720,6 @@ export class ToolsControlComponent extends React.PureComponent { const { fetching, trackingProgress } = this.state; if (![...interactors, ...detectors, ...trackers].length) return null; - const CustomPopover = withVisibilityHandling(Popover, 'tools-control'); const dynamcPopoverPros = isActivated ? { From 454f1915c133908be9b571a61b9b361fedbc038c Mon Sep 17 00:00:00 2001 From: Nikita Manovich Date: Tue, 9 Feb 2021 20:02:26 +0300 Subject: [PATCH 03/13] fix: upgrade antd from 4.10.2 to 4.10.3 (#2782) Snyk has created this PR to upgrade antd from 4.10.2 to 4.10.3. See this package in npm: https://www.npmjs.com/package/antd See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr Co-authored-by: snyk-bot --- cvat-ui/package-lock.json | 365 ++++++++++++++++---------------------- cvat-ui/package.json | 2 +- 2 files changed, 153 insertions(+), 214 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 4a7b3604024b..2fde48721f20 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -58,9 +58,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -1875,9 +1875,9 @@ } }, "antd": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/antd/-/antd-4.10.2.tgz", - "integrity": "sha512-aWEP5DnYV3ytWhVQuoTc9qlkbPkVaSX8IY7u1yycQayD2gEvdnhJEs4JPdH1VNAMI4FO3M+iTPsIS6uZPch0sA==", + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/antd/-/antd-4.10.3.tgz", + "integrity": "sha512-J/IZvW15MwTmUxK/AWFkSU51T1Hyn4e0GchJWlIe7+FrPpLoTgLf9/Cx3mgxiooHfE9OfvnYvvRli1VxHH6H0Q==", "requires": { "@ant-design/colors": "^5.0.0", "@ant-design/icons": "^4.3.0", @@ -1888,7 +1888,6 @@ "copy-to-clipboard": "^3.2.0", "lodash": "^4.17.20", "moment": "^2.25.3", - "omit.js": "^2.0.2", "rc-cascader": "~1.4.0", "rc-checkbox": "~2.3.0", "rc-collapse": "~3.1.0", @@ -1918,34 +1917,23 @@ "rc-tree": "~4.1.0", "rc-tree-select": "~4.3.0", "rc-upload": "~3.3.4", - "rc-util": "^5.6.6", + "rc-util": "^5.7.0", "scroll-into-view-if-needed": "^2.2.25", "warning": "^4.0.3" }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, - "rc-resize-observer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", - "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.0", - "resize-observer-polyfill": "^1.5.1" - } - }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -21326,14 +21314,14 @@ } }, "date-fns": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.16.1.tgz", - "integrity": "sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==" + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.17.0.tgz", + "integrity": "sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==" }, "dayjs": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.3.tgz", - "integrity": "sha512-/2fdLN987N8Ki7Id8BUN2nhuiRyxTLumQnSQf9CNncFCyqFsSKb9TNhzRYcC8K8eJSJOKvbvkImo/MKKhNi4iw==" + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", + "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==" }, "debug": { "version": "4.1.1", @@ -26721,11 +26709,6 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "dev": true }, - "omit.js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/omit.js/-/omit.js-2.0.2.tgz", - "integrity": "sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg==" - }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -27897,9 +27880,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -27924,9 +27907,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -27948,9 +27931,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -27975,9 +27958,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28001,17 +27984,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -28041,17 +28024,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -28081,9 +28064,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28106,9 +28089,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28132,9 +28115,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28147,9 +28130,9 @@ } }, "rc-input-number": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-6.1.2.tgz", - "integrity": "sha512-UvP0tpOUeGetx6caS8RzBs3Du+NwPUn9ijQ3LeR1jOmzjXNuXvv58U6hvIXSHx/4ulPleQ5BAQP/aLTsFB4yGw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-6.1.3.tgz", + "integrity": "sha512-qCLWK9NuuKGTsPXjRU/XvSOX7EKdnHlOpg59nPjYSDdH/czsAHZyYq50O6b6RF2TMPOjVpmsZQoMjNJYcnn6JA==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -28157,9 +28140,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28185,9 +28168,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28200,9 +28183,9 @@ } }, "rc-menu": { - "version": "8.10.4", - "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-8.10.4.tgz", - "integrity": "sha512-eZOyl6RZFNwREP2MMyIOicrEOA9oeAFz13YG5LBmclz1nJQnpkWRN1NjSSQf2JQGybiuI3zQn+PMfFG99i0YxQ==", + "version": "8.10.5", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-8.10.5.tgz", + "integrity": "sha512-8Ets93wQFy9IysmgRUm1VGdrEz6XfZTM0jQOqOPLYNXah5HgAmCh4xT0UOygfHB3IWiQeqDgr2uPB4uVhwI2+Q==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -28215,17 +28198,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -28255,9 +28238,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28281,9 +28264,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28307,28 +28290,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, - "rc-resize-observer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", - "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.0", - "resize-observer-polyfill": "^1.5.1" - } - }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -28357,9 +28329,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28372,9 +28344,9 @@ } }, "rc-picker": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.5.2.tgz", - "integrity": "sha512-rQLgvjyFrxjiWlR+Q7CyXdTOP/gHbiXlBca7irOtuEb6HMRLdm+/OfIB7xaaPHgdkv1ZOsxCk8zCEX6j0qf24g==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.5.4.tgz", + "integrity": "sha512-H2G5armWMWUWbCt1jEdJQkkUvrh3IzC2Sd9Wb/T6AtMI3mjyd/TQEe68pWozS+NGA/ElDO9PiFiZjiHDep6NAQ==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", @@ -28387,9 +28359,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28411,9 +28383,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28436,9 +28408,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28451,9 +28423,9 @@ } }, "rc-resize-observer": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-0.2.6.tgz", - "integrity": "sha512-YX6nYnd6fk7zbuvT6oSDMKiZjyngjHoy+fz+vL3Tez38d/G5iGdaDJa2yE7345G6sc4Mm1IGRUIwclvltddhmA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", + "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", @@ -28462,9 +28434,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28477,9 +28449,9 @@ } }, "rc-select": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-12.1.0.tgz", - "integrity": "sha512-e4WTEwnl1Hg2t8sjFPPCk4SekCf6Thqk6Q+zGKB7gT8lHFHJ4cEnrqs8ntYZkkot1YtjmS67LbE80zq+JHHdTA==", + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-12.1.3.tgz", + "integrity": "sha512-pMJ27VQRh5QbyGLSE+by4tORYucNFbZxON+Ywj81qjXAGMjvhMcOOvlv1RZRNdnZxaMwH//3iDPOf80b0AJxZg==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -28491,9 +28463,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28518,9 +28490,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28543,9 +28515,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28568,9 +28540,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28583,9 +28555,9 @@ } }, "rc-table": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.12.3.tgz", - "integrity": "sha512-R87lx28os4Ftm/9x+MamwzLw+Dtp9yxihceAgLA/9JS9QP/sqej1qlO+3T/Uw4paZqCg9SpW0XzLI1MandviWA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.12.5.tgz", + "integrity": "sha512-XV4m5h0W+NjGkNzvp5ahOhYHyNG8oPNV9pTLre2EsfmyStXUJBICyfkNID7WZulMdCehv/Wa3MdqXwZ4EsJchw==", "requires": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -28595,24 +28567,13 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, - "rc-resize-observer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", - "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.0", - "resize-observer-polyfill": "^1.5.1" - } - }, "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", @@ -28634,24 +28595,13 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, - "rc-resize-observer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", - "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.0", - "resize-observer-polyfill": "^1.5.1" - } - }, "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", @@ -28671,28 +28621,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } }, - "rc-resize-observer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.0.0.tgz", - "integrity": "sha512-RgKGukg1mlzyGdvzF7o/LGFC8AeoMH9aGzXTUdp6m+OApvmRdUuOscq/Y2O45cJA+rXt1ApWlpFoOIioXL3AGg==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1", - "rc-util": "^5.0.0", - "resize-observer-polyfill": "^1.5.1" - } - }, "rc-util": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.7.0.tgz", - "integrity": "sha512-0hh5XkJ+vBDeMJsHElqT1ijMx+gC3gpClwQ10h/5hccrrgrMx8VUem183KLlH1YrWCfMMPmDXWWNnwsn+p6URw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.8.0.tgz", + "integrity": "sha512-x8UGbURS1/9mMyqNMsRdCq+nBLefjcubfS++d/P/oAKZ2b0X2Zo6TPPPS4nKyZIK8Xvo4DFx5zfwJ9hUm9CRYQ==", "requires": { "@babel/runtime": "^7.12.5", "react-is": "^16.12.0", @@ -28721,9 +28660,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28748,9 +28687,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28775,9 +28714,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28802,9 +28741,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28827,9 +28766,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -28858,12 +28797,12 @@ } }, "rc-virtual-list": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.2.3.tgz", - "integrity": "sha512-uEeYDQWwQhxR97SekPeGRbzPtHSbSpw/mYb6QpZZ9bA43kf7s1socV3fD3ySYhQVzo0I+/IUD9jFGit6FbM0WA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.2.6.tgz", + "integrity": "sha512-8FiQLDzm3c/tMX0d62SQtKDhLH7zFlSI6pWBAPt+TUntEqd3Lz9zFAmpvTu8gkvUom/HCsDSZs4wfV4wDPWC0Q==", "requires": { "classnames": "^2.2.6", - "rc-resize-observer": "^0.2.3", + "rc-resize-observer": "^1.0.0", "rc-util": "^5.0.7" } }, diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 87818b21f307..c83aa7d19976 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -58,7 +58,7 @@ "@types/react-router-dom": "^5.1.7", "@types/react-share": "^3.0.3", "@types/redux-logger": "^3.0.8", - "antd": "^4.10.2", + "antd": "^4.10.3", "copy-to-clipboard": "^3.3.1", "cvat-canvas3d": "file:../cvat-canvas3d", "cvat-canvas": "file:../cvat-canvas", From 6cd61a46a6eeba984acbc96911c4dcbee27d9db0 Mon Sep 17 00:00:00 2001 From: Nikita Manovich Date: Wed, 10 Feb 2021 09:27:23 +0300 Subject: [PATCH 04/13] fix: upgrade @ant-design/icons from 4.3.0 to 4.4.0 (#2786) Snyk has created this PR to upgrade @ant-design/icons from 4.3.0 to 4.4.0. See this package in npm: https://www.npmjs.com/package/@ant-design/icons See this project in Snyk: https://app.snyk.io/org/cvat/project/c1f463ee-3776-44c4-b0fa-cd2254d0a094?utm_source=github&utm_medium=upgrade-pr Co-authored-by: snyk-bot --- cvat-ui/package-lock.json | 12 ++++++------ cvat-ui/package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 2fde48721f20..b0d2a4fee1a8 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -13,9 +13,9 @@ } }, "@ant-design/icons": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.3.0.tgz", - "integrity": "sha512-UoIbw4oz/L/msbkgqs2nls2KP7XNKScOxVR54wRrWwnXOzJaGNwwSdYjHQz+5ETf8C53YPpzMOnRX99LFCdeIQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.4.0.tgz", + "integrity": "sha512-+X44IouK56JbP3r7zM+Zoykv5wQlXBlxY0NTaFXGpiyYSS/Bh6HIo9aTF62QkSuDTqA3UpeNVTRFioKKRmkWDQ==", "requires": { "@ant-design/colors": "^5.0.0", "@ant-design/icons-svg": "^4.0.0", @@ -26,9 +26,9 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.13.tgz", + "integrity": "sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==", "requires": { "regenerator-runtime": "^0.13.4" } diff --git a/cvat-ui/package.json b/cvat-ui/package.json index c83aa7d19976..02372b86c213 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -47,7 +47,7 @@ "worker-loader": "^2.0.0" }, "dependencies": { - "@ant-design/icons": "^4.3.0", + "@ant-design/icons": "^4.4.0", "@types/lodash": "^4.14.168", "@types/platform": "^1.3.3", "@types/react": "^16.14.2", From 44a504e16e7aa4bae41deebd969881e85a96a36e Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Wed, 10 Feb 2021 10:34:26 +0300 Subject: [PATCH 05/13] Add image ext in filename matching (#2778) * Add image ext in matching * remove dead code --- cvat/apps/dataset_manager/bindings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat/apps/dataset_manager/bindings.py b/cvat/apps/dataset_manager/bindings.py index 75da45c762a1..38444d4d18bc 100644 --- a/cvat/apps/dataset_manager/bindings.py +++ b/cvat/apps/dataset_manager/bindings.py @@ -601,7 +601,7 @@ def match_dm_item(item, task_data, root_hint=None): frame_number = None if frame_number is None and item.has_image: - frame_number = task_data.match_frame(item.image.path, root_hint) + frame_number = task_data.match_frame(item.id + item.image.ext, root_hint) if frame_number is None: frame_number = task_data.match_frame(item.id, root_hint) if frame_number is None: From 2eeeacde79f4a9604e8a15bcb4fc52b2548cbc1d Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Wed, 10 Feb 2021 12:39:19 +0300 Subject: [PATCH 06/13] Cypress test. Call HOC component each render. (#2788) --- ...sue_2753_call_HOC_component_each_render.js | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tests/cypress/integration/actions_tasks_objects/issue_2753_call_HOC_component_each_render.js diff --git a/tests/cypress/integration/actions_tasks_objects/issue_2753_call_HOC_component_each_render.js b/tests/cypress/integration/actions_tasks_objects/issue_2753_call_HOC_component_each_render.js new file mode 100644 index 000000000000..6216a2594cf1 --- /dev/null +++ b/tests/cypress/integration/actions_tasks_objects/issue_2753_call_HOC_component_each_render.js @@ -0,0 +1,77 @@ +// Copyright (C) 2021 Intel Corporation +// +// SPDX-License-Identifier: MIT + +/// + +import { taskName, labelName } from '../../support/const'; + +context('Call HOC component each render.', () => { + const issueId = '2753'; + const numberOfPointsPolygon = 4; + const numberOfPointsPolyline = 5; + const numberOfPointsPoint = 6; + + const createPolygonShapePoints = { + reDraw: false, + type: 'Shape', + labelName: labelName, + pointsMap: [ + { x: 200, y: 200 }, + { x: 250, y: 200 }, + { x: 250, y: 250 }, + { x: 200, y: 300 }, + ], + numberOfPoints: numberOfPointsPolygon, + }; + const createPolylinesTrackPoints = { + type: 'Track', + labelName: labelName, + pointsMap: [ + { x: 300, y: 200 }, + { x: 350, y: 200 }, + { x: 350, y: 250 }, + { x: 300, y: 350 }, + { x: 270, y: 330 }, + ], + numberOfPoints: numberOfPointsPolyline, + }; + const createPointsShapePoints = { + type: 'Shape', + labelName: labelName, + pointsMap: [ + { x: 400, y: 200 }, + { x: 450, y: 200 }, + { x: 450, y: 250 }, + { x: 450, y: 230 }, + { x: 430, y: 230 }, + { x: 400, y: 230 }, + ], + numberOfPoints: numberOfPointsPoint, + }; + + function checkNumberOfPointsValue(objectType, numberOfPoints) { + cy.get(`.cvat-draw-${objectType}-control`).trigger('mouseover'); + cy.get(`.cvat-draw-${objectType}-popover-visible`).within(() => { + cy.get('.cvat-draw-shape-popover-points-selector') + .find('input') + .should('have.attr', 'value', numberOfPoints); + }); + cy.get(`.cvat-draw-${objectType}-control`).trigger('mouseout'); + } + + before(() => { + cy.openTaskJob(taskName); + }); + + describe(`Testing issue "${issueId}"`, () => { + it('Draw polygon, polyline, points. After drawing "Number of points" popover value should the same.', () => { + cy.createPolygon(createPolygonShapePoints); + cy.createPolyline(createPolylinesTrackPoints); + cy.createPoint(createPointsShapePoints); + checkNumberOfPointsValue('polygon', numberOfPointsPolygon); + checkNumberOfPointsValue('polyline', numberOfPointsPolyline); + checkNumberOfPointsValue('points', numberOfPointsPoint); + }); + }); +}); From 51c3dd8fe3191b2e26222f07c8c8bc4e274432ef Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Wed, 10 Feb 2021 12:41:59 +0300 Subject: [PATCH 07/13] Cypress. Remove annotation before spec if an object exist. (#2787) * Update cypress commands to remove anotation * Update tests --- .../case_31_label_constructor_color_label.js | 9 ++----- .../case_47_export_dataset.js | 5 ---- .../issue_1568_cuboid_dump_annotation.js | 7 +----- ...rror_cannot_read_property_at_saving_job.js | 7 +----- .../case_28_review_pipeline_feature.js | 24 +++++++++---------- tests/cypress/support/commands.js | 15 +++++++++--- 6 files changed, 28 insertions(+), 39 deletions(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_31_label_constructor_color_label.js b/tests/cypress/integration/actions_tasks_objects/case_31_label_constructor_color_label.js index 94e4c1d9de87..b24169c74718 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_31_label_constructor_color_label.js +++ b/tests/cypress/integration/actions_tasks_objects/case_31_label_constructor_color_label.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -56,11 +56,6 @@ context('Label constructor. Color label.', () => { cy.openTask(taskName); }); - after('Remove annotation and save job.', () => { - cy.removeAnnotations(); - cy.saveJob('PUT'); - }); - describe(`Testing case "${caseId}"`, () => { it('To add multiple labels with a color change.', () => { cy.addNewLabel(colorRed, labelAdditionalAttrs, labelColor.redHex); @@ -117,7 +112,7 @@ context('Label constructor. Color label.', () => { }); it('Open the job. Existing objects with this label have changed their color.', () => { - cy.openJob(); + cy.openJob(0, false); cy.getObjectIdNumberByLabelName(colorRed).then((objectId) => { cy.get(`#cvat_canvas_shape_${objectId}`).should('have.attr', 'stroke', `#${labelColor.yellowHex}`); cy.get(`#cvat-objects-sidebar-state-item-${objectId}`) diff --git a/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js b/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js index c2fff01e2a2d..e3ffcfbc8259 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js +++ b/tests/cypress/integration/actions_tasks_objects/case_47_export_dataset.js @@ -24,11 +24,6 @@ context('Export as a dataset.', () => { cy.saveJob(); }); - after('Remove annotations and save job', () => { - cy.removeAnnotations(); - cy.saveJob('PUT'); - }); - describe(`Testing case "${caseId}"`, () => { it('Go to Menu. Press "Export as a dataset" -> "CVAT for images".', () => { cy.server().route('GET', '/api/v1/tasks/**/dataset**').as('exportDataset'); diff --git a/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js b/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js index bae7864c7785..bfc573b6b881 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_1568_cuboid_dump_annotation.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -22,11 +22,6 @@ context('Dump annotation if cuboid created', () => { cy.openTaskJob(taskName); }); - after('Go to task list', () => { - cy.removeAnnotations(); - cy.saveJob('PUT'); - }); - describe(`Testing issue "${issueId}"`, () => { it('Create a cuboid', () => { cy.createCuboid(createCuboidShape2Points); diff --git a/tests/cypress/integration/actions_tasks_objects/pr_2203_error_cannot_read_property_at_saving_job.js b/tests/cypress/integration/actions_tasks_objects/pr_2203_error_cannot_read_property_at_saving_job.js index ab774f7ecdad..480bd3113901 100644 --- a/tests/cypress/integration/actions_tasks_objects/pr_2203_error_cannot_read_property_at_saving_job.js +++ b/tests/cypress/integration/actions_tasks_objects/pr_2203_error_cannot_read_property_at_saving_job.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -22,11 +22,6 @@ context('Check error сannot read property at saving job', () => { cy.openTaskJob(taskName); }); - after('Remove annotations and save job', () => { - cy.removeAnnotations(); - cy.saveJob('PUT'); - }); - describe(`Testing pr "${prId}"`, () => { it('Create an object in first frame', () => { cy.createRectangle(createRectangleShape2Points); diff --git a/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js b/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js index e50a17080575..3b41f569a580 100644 --- a/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js +++ b/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -189,7 +189,7 @@ context('Review pipeline feature', () => { it('Second user login. Open the task, open the job and annotates it.', () => { cy.login(secondUserName, secondUser.password); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.createRectangle(createRectangleShape2PointsSecond); for (let i = 1; i < 4; i++) { cy.createRectangle(createRectangleShape2Points); @@ -223,7 +223,7 @@ context('Review pipeline feature', () => { }); it('Second user opens the job again, switches to standard mode and tried to change anything and save changes. The request will be rejected with 403 code.', () => { - cy.openJob(); + cy.openJob(0, false); cy.get('.cvat-workspace-selector').should('have.text', 'Review'); cy.changeWorkspace('Standard', labelName); cy.createPoint(createPointsShape); @@ -239,7 +239,7 @@ context('Review pipeline feature', () => { it('The third user opens the job. Review mode is opened automatically.', () => { cy.login(thirdUserName, thirdUser.password); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.get('.cvat-workspace-selector').should('have.text', 'Review'); }); @@ -310,7 +310,7 @@ context('Review pipeline feature', () => { }); it("Reopen the job. Change something there. Save work. That saving wasn't successful. The third user logout.", () => { - cy.openJob(); + cy.openJob(0, false); cy.createPoint(createPointsShapeSecond); cy.saveJob('PATCH', 403); cy.get('.cvat-notification-notice-save-annotations-failed') @@ -324,7 +324,7 @@ context('Review pipeline feature', () => { it('The second user login. Opens the job again. All issues are visible.', () => { cy.login(secondUserName, secondUser.password); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.get('.cvat-workspace-selector').should('have.text', 'Standard'); for (const j of [ customeIssueDescription, @@ -426,7 +426,7 @@ context('Review pipeline feature', () => { it('The third user login, opens the job, goes to menu, "Submit review" => "Review next" => Assign the first user => Submit.', () => { cy.login(thirdUserName, thirdUser.password); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.interactMenu('Submit the review'); cy.submitReview('Review next', Cypress.env('user')); cy.get('.cvat-not-found').should('exist'); @@ -434,7 +434,7 @@ context('Review pipeline feature', () => { it('The third user logout. The first user login and opens the job, goes to menu, "Submit review" => Accept => Submit', () => { cy.logout(thirdUserName); cy.login(); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.interactMenu('Submit the review'); cy.submitReview('Accept'); cy.url().should('include', '/tasks'); @@ -443,13 +443,13 @@ context('Review pipeline feature', () => { }); it("The first user can change annotations. The second users can't change annotations. For the third user the task is not visible.", () => { - cy.openJob(); + cy.openJob(0, false); cy.createPoint(createPointsShapeThird); cy.saveJob(); cy.get('.cvat-notification-notice-save-annotations-failed').should('not.exist'); cy.logout(); cy.login(secondUserName, secondUser.password); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.createPoint(createPointsShapeFourth); cy.saveJob(); cy.get('.cvat-notification-notice-save-annotations-failed').should('exist'); @@ -463,7 +463,7 @@ context('Review pipeline feature', () => { it('The first user opens the job and presses "Renew the job".', () => { cy.login(); - cy.openTaskJob(taskName); + cy.openTaskJob(taskName, 0, false); cy.interactMenu('Renew the job'); cy.get('.cvat-modal-content-renew-job').within(() => { cy.contains('button', 'Continue').click(); @@ -474,7 +474,7 @@ context('Review pipeline feature', () => { }); it('The first user opens the job and presses "Finish the job".', () => { - cy.openJob(); + cy.openJob(0, false); cy.interactMenu('Finish the job'); cy.get('.cvat-modal-content-finish-job').within(() => { cy.contains('button', 'Continue').click(); diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 202a8b2b98c8..b1af711e535f 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -124,17 +124,26 @@ Cypress.Commands.add('getJobNum', (jobID) => { }); }); -Cypress.Commands.add('openJob', (jobID = 0) => { +Cypress.Commands.add('openJob', (jobID = 0, removeAnnotations = true) => { cy.getJobNum(jobID).then(($job) => { cy.get('.cvat-task-jobs-table-row').contains('a', `Job #${$job}`).click(); }); cy.url().should('include', '/jobs'); cy.get('.cvat-canvas-container').should('exist'); + if (removeAnnotations) { + cy.document().then((doc) => { + const objects = Array.from(doc.querySelectorAll('.cvat_canvas_shape')); + if (typeof objects !== 'undefined' && objects.length > 0) { + cy.removeAnnotations(); + cy.saveJob('PUT'); + } + }); + } }); -Cypress.Commands.add('openTaskJob', (taskName, jobID = 0) => { +Cypress.Commands.add('openTaskJob', (taskName, jobID = 0, removeAnnotations = true) => { cy.openTask(taskName); - cy.openJob(jobID); + cy.openJob(jobID, removeAnnotations); }); Cypress.Commands.add('createRectangle', (createRectangleParams) => { From 97cb8928440b7d32dc929dbbc570fd3a990de8f1 Mon Sep 17 00:00:00 2001 From: Nikita Manovich Date: Wed, 10 Feb 2021 17:36:03 +0300 Subject: [PATCH 08/13] IOG serverless function + some fixes (#2578) * Initial version of Inside Outside Guidance serverless function * Support neg_points in interactors * Improved deployment process of serverless functions * Improve installation.md for serverless functions. * Update CHANGELOG, use NUCLIO_DASHBOARD_DEFAULT_FUNCTION_MOUNT_MODE as recommended by nuclio developers. * Disable warning from markdown linter about max line length for a table. * Fix IOG function with conda environment * Fix tensorflow matterport/mask_rcnn Co-authored-by: Boris Sekachev --- .vscode/launch.json | 17 ++- CHANGELOG.md | 4 + README.md | 37 ++++-- .../serverless/docker-compose.serverless.yml | 3 +- cvat-core/src/server-proxy.js | 2 +- cvat-core/src/session.js | 2 +- cvat-data/src/js/unzip_imgs.worker.js | 6 +- cvat-ui/package-lock.json | 2 +- cvat-ui/package.json | 2 +- cvat-ui/src/actions/annotation-actions.ts | 5 +- .../annotation-page/annotation-page.tsx | 2 +- .../controls-side-bar/opencv-control.tsx | 2 +- .../controls-side-bar/tools-control.tsx | 3 +- .../annotation-page/top-bar/right-group.tsx | 2 +- .../annotation-page/top-bar/top-bar.tsx | 2 +- .../src/components/labels-editor/common.ts | 16 +-- .../containers/actions-menu/actions-menu.tsx | 4 +- .../annotation-page/top-bar/top-bar.tsx | 2 +- cvat-ui/src/cvat-canvas-wrapper.ts | 18 +-- cvat-ui/src/reducers/annotation-reducer.ts | 5 +- cvat/apps/documentation/installation.md | 3 +- .../installation_automatic_annotation.md | 22 +++- cvat/apps/lambda_manager/views.py | 30 +++-- .../openvino}/model_loader.py | 0 .../common => common/openvino}/python3 | 2 +- serverless/deploy_cpu.sh | 58 ++------- .../openvino/dextr/nuclio/function.yaml | 3 +- serverless/openvino/dextr/nuclio/main.py | 2 +- .../nuclio/function.yaml | 3 +- .../nuclio/function.yaml | 3 +- .../text-detection-0004/nuclio/function.yaml | 3 +- .../nuclio/function.yaml | 3 +- .../nuclio/function.yaml | 3 +- .../public/yolo-v3-tf/nuclio/function.yaml | 3 +- .../foolwood/siammask/nuclio/function.yaml | 1 + .../saic-vul/fbrs/nuclio/function.yaml | 1 + .../pytorch/saic-vul/fbrs/nuclio/main.py | 4 +- .../shiyinzhang/iog/nuclio/function.yaml | 71 ++++++++++ .../pytorch/shiyinzhang/iog/nuclio/main.py | 40 ++++++ .../shiyinzhang/iog/nuclio/model_handler.py | 123 ++++++++++++++++++ .../nuclio/function.yaml | 1 + .../matterport/mask_rcnn/nuclio/function.yaml | 8 +- 42 files changed, 387 insertions(+), 136 deletions(-) rename serverless/{openvino/common => common/openvino}/model_loader.py (100%) rename serverless/{openvino/common => common/openvino}/python3 (62%) create mode 100644 serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml create mode 100644 serverless/pytorch/shiyinzhang/iog/nuclio/main.py create mode 100644 serverless/pytorch/shiyinzhang/iog/nuclio/model_handler.py diff --git a/.vscode/launch.json b/.vscode/launch.json index d6e8e878dec2..658abd2fe482 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -42,8 +42,11 @@ "request": "launch", "stopOnEntry": false, "justMyCode": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", + "env": { + "CVAT_SERVERLESS": "1", + }, "args": [ "runserver", "--noreload", @@ -73,7 +76,7 @@ "request": "launch", "stopOnEntry": false, "justMyCode": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "rqworker", @@ -92,7 +95,7 @@ "request": "launch", "stopOnEntry": false, "justMyCode": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "rqscheduler", @@ -108,7 +111,7 @@ "request": "launch", "justMyCode": false, "stopOnEntry": false, - "pythonPath":"${command:python.interpreterPath}", + "python":"${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "rqworker", @@ -127,7 +130,7 @@ "request": "launch", "justMyCode": false, "stopOnEntry": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "update_git_states" @@ -143,7 +146,7 @@ "request": "launch", "justMyCode": false, "stopOnEntry": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "migrate" @@ -159,7 +162,7 @@ "request": "launch", "justMyCode": false, "stopOnEntry": false, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "test", diff --git a/CHANGELOG.md b/CHANGELOG.md index b66384c05bdb..c764acae68f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CVAT-3D: Load all frames corresponding to the job instance () - Intelligent scissors with OpenCV javascript () +- [Inside Outside Guidence](https://github.com/shiyinzhang/Inside-Outside-Guidance) serverless + function for interative segmentation ### Changed - Updated HTTPS install README section (cleanup and described more robust deploy) - Logstash is improved for using with configurable elasticsearch outputs () +- Bumped nuclio version to 1.5.16 +- All methods for interative segmentation accept negative points as well ### Deprecated diff --git a/README.md b/README.md index 07a3da833bbb..7137a54bc2ab 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,26 @@ For more information about supported formats look at the | [ImageNet](http://www.image-net.org) | X | X | | [CamVid](http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/) | X | X | -## Deep learning models for automatic labeling +## Deep learning serverless functions for automatic labeling + + | Name | Type | Framework | CPU | GPU | | ------------------------------------------------------------------------------------------------------- | ---------- | ---------- | --- | --- | -| [Deep Extreme Cut](/serverless/openvino/dextr/nuclio) | interactor | OpenVINO | X | +| [Deep Extreme Cut](/serverless/openvino/dextr/nuclio) | interactor | OpenVINO | X | | +| [Faster RCNN](/serverless/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio) | detector | OpenVINO | X | | +| [Mask RCNN](/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio) | detector | OpenVINO | X | | +| [YOLO v3](/serverless/openvino/omz/public/yolo-v3-tf/nuclio) | detector | OpenVINO | X | | +| [Object reidentification](/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio) | reid | OpenVINO | X | | +| [Semantic segmentation for ADAS](/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio) | detector | OpenVINO | X | | +| [Text detection v4](/serverless/openvino/omz/intel/text-detection-0004/nuclio) | detector | OpenVINO | X | | +| [SiamMask](/serverless/pytorch/foolwood/siammask/nuclio) | tracker | PyTorch | X | | +| [f-BRS](/serverless/pytorch/saic-vul/fbrs/nuclio) | interactor | PyTorch | X | | +| [Inside-Outside Guidance](/serverless/pytorch/shiyinzhang/iog/nuclio) | interactor | PyTorch | X | | | [Faster RCNN](/serverless/tensorflow/faster_rcnn_inception_v2_coco/nuclio) | detector | TensorFlow | X | X | -| [Mask RCNN](/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio) | detector | OpenVINO | X | -| [YOLO v3](/serverless/openvino/omz/public/yolo-v3-tf/nuclio) | detector | OpenVINO | X | -| [Text detection v4](/serverless/openvino/omz/intel/text-detection-0004/nuclio) | detector | OpenVINO | X | -| [Semantic segmentation for ADAS](/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio) | detector | OpenVINO | X | -| [Mask RCNN](/serverless/tensorflow/matterport/mask_rcnn/nuclio) | detector | TensorFlow | X | -| [Object reidentification](/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio) | reid | OpenVINO | X | +| [Mask RCNN](/serverless/tensorflow/matterport/mask_rcnn/nuclio) | detector | TensorFlow | X | | + + ## Online demo: [cvat.org](https://cvat.org) @@ -93,11 +101,12 @@ Limitations: ## REST API -Automatically generated Swagger documentation for Django REST API is -available on `/api/swagger` -(default: `localhost:8080/api/swagger`). +Automatically generated Swagger documentation for Django REST API is available +on `/api/swagger`(default: `localhost:8080/api/swagger`). -Swagger documentation is visiable on allowed hostes, Update environement variable in docker-compose.yml file with cvat hosted machine IP or domain name. Example - `ALLOWED_HOSTS: 'localhost, 127.0.0.1'`) +Swagger documentation is visiable on allowed hostes, Update environement +variable in docker-compose.yml file with cvat hosted machine IP or domain +name. Example - `ALLOWED_HOSTS: 'localhost, 127.0.0.1'`. ## LICENSE @@ -129,4 +138,6 @@ Other ways to ask questions and get our support: ## 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. +- [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. diff --git a/components/serverless/docker-compose.serverless.yml b/components/serverless/docker-compose.serverless.yml index de94f6166b83..8938d5c53207 100644 --- a/components/serverless/docker-compose.serverless.yml +++ b/components/serverless/docker-compose.serverless.yml @@ -2,7 +2,7 @@ version: '3.3' services: serverless: container_name: nuclio - image: quay.io/nuclio/dashboard:1.5.8-amd64 + image: quay.io/nuclio/dashboard:1.5.16-amd64 restart: always networks: default: @@ -16,6 +16,7 @@ services: https_proxy: no_proxy: 172.28.0.1,${no_proxy} NUCLIO_CHECK_FUNCTION_CONTAINERS_HEALTHINESS: 'true' + NUCLIO_DASHBOARD_DEFAULT_FUNCTION_MOUNT_MODE: 'volume' ports: - '8070:8070' diff --git a/cvat-core/src/server-proxy.js b/cvat-core/src/server-proxy.js index f18f62f02b74..1fafc92ae75e 100644 --- a/cvat-core/src/server-proxy.js +++ b/cvat-core/src/server-proxy.js @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-core/src/session.js b/cvat-core/src/session.js index f3c89da2099d..31fc5fe19e77 100644 --- a/cvat-core/src/session.js +++ b/cvat-core/src/session.js @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-data/src/js/unzip_imgs.worker.js b/cvat-data/src/js/unzip_imgs.worker.js index 91b95dfde0c3..3434e3b8aca0 100644 --- a/cvat-data/src/js/unzip_imgs.worker.js +++ b/cvat-data/src/js/unzip_imgs.worker.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -7,7 +7,9 @@ const JSZip = require('jszip'); onmessage = (e) => { const zip = new JSZip(); if (e.data) { - const { start, end, block, dimension, dimension2D } = e.data; + const { + start, end, block, dimension, dimension2D, + } = e.data; zip.loadAsync(block).then((_zip) => { let index = start; diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index b0d2a4fee1a8..ff9de4e803c1 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.14.1", + "version": "1.14.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 02372b86c213..e78795fb9c2f 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.14.1", + "version": "1.14.2", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/actions/annotation-actions.ts b/cvat-ui/src/actions/annotation-actions.ts index 4a949adaf0a8..194edc1c06ae 100644 --- a/cvat-ui/src/actions/annotation-actions.ts +++ b/cvat-ui/src/actions/annotation-actions.ts @@ -1362,10 +1362,7 @@ export function pasteShapeAsync(): ThunkAction { }; } -export function interactWithCanvas( - activeInteractor: Model | OpenCVTool, - activeLabelID: number, -): AnyAction { +export function interactWithCanvas(activeInteractor: Model | OpenCVTool, activeLabelID: number): AnyAction { return { type: AnnotationActionTypes.INTERACT_WITH_CANVAS, payload: { diff --git a/cvat-ui/src/components/annotation-page/annotation-page.tsx b/cvat-ui/src/components/annotation-page/annotation-page.tsx index 35c179339cfb..feb6f7b6d72f 100644 --- a/cvat-ui/src/components/annotation-page/annotation-page.tsx +++ b/cvat-ui/src/components/annotation-page/annotation-page.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx index 90b0e45befd5..d490342712a5 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx @@ -170,7 +170,7 @@ class OpenCVControlComponent extends React.PureComponent { try { result = await core.lambda.call(jobInstance.task, interactor, { frame, - points: convertShapesForInteractor((e as CustomEvent).detail.shapes), + pos_points: convertShapesForInteractor((e as CustomEvent).detail.shapes, 0), + neg_points: convertShapesForInteractor((e as CustomEvent).detail.shapes, 2), }); if (this.interactionIsAborted) { diff --git a/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx b/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx index 2e1b92afb623..dfd1a62cff83 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-ui/src/components/annotation-page/top-bar/top-bar.tsx b/cvat-ui/src/components/annotation-page/top-bar/top-bar.tsx index 2e9212dee329..38f559edab2a 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/top-bar.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/top-bar.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-ui/src/components/labels-editor/common.ts b/cvat-ui/src/components/labels-editor/common.ts index f843218e2e70..d0c75f9f1e7f 100644 --- a/cvat-ui/src/components/labels-editor/common.ts +++ b/cvat-ui/src/components/labels-editor/common.ts @@ -26,23 +26,23 @@ function validateParsedAttribute(attr: Attribute): void { if (!['number', 'undefined'].includes(typeof attr.id)) { throw new Error( - `Attribute: "${attr.name}". ` + `Type of attribute id must be a number or undefined. Got value ${attr.id}`, + `Attribute: "${attr.name}". Type of attribute id must be a number or undefined. Got value ${attr.id}`, ); } if (!['checkbox', 'number', 'text', 'radio', 'select'].includes((attr.input_type || '').toLowerCase())) { - throw new Error(`Attribute: "${attr.name}". ` + `Unknown input type: ${attr.input_type}`); + throw new Error(`Attribute: "${attr.name}". Unknown input type: ${attr.input_type}`); } if (typeof attr.mutable !== 'boolean') { throw new Error( - `Attribute: "${attr.name}". ` + `Mutable flag must be a boolean value. Got value ${attr.mutable}`, + `Attribute: "${attr.name}". Mutable flag must be a boolean value. Got value ${attr.mutable}`, ); } if (!Array.isArray(attr.values)) { throw new Error( - `Attribute: "${attr.name}". ` + `Attribute values must be an array. Got type ${typeof attr.values}`, + `Attribute: "${attr.name}". Attribute values must be an array. Got type ${typeof attr.values}`, ); } @@ -52,7 +52,7 @@ function validateParsedAttribute(attr: Attribute): void { for (const value of attr.values) { if (typeof value !== 'string') { - throw new Error(`Attribute: "${attr.name}". ` + `Each value must be a string. Got value ${value}`); + throw new Error(`Attribute: "${attr.name}". Each value must be a string. Got value ${value}`); } } } @@ -64,12 +64,12 @@ export function validateParsedLabel(label: Label): void { if (!['number', 'undefined'].includes(typeof label.id)) { throw new Error( - `Label "${label.name}". ` + `Type of label id must be only a number or undefined. Got value ${label.id}`, + `Label "${label.name}". Type of label id must be only a number or undefined. Got value ${label.id}`, ); } if (typeof label.color !== 'string') { - throw new Error(`Label "${label.name}". ` + `Label color must be a string. Got ${typeof label.color}`); + throw new Error(`Label "${label.name}". Label color must be a string. Got ${typeof label.color}`); } if (!label.color.match(/^#[0-9a-fA-F]{6}$|^$/)) { @@ -80,7 +80,7 @@ export function validateParsedLabel(label: Label): void { } if (!Array.isArray(label.attributes)) { - throw new Error(`Label "${label.name}". ` + `attributes must be an array. Got type ${typeof label.attributes}`); + throw new Error(`Label "${label.name}". Attributes must be an array. Got type ${typeof label.attributes}`); } for (const attr of label.attributes) { diff --git a/cvat-ui/src/containers/actions-menu/actions-menu.tsx b/cvat-ui/src/containers/actions-menu/actions-menu.tsx index dc84b47ac1af..acc6a45156e4 100644 --- a/cvat-ui/src/containers/actions-menu/actions-menu.tsx +++ b/cvat-ui/src/containers/actions-menu/actions-menu.tsx @@ -9,7 +9,9 @@ import ActionsMenuComponent, { Actions } from 'components/actions-menu/actions-m import { CombinedState } from 'reducers/interfaces'; import { modelsActions } from 'actions/models-actions'; -import { dumpAnnotationsAsync, loadAnnotationsAsync, exportDatasetAsync, deleteTaskAsync } from 'actions/tasks-actions'; +import { + dumpAnnotationsAsync, loadAnnotationsAsync, exportDatasetAsync, deleteTaskAsync, +} from 'actions/tasks-actions'; // eslint-disable-next-line import/no-extraneous-dependencies import { MenuInfo } from 'rc-menu/lib/interface'; diff --git a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx index 86ad23d0a739..5019b143e929 100644 --- a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx +++ b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-ui/src/cvat-canvas-wrapper.ts b/cvat-ui/src/cvat-canvas-wrapper.ts index 91fcc7ed3ae1..3b0c1e21174b 100644 --- a/cvat-ui/src/cvat-canvas-wrapper.ts +++ b/cvat-ui/src/cvat-canvas-wrapper.ts @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -12,20 +12,20 @@ import { InteractionResult as _InteractionResult, } from 'cvat-canvas/src/typescript/canvas'; -export function convertShapesForInteractor(shapes: InteractionResult[]): number[][] { +export function convertShapesForInteractor(shapes: InteractionResult[], button: number): number[][] { const reducer = (acc: number[][], _: number, index: number, array: number[]): number[][] => { - if (!(index % 2)) { // 0, 2, 4 - acc.push([ - array[index], - array[index + 1], - ]); + if (!(index % 2)) { + // 0, 2, 4 + acc.push([array[index], array[index + 1]]); } return acc; }; - return shapes.filter((shape: InteractionResult): boolean => shape.shapeType === 'points' && shape.button === 0) + return shapes + .filter((shape: InteractionResult): boolean => shape.shapeType === 'points' && shape.button === button) .map((shape: InteractionResult): number[] => shape.points) - .flat().reduce(reducer, []); + .flat() + .reduce(reducer, []); } export type InteractionData = _InteractionData; diff --git a/cvat-ui/src/reducers/annotation-reducer.ts b/cvat-ui/src/reducers/annotation-reducer.ts index 0f7d648b5c0e..0db2fbaa3492 100644 --- a/cvat-ui/src/reducers/annotation-reducer.ts +++ b/cvat-ui/src/reducers/annotation-reducer.ts @@ -1044,8 +1044,9 @@ export default (state = defaultState, action: AnyAction): AnnotationState => { }, canvas: { ...state.canvas, - activeControl: activeInteractor - .type.startsWith('opencv') ? ActiveControl.OPENCV_TOOLS : ActiveControl.AI_TOOLS, + activeControl: activeInteractor.type.startsWith('opencv') ? + ActiveControl.OPENCV_TOOLS : + ActiveControl.AI_TOOLS, }, }; } diff --git a/cvat/apps/documentation/installation.md b/cvat/apps/documentation/installation.md index c852d7733744..da7c9c199bd0 100644 --- a/cvat/apps/documentation/installation.md +++ b/cvat/apps/documentation/installation.md @@ -284,7 +284,8 @@ Please see the [Docker documentation](https://docs.docker.com/network/proxy/) fo ```bash # Build and run containers with Analytics component support: -docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml up -d --build +docker-compose -f docker-compose.yml \ + -f components/analytics/docker-compose.analytics.yml up -d --build ``` ### Semi-automatic and automatic annotation diff --git a/cvat/apps/documentation/installation_automatic_annotation.md b/cvat/apps/documentation/installation_automatic_annotation.md index e3343211ffd5..e68ce8b48128 100644 --- a/cvat/apps/documentation/installation_automatic_annotation.md +++ b/cvat/apps/documentation/installation_automatic_annotation.md @@ -1,13 +1,14 @@ - ### Semi-automatic and Automatic Annotation - > **⚠ WARNING: Do not use `docker-compose up`** -> If you did, make sure all containers are stopped by `docker-compose down`. +> If you did, make sure all containers are stopped by `docker-compose down`. + - To bring up cvat with auto annotation tool, from cvat root directory, you need to run: + ```bash docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d ``` + If you did any changes to the docker-compose files, make sure to add `--build` at the end. To stop the containers, simply run: @@ -17,10 +18,11 @@ ``` - You have to install `nuctl` command line tool to build and deploy serverless - functions. Download [version 1.5.8](https://github.com/nuclio/nuclio/releases). + functions. Download [version 1.5.16](https://github.com/nuclio/nuclio/releases/tag/1.5.16). It is important that the version you download matches the version in [docker-compose.serverless.yml](/components/serverless/docker-compose.serverless.yml) After downloading the nuclio, give it a proper permission and do a softlink + ``` sudo chmod +x nuctl--linux-amd64 sudo ln -sf $(pwd)/nuctl--linux-amd64 /usr/local/bin/nuctl @@ -45,10 +47,13 @@ --volume `pwd`/serverless/openvino/common:/opt/nuclio/common \ --platform local ``` + **Note:** + - See [deploy_cpu.sh](/serverless/deploy_cpu.sh) for more examples. #### GPU Support + You will need to install Nvidia Container Toolkit and make sure your docker supports GPU. Follow [Nvidia docker instructions](https://www.tensorflow.org/install/docker#gpu_support). Also you will need to add `--resource-limit nvidia.com/gpu=1` to the nuclio deployment command. As an example, below will run on the GPU: @@ -63,9 +68,10 @@ ``` **Note:** - - Since the model is loaded during deployment, the number of GPU functions you can deploy will be limited to your GPU memory. - - See [deploy_gpu.sh](/serverless/deploy_gpu.sh) script for more examples. + - Since the model is loaded during deployment, the number of GPU functions you can deploy will be limited to your GPU memory. + + - See [deploy_gpu.sh](/serverless/deploy_gpu.sh) script for more examples. ####Debugging Nuclio Functions: @@ -76,6 +82,7 @@ ```bash docker logs ``` + e.g., ```bash @@ -83,9 +90,10 @@ ``` - If you would like to debug a code inside a container, you can use vscode to directly attach to a container [instructions](https://code.visualstudio.com/docs/remote/attach-container). To apply your changes, make sure to restart the container. + ```bash docker restart ``` > **⚠ WARNING:** - > Do not use nuclio dashboard to stop the container because with any modifications, it rebuilds the container and you will lose your changes. \ No newline at end of file + > Do not use nuclio dashboard to stop the container because with any modifications, it rebuilds the container and you will lose your changes. diff --git a/cvat/apps/lambda_manager/views.py b/cvat/apps/lambda_manager/views.py index bd24858128d6..c7986394f6df 100644 --- a/cvat/apps/lambda_manager/views.py +++ b/cvat/apps/lambda_manager/views.py @@ -86,13 +86,14 @@ def __init__(self, gateway, data): # ID of the function (e.g. omz.public.yolo-v3) self.id = data['metadata']['name'] # type of the function (e.g. detector, interactor) - kind = data['metadata']['annotations'].get('type') + meta_anno = data['metadata']['annotations'] + kind = meta_anno.get('type') try: self.kind = LambdaType(kind) except ValueError: self.kind = LambdaType.UNKNOWN # dictionary of labels for the function (e.g. car, person) - spec = json.loads(data['metadata']['annotations'].get('spec') or '[]') + spec = json.loads(meta_anno.get('spec') or '[]') labels = [item['name'] for item in spec] if len(labels) != len(set(labels)): raise ValidationError( @@ -106,10 +107,11 @@ def __init__(self, gateway, data): # http port to access the serverless function self.port = data["status"].get("httpPort") # framework which is used for the function (e.g. tensorflow, openvino) - self.framework = data['metadata']['annotations'].get('framework') + self.framework = meta_anno.get('framework') # display name for the function - self.name = data['metadata']['annotations'].get('name', self.id) - self.min_pos_points = int(data['metadata']['annotations'].get('min_pos_points', 1)) + self.name = meta_anno.get('name', self.id) + self.min_pos_points = int(meta_anno.get('min_pos_points', 1)) + self.startswith_box = bool(meta_anno.get('startswith_box', False)) self.gateway = gateway def to_dict(self): @@ -117,13 +119,22 @@ def to_dict(self): 'id': self.id, 'kind': str(self.kind), 'labels': self.labels, - 'state': self.state, 'description': self.description, 'framework': self.framework, - 'name': self.name, - 'min_pos_points': self.min_pos_points + 'name': self.name } + if self.kind is LambdaType.INTERACTOR: + response.update({ + 'min_pos_points': self.min_pos_points, + 'startswith_box': self.startswith_box + }) + + if self.kind is LambdaType.TRACKER: + response.update({ + 'state': self.state + }) + return response def invoke(self, db_task, data): @@ -155,7 +166,8 @@ def invoke(self, db_task, data): elif self.kind == LambdaType.INTERACTOR: payload.update({ "image": self._get_image(db_task, data["frame"], quality), - "points": data["points"], + "pos_points": data["pos_points"], + "neg_points": data["neg_points"] }) elif self.kind == LambdaType.REID: payload.update({ diff --git a/serverless/openvino/common/model_loader.py b/serverless/common/openvino/model_loader.py similarity index 100% rename from serverless/openvino/common/model_loader.py rename to serverless/common/openvino/model_loader.py diff --git a/serverless/openvino/common/python3 b/serverless/common/openvino/python3 similarity index 62% rename from serverless/openvino/common/python3 rename to serverless/common/openvino/python3 index fca7518d4099..dfd05669c2b2 100755 --- a/serverless/openvino/common/python3 +++ b/serverless/common/openvino/python3 @@ -3,5 +3,5 @@ args=$@ . /opt/intel/openvino/bin/setupvars.sh -PYTHONPATH=/opt/nuclio/common:$PYTHONPATH +PYTHONPATH=/opt/nuclio/common/openvino:$PYTHONPATH /usr/bin/python3 $args diff --git a/serverless/deploy_cpu.sh b/serverless/deploy_cpu.sh index a86149fef7ab..531a21269f63 100755 --- a/serverless/deploy_cpu.sh +++ b/serverless/deploy_cpu.sh @@ -2,57 +2,19 @@ # Sample commands to deploy nuclio functions on CPU SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +FUNCTIONS_DIR=${1:-$SCRIPT_DIR} nuctl create project cvat -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local +for func_config in $(find "$FUNCTIONS_DIR" -name "function.yaml") +do + func_root=$(dirname "$func_config") + echo Deploying $(dirname "$func_root") function... + nuctl deploy --project-name cvat --path "$func_root" \ + --volume "$SCRIPT_DIR/common:/opt/nuclio/common" \ + --platform local +done -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/public/yolo-v3-tf/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/intel/text-detection-0004/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/omz/intel/person-reidentification-retail-300/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/openvino/dextr/nuclio" \ - --volume "$SCRIPT_DIR/openvino/common:/opt/nuclio/common" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/tensorflow/matterport/mask_rcnn/nuclio" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/tensorflow/faster_rcnn_inception_v2_coco/nuclio" \ - --platform local - -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/pytorch/foolwood/siammask/nuclio" \ - --platform local +nuctl get function -nuctl deploy --project-name cvat \ - --path "$SCRIPT_DIR/pytorch/saic-vul/fbrs/nuclio" \ - --platform local -nuctl get function diff --git a/serverless/openvino/dextr/nuclio/function.yaml b/serverless/openvino/dextr/nuclio/function.yaml index 6faa753ef916..825599428f62 100644 --- a/serverless/openvino/dextr/nuclio/function.yaml +++ b/serverless/openvino/dextr/nuclio/function.yaml @@ -15,7 +15,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.dextr @@ -51,3 +51,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/dextr/nuclio/main.py b/serverless/openvino/dextr/nuclio/main.py index 73617002c69d..10f47026bb29 100644 --- a/serverless/openvino/dextr/nuclio/main.py +++ b/serverless/openvino/dextr/nuclio/main.py @@ -15,7 +15,7 @@ def init_context(context): def handler(context, event): context.logger.info("call handler") data = event.body - points = data["points"] + points = data["pos_points"] buf = io.BytesIO(base64.b64decode(data["image"].encode('utf-8'))) image = Image.open(buf) diff --git a/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio/function.yaml b/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio/function.yaml index ab8845e42ee3..ffa81ae8111e 100644 --- a/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio/function.yaml +++ b/serverless/openvino/omz/intel/person-reidentification-retail-300/nuclio/function.yaml @@ -14,7 +14,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.intel.person-reidentification-retail-0300 @@ -46,3 +46,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio/function.yaml b/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio/function.yaml index b871a01cf8c0..20e4941e26ec 100644 --- a/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio/function.yaml +++ b/serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio/function.yaml @@ -37,7 +37,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.intel.semantic-segmentation-adas-0001 @@ -73,3 +73,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/omz/intel/text-detection-0004/nuclio/function.yaml b/serverless/openvino/omz/intel/text-detection-0004/nuclio/function.yaml index 7625933d8629..eff14c114144 100644 --- a/serverless/openvino/omz/intel/text-detection-0004/nuclio/function.yaml +++ b/serverless/openvino/omz/intel/text-detection-0004/nuclio/function.yaml @@ -17,7 +17,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.intel.text-detection-0004 @@ -47,3 +47,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio/function.yaml b/serverless/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio/function.yaml index 47c3f2fe9e7c..556154e06888 100644 --- a/serverless/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio/function.yaml +++ b/serverless/openvino/omz/public/faster_rcnn_inception_v2_coco/nuclio/function.yaml @@ -96,7 +96,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.public.faster_rcnn_inception_v2_coco @@ -128,3 +128,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio/function.yaml b/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio/function.yaml index 88a1a817f70d..8e7854e9f972 100644 --- a/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio/function.yaml +++ b/serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio/function.yaml @@ -99,7 +99,7 @@ spec: eventTimeout: 60s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.public.mask_rcnn_inception_resnet_v2_atrous_coco @@ -137,3 +137,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/openvino/omz/public/yolo-v3-tf/nuclio/function.yaml b/serverless/openvino/omz/public/yolo-v3-tf/nuclio/function.yaml index 793f26164a81..5e3966f1421c 100644 --- a/serverless/openvino/omz/public/yolo-v3-tf/nuclio/function.yaml +++ b/serverless/openvino/omz/public/yolo-v3-tf/nuclio/function.yaml @@ -96,7 +96,7 @@ spec: eventTimeout: 30s env: - name: NUCLIO_PYTHON_EXE_PATH - value: /opt/nuclio/common/python3 + value: /opt/nuclio/common/openvino/python3 build: image: cvat/openvino.omz.public.yolo-v3-tf @@ -128,3 +128,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/pytorch/foolwood/siammask/nuclio/function.yaml b/serverless/pytorch/foolwood/siammask/nuclio/function.yaml index a19fdb52bb3e..5b078127c2b3 100644 --- a/serverless/pytorch/foolwood/siammask/nuclio/function.yaml +++ b/serverless/pytorch/foolwood/siammask/nuclio/function.yaml @@ -54,3 +54,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml b/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml index 4d36482a0f27..50a25753d7c2 100644 --- a/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml +++ b/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml @@ -57,3 +57,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/pytorch/saic-vul/fbrs/nuclio/main.py b/serverless/pytorch/saic-vul/fbrs/nuclio/main.py index 300bc294c6a7..ad1f8eddf880 100644 --- a/serverless/pytorch/saic-vul/fbrs/nuclio/main.py +++ b/serverless/pytorch/saic-vul/fbrs/nuclio/main.py @@ -19,8 +19,8 @@ def init_context(context): def handler(context, event): context.logger.info("call handler") data = event.body - pos_points = data["points"] - neg_points = [] + pos_points = data["pos_points"] + neg_points = data["neg_points"] threshold = data.get("threshold", 0.5) buf = io.BytesIO(base64.b64decode(data["image"].encode('utf-8'))) image = Image.open(buf) diff --git a/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml b/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml new file mode 100644 index 000000000000..f84f543ced1a --- /dev/null +++ b/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml @@ -0,0 +1,71 @@ +metadata: + name: pth.shiyinzhang.iog + namespace: cvat + annotations: + name: IOG + type: interactor + spec: + framework: pytorch + min_pos_points: 1 + startswith_box: true + +spec: + description: Interactive Object Segmentation with Inside-Outside Guidance + runtime: 'python:3.6' + handler: main:handler + eventTimeout: 30s + env: + - name: PYTHONPATH + value: /opt/nuclio/iog + + build: + image: cvat/pth.shiyinzhang.iog + baseImage: continuumio/miniconda3 + + directives: + preCopy: + - kind: WORKDIR + value: /opt/nuclio + - kind: RUN + value: conda create -y -n iog python=3.6 + - kind: SHELL + value: '["conda", "run", "-n", "iog", "/bin/bash", "-c"]' + - kind: RUN + value: conda install -y -c anaconda curl + - kind: RUN + value: conda install -y pytorch=0.4 torchvision=0.2 -c pytorch + - kind: RUN + value: conda install -y -c conda-forge pycocotools opencv scipy + - kind: RUN + value: git clone https://github.com/shiyinzhang/Inside-Outside-Guidance.git iog + - kind: WORKDIR + value: /opt/nuclio/iog + - kind: ENV + value: fileid=1Lm1hhMhhjjnNwO4Pf7SC6tXLayH2iH0l + - kind: ENV + value: filename=IOG_PASCAL_SBD.pth + - kind: RUN + value: curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" + - kind: RUN + value: echo "/download/ {print \$NF}" > confirm_code.awk + - kind: RUN + value: curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk -f confirm_code.awk ./cookie`&id=${fileid}" -o ${filename} + - kind: WORKDIR + value: /opt/nuclio + - kind: ENTRYPOINT + value: '["conda", "run", "-n", "iog"]' + + triggers: + myHttpTrigger: + maxWorkers: 2 + kind: 'http' + workerAvailabilityTimeoutMilliseconds: 10000 + attributes: + maxRequestBodySize: 33554432 # 32MB + + platform: + attributes: + restartPolicy: + name: always + maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/pytorch/shiyinzhang/iog/nuclio/main.py b/serverless/pytorch/shiyinzhang/iog/nuclio/main.py new file mode 100644 index 000000000000..16c4d732dbe1 --- /dev/null +++ b/serverless/pytorch/shiyinzhang/iog/nuclio/main.py @@ -0,0 +1,40 @@ +# Copyright (C) 2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +import json +import base64 +from PIL import Image +import io +import numpy as np +from model_handler import ModelHandler + +def init_context(context): + context.logger.info("Init context... 0%") + + model = ModelHandler() + setattr(context.user_data, 'model', model) + + context.logger.info("Init context...100%") + +def handler(context, event): + context.logger.info("call handler") + data = event.body + pos_points = data["pos_points"] + neg_points = data["neg_points"] + obj_bbox = data.get("obj_bbox", None) + threshold = data.get("threshold", 0.8) + buf = io.BytesIO(base64.b64decode(data["image"].encode('utf-8'))) + image = Image.open(buf) + + if obj_bbox is None: + x, y = np.split(np.transpose(np.array(neg_points)), 2) + obj_bbox = [np.min(x), np.min(y), np.max(x), np.max(y)] + neg_points = [] + + polygon = context.user_data.model.handle(image, obj_bbox, + pos_points, neg_points, threshold) + return context.Response(body=json.dumps(polygon), + headers={}, + content_type='application/json', + status_code=200) diff --git a/serverless/pytorch/shiyinzhang/iog/nuclio/model_handler.py b/serverless/pytorch/shiyinzhang/iog/nuclio/model_handler.py new file mode 100644 index 000000000000..5d972915d35d --- /dev/null +++ b/serverless/pytorch/shiyinzhang/iog/nuclio/model_handler.py @@ -0,0 +1,123 @@ +# Copyright (C) 2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +import numpy as np +import os +import cv2 +import torch +from networks.mainnetwork import Network +from dataloaders import helpers + +def convert_mask_to_polygon(mask): + mask = np.array(mask, dtype=np.uint8) + cv2.normalize(mask, mask, 0, 255, cv2.NORM_MINMAX) + contours = None + if int(cv2.__version__.split('.')[0]) > 3: + contours = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_TC89_KCOS)[0] + else: + contours = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_TC89_KCOS)[1] + + contours = max(contours, key=lambda arr: arr.size) + if contours.shape.count(1): + contours = np.squeeze(contours) + if contours.size < 3 * 2: + raise Exception('Less then three point have been detected. Can not build a polygon.') + + polygon = [] + for point in contours: + polygon.append([int(point[0]), int(point[1])]) + + return polygon + +class ModelHandler: + def __init__(self): + base_dir = os.environ.get("MODEL_PATH", "/opt/nuclio/iog") + model_path = os.path.join(base_dir, "IOG_PASCAL_SBD.pth") + self.device = torch.device("cpu") + + # Number of input channels (RGB + heatmap of IOG points) + self.net = Network(nInputChannels=5, num_classes=1, backbone='resnet101', + output_stride=16, sync_bn=None, freeze_bn=False) + + pretrain_dict = torch.load(model_path) + self.net.load_state_dict(pretrain_dict) + self.net.to(self.device) + self.net.eval() + + def handle(self, image, bbox, pos_points, neg_points, threshold): + with torch.no_grad(): + # extract a crop with padding from the image + crop_padding = 30 + crop_bbox = [ + max(bbox[0] - crop_padding, 0), + max(bbox[1] - crop_padding, 0), + min(bbox[2] + crop_padding, image.width - 1), + min(bbox[3] + crop_padding, image.height - 1) + ] + crop_shape = ( + int(crop_bbox[2] - crop_bbox[0] + 1), # width + int(crop_bbox[3] - crop_bbox[1] + 1), # height + ) + + # try to use crop_from_bbox(img, bbox, zero_pad) here + input_crop = np.array(image.crop(crop_bbox)).astype(np.float32) + + # resize the crop + input_crop = cv2.resize(input_crop, (512, 512), interpolation=cv2.INTER_NEAREST) + crop_scale = (512 / crop_shape[0], 512 / crop_shape[1]) + + def translate_points_to_crop(points): + points = [ + ((p[0] - crop_bbox[0]) * crop_scale[0], # x + (p[1] - crop_bbox[1]) * crop_scale[1]) # y + for p in points] + + return points + + pos_points = translate_points_to_crop(pos_points) + neg_points = translate_points_to_crop(neg_points) + + # Create IOG image + pos_gt = np.zeros(shape=input_crop.shape[:2], dtype=np.float64) + neg_gt = np.zeros(shape=input_crop.shape[:2], dtype=np.float64) + for p in pos_points: + pos_gt = np.maximum(pos_gt, helpers.make_gaussian(pos_gt.shape, center=p)) + for p in neg_points: + neg_gt = np.maximum(neg_gt, helpers.make_gaussian(neg_gt.shape, center=p)) + iog_image = np.stack((pos_gt, neg_gt), axis=2).astype(dtype=input_crop.dtype) + + # Convert iog_image to an image (0-255 values) + cv2.normalize(iog_image, iog_image, 0, 255, cv2.NORM_MINMAX) + + # Concatenate input crop and IOG image + input_blob = np.concatenate((input_crop, iog_image), axis=2) + + # numpy image: H x W x C + # torch image: C X H X W + input_blob = input_blob.transpose((2, 0, 1)) + # batch size is 1 + input_blob = np.array([input_blob]) + input_tensor = torch.from_numpy(input_blob) + + input_tensor = input_tensor.to(self.device) + output_mask = self.net.forward(input_tensor)[4] + output_mask = output_mask.to(self.device) + pred = np.transpose(output_mask.data.numpy()[0, :, :, :], (1, 2, 0)) + pred = pred > threshold + pred = np.squeeze(pred) + + # Convert a mask to a polygon + polygon = convert_mask_to_polygon(pred) + def translate_points_to_image(points): + points = [ + (p[0] / crop_scale[0] + crop_bbox[0], # x + p[1] / crop_scale[1] + crop_bbox[1]) # y + for p in points] + + return points + + polygon = translate_points_to_image(polygon) + + return polygon + diff --git a/serverless/tensorflow/faster_rcnn_inception_v2_coco/nuclio/function.yaml b/serverless/tensorflow/faster_rcnn_inception_v2_coco/nuclio/function.yaml index 4e2cf02f6e2e..4e6da8ebe596 100644 --- a/serverless/tensorflow/faster_rcnn_inception_v2_coco/nuclio/function.yaml +++ b/serverless/tensorflow/faster_rcnn_inception_v2_coco/nuclio/function.yaml @@ -129,3 +129,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume diff --git a/serverless/tensorflow/matterport/mask_rcnn/nuclio/function.yaml b/serverless/tensorflow/matterport/mask_rcnn/nuclio/function.yaml index ef0bf20cef4f..1d3ee39b4e51 100644 --- a/serverless/tensorflow/matterport/mask_rcnn/nuclio/function.yaml +++ b/serverless/tensorflow/matterport/mask_rcnn/nuclio/function.yaml @@ -108,15 +108,16 @@ spec: - kind: WORKDIR value: /opt/nuclio - kind: RUN - value: apt update && apt install --no-install-recommends -y git curl libsm6 libxext6 libxrender-dev + value: apt update && apt install --no-install-recommends -y git curl libsm6 libxext6 libgl1-mesa-glx - kind: RUN value: git clone https://github.com/matterport/Mask_RCNN.git - kind: RUN value: curl -L https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 -o Mask_RCNN/mask_rcnn_coco.h5 - kind: RUN - value: pip3 install -r Mask_RCNN/requirements.txt + value: pip3 install scipy cython matplotlib scikit-image opencv-python-headless h5py \ + imgaug IPython[all] tensorflow==1.13.1 keras==2.1.0 pillow pyyaml - kind: RUN - value: pip3 install pycocotools tensorflow==1.13.1 keras==2.1.0 pillow pyyaml + value: pip3 install pycocotools triggers: myHttpTrigger: @@ -131,3 +132,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 + mountMode: volume From f49eec7fba96f830cfc02effad9b357eab254ec4 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Wed, 10 Feb 2021 20:56:50 +0300 Subject: [PATCH 09/13] Add "id" to sidebar issue item. Update Cypress test. (#2784) * Add id to sidebar issue item. * Test adaptation * Some fix * Apply comments. --- .../objects-side-bar/issues-list.tsx | 3 ++- .../case_28_review_pipeline_feature.js | 26 ++++++------------- .../support/commands_review_pipeline.js | 10 +++---- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx index 31a65ad2053b..47695f06638c 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -84,6 +84,7 @@ export default function LabelsListComponent(): JSX.Element { {frameIssues.map( (frameIssue: any): JSX.Element => (
{ const element = window.document.getElementById( diff --git a/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js b/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js index 3b41f569a580..82266124e2ea 100644 --- a/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js +++ b/tests/cypress/integration/actions_users/registration_involved/case_28_review_pipeline_feature.js @@ -351,25 +351,15 @@ context('Review pipeline feature', () => { }); it('Select an issue on sidebar. Issue indication has changed the color for highlighted issue', () => { - let index = 0; cy.collectIssueRegionId().then(($issueRegionList) => { - cy.get('.cvat-objects-sidebar-issue-item').then((sidebarIssueItems) => { - for (let i = 0; i < sidebarIssueItems.length; i++) { - cy.get(sidebarIssueItems[i]).trigger('mousemove').trigger('mouseover'); - cy.get(`#cvat_canvas_issue_region_${$issueRegionList[index]}`).should( - 'have.attr', - 'fill', - 'url(#cvat_issue_region_pattern_2)', - ); - cy.get(sidebarIssueItems[i]).trigger('mouseout'); - cy.get(`#cvat_canvas_issue_region_${$issueRegionList[index]}`).should( - 'have.attr', - 'fill', - 'url(#cvat_issue_region_pattern_1)', - ); - index++; - } - }); + for (const issueRegionID of $issueRegionList) { + const objectsSidebarIssueItem = `#cvat-objects-sidebar-issue-item-${issueRegionID}`; + const canvasIssueRegion = `#cvat_canvas_issue_region_${issueRegionID}`; + cy.get(objectsSidebarIssueItem).trigger('mousemove').trigger('mouseover'); + cy.get(canvasIssueRegion).should('have.attr', 'fill', 'url(#cvat_issue_region_pattern_2)'); + cy.get(objectsSidebarIssueItem).trigger('mouseout'); + cy.get(canvasIssueRegion).should('have.attr', 'fill', 'url(#cvat_issue_region_pattern_1)'); + } }); }); diff --git a/tests/cypress/support/commands_review_pipeline.js b/tests/cypress/support/commands_review_pipeline.js index 026d95c58dce..7f755a8ac721 100644 --- a/tests/cypress/support/commands_review_pipeline.js +++ b/tests/cypress/support/commands_review_pipeline.js @@ -75,21 +75,17 @@ Cypress.Commands.add('collectIssueRegionId', () => { cy.document().then((doc) => { const issueRegionList = Array.from(doc.querySelectorAll('.cvat_canvas_issue_region')); for (let i = 0; i < issueRegionList.length; i++) { - issueRegionIdList.push(Number(issueRegionList[i].id.match(/\d+$/))); + issueRegionIdList.push(Number(issueRegionList[i].id.match(/\-?\d+$/))); } return issueRegionIdList; }); }); -Cypress.Commands.add('checkIssueRegion', (afterSave = false) => { +Cypress.Commands.add('checkIssueRegion', () => { const sccSelectorIssueRegionId = '#cvat_canvas_issue_region_'; cy.collectIssueRegionId().then((issueRegionIdList) => { const maxId = Math.max(...issueRegionIdList); - if (!afterSave) { - cy.get(`${sccSelectorIssueRegionId}-${maxId}`).trigger('mousemove').should('exist').and('be.visible'); - } else { - cy.get(`${sccSelectorIssueRegionId}${maxId}`).trigger('mousemove').should('exist').and('be.visible'); - } + cy.get(`${sccSelectorIssueRegionId}${maxId}`).trigger('mousemove').should('exist').and('be.visible'); }); }); From 9a56e7edd56a0603c4d21a61b2c4ea085f0d2205 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 11 Feb 2021 21:01:51 +0300 Subject: [PATCH 10/13] Shared tooltip component with common settings [Refactoring only] (#2783) * Popover trigger on click, shared tooltip component * Aborted trigger * Updated version --- .../annotations-filters-input.tsx | 8 +-- .../attribute-switcher.tsx | 29 +++++--- .../object-switcher.tsx | 29 +++++--- .../canvas/canvas-point-context-menu.tsx | 8 +-- .../annotation-page/canvas/canvas-wrapper.tsx | 11 ++-- .../controls-side-bar/issue-control.tsx | 8 +-- .../review/hidden-issue-label.tsx | 9 +-- .../annotation-page/review/issue-dialog.tsx | 12 ++-- .../controls-side-bar/cursor-control.tsx | 8 +-- .../controls-side-bar/draw-shape-popover.tsx | 20 +++--- .../controls-side-bar/fit-control.tsx | 8 +-- .../controls-side-bar/group-control.tsx | 51 +++++++------- .../handle-popover-visibility.tsx | 2 +- .../controls-side-bar/merge-control.tsx | 42 ++++++------ .../controls-side-bar/move-control.tsx | 8 +-- .../controls-side-bar/opencv-control.tsx | 6 +- .../controls-side-bar/resize-control.tsx | 8 +-- .../controls-side-bar/rotate-control.tsx | 19 ++---- .../controls-side-bar/setup-tag-popover.tsx | 9 +-- .../controls-side-bar/split-control.tsx | 8 +-- .../objects-side-bar/color-picker.tsx | 8 +-- .../objects-side-bar/issues-list.tsx | 14 ++-- .../objects-side-bar/object-item-basics.tsx | 8 +-- .../objects-side-bar/object-item-buttons.tsx | 36 +++++----- .../objects-side-bar/object-item-menu.tsx | 33 +++++----- .../objects-side-bar/objects-list-header.tsx | 16 ++--- .../controls-side-bar/cursor-control.tsx | 10 +-- .../controls-side-bar/move-control.tsx | 10 +-- .../controls-side-bar/photo-context.tsx | 9 +-- .../top-bar/player-buttons.tsx | 66 +++++++++---------- .../top-bar/player-navigation.tsx | 20 +++--- .../top-bar/statistics-modal.tsx | 7 +- .../src/components/common/cvat-tooltip.tsx | 18 +++++ .../advanced-configuration-form.tsx | 23 ++++--- .../global-error-boundary.tsx | 8 +-- .../labels-editor/constructor-viewer-item.tsx | 12 ++-- .../components/labels-editor/label-form.tsx | 60 ++++++++++------- .../labels-editor/labels-editor.tsx | 8 +-- .../components/labels-editor/raw-viewer.tsx | 12 ++-- .../model-runner-modal/detector-runner.tsx | 36 +++++----- cvat-ui/src/components/task-page/job-list.tsx | 21 ++++-- .../automatic-annotation-progress.tsx | 9 +-- 42 files changed, 400 insertions(+), 347 deletions(-) create mode 100644 cvat-ui/src/components/common/cvat-tooltip.tsx diff --git a/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx b/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx index 0d701df32294..674e8e30bab6 100644 --- a/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx +++ b/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx @@ -8,7 +8,6 @@ import Select, { SelectValue, LabeledValue } from 'antd/lib/select'; import Title from 'antd/lib/typography/Title'; import Text from 'antd/lib/typography/Text'; import Paragraph from 'antd/lib/typography/Paragraph'; -import Tooltip from 'antd/lib/tooltip'; import Modal from 'antd/lib/modal'; import { FilterOutlined } from '@ant-design/icons'; @@ -16,6 +15,7 @@ import { changeAnnotationsFilters as changeAnnotationsFiltersAction, fetchAnnotationsAsync, } from 'actions/annotation-actions'; +import CVATTooltip from 'components/common/cvat-tooltip'; import { CombinedState } from 'reducers/interfaces'; interface StateToProps { @@ -53,7 +53,7 @@ function mapDispatchToProps(dispatch: any): DispatchToProps { dispatch(fetchAnnotationsAsync()); } else if ( Array.isArray(value) && - value.every((element: string | number | LabeledValue): boolean => typeof element === 'string') + !value.some((element: string | number | LabeledValue): boolean => typeof element !== 'string') ) { dispatch(changeAnnotationsFiltersAction(value as string[])); dispatch(fetchAnnotationsAsync()); @@ -134,7 +134,7 @@ function AnnotationsFiltersInput(props: StateToProps & DispatchToProps): JSX.Ele placeholder={ underCursor ? ( <> - + { @@ -152,7 +152,7 @@ function AnnotationsFiltersInput(props: StateToProps & DispatchToProps): JSX.Ele onMouseEnter={() => setDropdownVisible(false)} onMouseLeave={() => setDropdownVisible(true)} /> - + ) : ( <> diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx index 2632b6a6d9b9..59a17593da00 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx @@ -1,13 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Text from 'antd/lib/typography/Text'; -import Tooltip from 'antd/lib/tooltip'; import Button from 'antd/lib/button'; import { LeftOutlined, RightOutlined } from '@ant-design/icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; + interface Props { currentAttribute: string; currentIndex: number; @@ -24,20 +25,28 @@ function AttributeSwitcher(props: Props): JSX.Element { const title = `${currentAttribute} [${currentIndex + 1}/${attributesCount}]`; return (
- - - - + + {currentAttribute} {` [${currentIndex + 1}/${attributesCount}]`} - - - - +
); } diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx index f371a287261e..b64d2c5fc41d 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx @@ -1,13 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Text from 'antd/lib/typography/Text'; -import Tooltip from 'antd/lib/tooltip'; import Button from 'antd/lib/button'; import { LeftOutlined, RightOutlined } from '@ant-design/icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; + interface Props { currentLabel: string; clientID: number; @@ -26,21 +27,29 @@ function ObjectSwitcher(props: Props): JSX.Element { const title = `${currentLabel} ${clientID} [${currentIndex + 1}/${objectsCount}]`; return (
- - - - + + {currentLabel} {` ${clientID} `} {`[${currentIndex + 1}/${objectsCount}]`} - - - - +
); } diff --git a/cvat-ui/src/components/annotation-page/canvas/canvas-point-context-menu.tsx b/cvat-ui/src/components/annotation-page/canvas/canvas-point-context-menu.tsx index 04ecd78c7760..490359584143 100644 --- a/cvat-ui/src/components/annotation-page/canvas/canvas-point-context-menu.tsx +++ b/cvat-ui/src/components/annotation-page/canvas/canvas-point-context-menu.tsx @@ -1,16 +1,16 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import Button from 'antd/lib/button'; -import Tooltip from 'antd/lib/tooltip'; import { DeleteOutlined, EnvironmentOutlined } from '@ant-design/icons'; import { connect } from 'react-redux'; import { CombinedState, ContextMenuType } from 'reducers/interfaces'; import { updateAnnotationsAsync, updateCanvasContextMenu } from 'actions/annotation-actions'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface StateToProps { activatedState: any | null; @@ -103,11 +103,11 @@ function CanvasPointContextMenu(props: Props): React.ReactPortal | null { return visible && contextMenuFor && type === ContextMenuType.CANVAS_SHAPE_POINT ? ReactDOM.createPortal(
- + - + {contextMenuFor && contextMenuFor.shapeType === 'polygon' && (
); diff --git a/cvat-ui/src/components/annotation-page/review-workspace/controls-side-bar/issue-control.tsx b/cvat-ui/src/components/annotation-page/review-workspace/controls-side-bar/issue-control.tsx index 6fe71158df40..4947f7661518 100644 --- a/cvat-ui/src/components/annotation-page/review-workspace/controls-side-bar/issue-control.tsx +++ b/cvat-ui/src/components/annotation-page/review-workspace/controls-side-bar/issue-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { ActiveControl } from 'reducers/interfaces'; import { Canvas } from 'cvat-canvas-wrapper'; import { RectangleIcon } from 'icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -20,7 +20,7 @@ function ResizeControl(props: Props): JSX.Element { const { activeControl, canvasInstance, selectIssuePosition } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx index 02b5572e17e2..579bec3129f0 100644 --- a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx +++ b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx @@ -1,13 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React, { ReactPortal, useEffect } from 'react'; import ReactDOM from 'react-dom'; import Tag from 'antd/lib/tag'; -import Tooltip from 'antd/lib/tooltip'; import { CheckOutlined, CloseCircleOutlined } from '@ant-design/icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; + interface Props { id: number; message: string; @@ -34,7 +35,7 @@ export default function HiddenIssueLabel(props: Props): ReactPortal { const elementID = `cvat-hidden-issue-label-${id}`; return ReactDOM.createPortal( - + - , + , window.document.getElementById('cvat_canvas_attachment_board') as HTMLElement, ); } diff --git a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx index 8660017d3c85..27b89772ced7 100644 --- a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx +++ b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -9,10 +9,10 @@ import { CloseOutlined } from '@ant-design/icons'; import Comment from 'antd/lib/comment'; import Text from 'antd/lib/typography/Text'; import Title from 'antd/lib/typography/Title'; -import Tooltip from 'antd/lib/tooltip'; import Button from 'antd/lib/button'; import Input from 'antd/lib/input'; import moment from 'moment'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { id: number; @@ -67,9 +67,9 @@ export default function IssueDialog(props: Props): JSX.Element { author={{_comment.author ? _comment.author.username : 'Unknown'}} content={

{_comment.message}

} datetime={( - + {diff} - + )} /> ); @@ -93,9 +93,9 @@ export default function IssueDialog(props: Props): JSX.Element { {id >= 0 ? `Issue #${id}` : 'Issue'} - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx index 9983fd6c3379..dd26d376f254 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { CursorIcon } from 'icons'; import { ActiveControl } from 'reducers/interfaces'; import { Canvas } from 'cvat-canvas-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -20,7 +20,7 @@ function CursorControl(props: Props): JSX.Element { const { canvasInstance, activeControl, cursorShortkey } = props; return ( - + canvasInstance.cancel() : undefined} /> - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-shape-popover.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-shape-popover.tsx index a8a7ff428917..b85f5d6a746b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-shape-popover.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/draw-shape-popover.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -7,13 +7,13 @@ import { Row, Col } from 'antd/lib/grid'; import Button from 'antd/lib/button'; import InputNumber from 'antd/lib/input-number'; import Radio, { RadioChangeEvent } from 'antd/lib/radio'; -import Tooltip from 'antd/lib/tooltip'; import Text from 'antd/lib/typography/Text'; import { RectDrawingMethod, CuboidDrawingMethod } from 'cvat-canvas-wrapper'; import { ShapeType } from 'reducers/interfaces'; import { clamp } from 'utils/math'; import LabelSelector from 'components/label-selector/label-selector'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { shapeType: ShapeType; @@ -129,11 +129,11 @@ function DrawShapePopoverComponent(props: Props): JSX.Element { { - if (typeof value !== 'undefined') { - onChangePoints(Math.floor(clamp(+value, minimumPoints, Number.MAX_SAFE_INTEGER))); - } else if (!value) { + onChange={(value: number | undefined | string | null) => { + if (typeof value === 'undefined' || value === null) { onChangePoints(undefined); + } else { + onChangePoints(Math.floor(clamp(+value, minimumPoints, Number.MAX_SAFE_INTEGER))); } }} className='cvat-draw-shape-popover-points-selector' @@ -146,14 +146,14 @@ function DrawShapePopoverComponent(props: Props): JSX.Element { )} - + - + - + - +
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx index e8f10f29d222..baa544ff412b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx @@ -1,13 +1,13 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { FitIcon } from 'icons'; import { Canvas } from 'cvat-canvas-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -17,9 +17,9 @@ function FitControl(props: Props): JSX.Element { const { canvasInstance } = props; return ( - + canvasInstance.fit()} /> - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx index fb05e3f90ec8..8b93c7577e5f 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; -import Tooltip from 'antd/lib/tooltip'; import Icon from '@ant-design/icons'; import { GroupIcon } from 'icons'; import { Canvas } from 'cvat-canvas-wrapper'; import { ActiveControl } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -19,30 +19,37 @@ interface Props { } function GroupControl(props: Props): JSX.Element { - const { switchGroupShortcut, resetGroupShortcut, activeControl, canvasInstance, groupObjects } = props; + const { + switchGroupShortcut, resetGroupShortcut, activeControl, canvasInstance, groupObjects, + } = props; const dynamicIconProps = - activeControl === ActiveControl.GROUP ? { - className: 'cvat-group-control cvat-active-canvas-control', - onClick: (): void => { - canvasInstance.group({ enabled: false }); - groupObjects(false); - }, - } : { - className: 'cvat-group-control', - onClick: (): void => { - canvasInstance.cancel(); - canvasInstance.group({ enabled: true }); - groupObjects(true); - }, - }; - - const title = - `Group shapes/tracks ${switchGroupShortcut}.` + ` Select and press ${resetGroupShortcut} to reset a group`; + activeControl === ActiveControl.GROUP ? + { + className: 'cvat-group-control cvat-active-canvas-control', + onClick: (): void => { + canvasInstance.group({ enabled: false }); + groupObjects(false); + }, + } : + { + className: 'cvat-group-control', + onClick: (): void => { + canvasInstance.cancel(); + canvasInstance.group({ enabled: true }); + groupObjects(true); + }, + }; + + const title = [ + `Group shapes/tracks ${switchGroupShortcut}. `, + `Select and press ${resetGroupShortcut} to reset a group.`, + ].join(' '); + return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/handle-popover-visibility.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/handle-popover-visibility.tsx index c9de255dca18..fdc80926e6e7 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/handle-popover-visibility.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/handle-popover-visibility.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx index b00c9eb533ea..2d29fb21196c 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; -import Tooltip from 'antd/lib/tooltip'; import Icon from '@ant-design/icons'; import { MergeIcon } from 'icons'; import { Canvas } from 'cvat-canvas-wrapper'; import { ActiveControl } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -18,28 +18,32 @@ interface Props { } function MergeControl(props: Props): JSX.Element { - const { switchMergeShortcut, activeControl, canvasInstance, mergeObjects } = props; + const { + switchMergeShortcut, activeControl, canvasInstance, mergeObjects, + } = props; const dynamicIconProps = - activeControl === ActiveControl.MERGE ? { - className: 'cvat-merge-control cvat-active-canvas-control', - onClick: (): void => { - canvasInstance.merge({ enabled: false }); - mergeObjects(false); - }, - } : { - className: 'cvat-merge-control', - onClick: (): void => { - canvasInstance.cancel(); - canvasInstance.merge({ enabled: true }); - mergeObjects(true); - }, - }; + activeControl === ActiveControl.MERGE ? + { + className: 'cvat-merge-control cvat-active-canvas-control', + onClick: (): void => { + canvasInstance.merge({ enabled: false }); + mergeObjects(false); + }, + } : + { + className: 'cvat-merge-control', + onClick: (): void => { + canvasInstance.cancel(); + canvasInstance.merge({ enabled: true }); + mergeObjects(true); + }, + }; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx index 05b38556beda..760a59ddb22b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { MoveIcon } from 'icons'; import { ActiveControl } from 'reducers/interfaces'; import { Canvas } from 'cvat-canvas-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -19,7 +19,7 @@ function MoveControl(props: Props): JSX.Element { const { canvasInstance, activeControl } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx index d490342712a5..8bb4ea8740c8 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx @@ -5,7 +5,6 @@ import React from 'react'; import { connect } from 'react-redux'; import { Row, Col } from 'antd/lib/grid'; -import Tooltip from 'antd/lib/tooltip'; import Popover from 'antd/lib/popover'; import Icon, { ScissorOutlined } from '@ant-design/icons'; import Text from 'antd/lib/typography/Text'; @@ -29,6 +28,7 @@ import { createAnnotationsAsync, } from 'actions/annotation-actions'; import LabelSelector from 'components/label-selector/label-selector'; +import CVATTooltip from 'components/common/cvat-tooltip'; import withVisibilityHandling from './handle-popover-visibility'; interface Props { @@ -293,7 +293,7 @@ class OpenCVControlComponent extends React.PureComponent - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/resize-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/resize-control.tsx index 47d216d737a1..ac7806cb070a 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/resize-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/resize-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { ZoomIcon } from 'icons'; import { ActiveControl } from 'reducers/interfaces'; import { Canvas } from 'cvat-canvas-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -19,7 +19,7 @@ function ResizeControl(props: Props): JSX.Element { const { activeControl, canvasInstance } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx index 3aa537eba7a0..9fa1e2f9796b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/rotate-control.tsx @@ -4,12 +4,11 @@ import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import Popover from 'antd/lib/popover'; import { RotateIcon } from 'icons'; import { Rotation } from 'reducers/interfaces'; - +import CVATTooltip from 'components/common/cvat-tooltip'; import withVisibilityHandling from './handle-popover-visibility'; interface Props { @@ -27,28 +26,20 @@ function RotateControl(props: Props): JSX.Element { placement='right' content={( <> - + rotateFrame(Rotation.ANTICLOCKWISE90)} component={RotateIcon} /> - - + + rotateFrame(Rotation.CLOCKWISE90)} component={RotateIcon} /> - + )} trigger='hover' diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx index a0e31a605dbb..a202e3467a42 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx @@ -1,13 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import { Row, Col } from 'antd/lib/grid'; import Button from 'antd/lib/button'; -import Tooltip from 'antd/lib/tooltip'; import Text from 'antd/lib/typography/Text'; + import LabelSelector from 'components/label-selector/label-selector'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { labels: any[]; @@ -48,9 +49,9 @@ function SetupTagPopover(props: Props): JSX.Element { - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx index 43625fd6fc38..61d6bfcee717 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; -import Tooltip from 'antd/lib/tooltip'; import Icon from '@ant-design/icons'; import { SplitIcon } from 'icons'; import { Canvas } from 'cvat-canvas-wrapper'; import { ActiveControl } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -41,9 +41,9 @@ function SplitControl(props: Props): JSX.Element { }; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx index e877af6c324a..28043cce0a04 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React, { useState } from 'react'; @@ -9,9 +9,9 @@ import Button from 'antd/lib/button'; import Popover from 'antd/lib/popover'; import Text from 'antd/lib/typography/Text'; import { SketchPicker } from 'react-color'; -import Tooltip from 'antd/lib/tooltip'; import getCore from 'cvat-core-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; const core = getCore(); @@ -108,7 +108,7 @@ function ColorPicker(props: Props, ref: React.Ref): JSX.Element { Select color - + - + )} diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx index 47695f06638c..f9fb7070176c 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx @@ -8,12 +8,12 @@ import { CombinedState } from 'reducers/interfaces'; import { LeftOutlined, RightOutlined, EyeInvisibleFilled, EyeOutlined, } from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import Alert from 'antd/lib/alert'; import { Row, Col } from 'antd/lib/grid'; import { changeFrameAsync } from 'actions/annotation-actions'; import { reviewActions } from 'actions/review-actions'; +import CVATTooltip from 'components/common/cvat-tooltip'; export default function LabelsListComponent(): JSX.Element { const dispatch = useDispatch(); @@ -54,17 +54,17 @@ export default function LabelsListComponent(): JSX.Element {
- + - + - + - + - + {issuesHidden ? ( dispatch(reviewActions.switchIssuesHiddenFlag(true))} /> )} - +
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx index 8aa249eeb310..0e7cda1ecd0b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -7,9 +7,9 @@ import { Row, Col } from 'antd/lib/grid'; import { MoreOutlined } from '@ant-design/icons'; import Dropdown from 'antd/lib/dropdown'; import Text from 'antd/lib/typography/Text'; -import Tooltip from 'antd/lib/tooltip'; import { ObjectType, ShapeType, ColorBy } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; import LabelSelector from 'components/label-selector/label-selector'; import ItemMenu from './object-item-menu'; @@ -103,7 +103,7 @@ function ItemTopComponent(props: Props): JSX.Element { - + - + + - + ) : ( ); @@ -118,9 +118,9 @@ function NavigatePrevKeyframe(props: Props): JSX.Element { function NavigateNextKeyframe(props: Props): JSX.Element { const { navigateNextKeyframe, nextKeyFrameShortcut } = props; return navigateNextKeyframe ? ( - + - + ) : ( ); @@ -140,13 +140,13 @@ function SwitchLock(props: Props): JSX.Element { locked, switchLockShortcut, lock, unlock, } = props; return ( - + {locked ? ( ) : ( )} - + ); } @@ -155,26 +155,26 @@ function SwitchOccluded(props: Props): JSX.Element { switchOccludedShortcut, occluded, unsetOccluded, setOccluded, } = props; return ( - + {occluded ? ( ) : ( )} - + ); } function SwitchPinned(props: Props): JSX.Element { const { pinned, pin, unpin } = props; return ( - + {pinned ? ( ) : ( )} - + ); } @@ -184,13 +184,13 @@ function SwitchHidden(props: Props): JSX.Element { } = props; const hiddenStyle = hiddenDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; return ( - + ); } @@ -200,7 +200,7 @@ function SwitchOutside(props: Props): JSX.Element { } = props; const outsideStyle = outsideDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; return ( - + {outside ? ( )} - + ); } @@ -221,13 +221,13 @@ function SwitchKeyframe(props: Props): JSX.Element { } = props; const keyframeStyle = keyframeDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; return ( - + {keyframe ? ( ) : ( )} - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-menu.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-menu.tsx index d27aa05b1b78..933a12836deb 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-menu.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-menu.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -6,7 +6,6 @@ import React from 'react'; import Menu from 'antd/lib/menu'; import Button from 'antd/lib/button'; import Modal from 'antd/lib/modal'; -import Tooltip from 'antd/lib/tooltip'; import Icon, { LinkOutlined, CopyOutlined, @@ -15,9 +14,11 @@ import Icon, { RetweetOutlined, DeleteOutlined, } from '@ant-design/icons'; + import { BackgroundIcon, ForegroundIcon, ResetPerspectiveIcon, ColorizeIcon, } from 'icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; import { ObjectType, ShapeType, ColorBy } from 'reducers/interfaces'; import ColorPicker from './color-picker'; @@ -71,11 +72,11 @@ function MakeCopyItem(props: ItemProps): JSX.Element { const { copyShortcut, pasteShortcut, copy } = toolProps; return ( - + - + ); } @@ -85,11 +86,11 @@ function PropagateItem(props: ItemProps): JSX.Element { const { propagateShortcut, propagate } = toolProps; return ( - + - + ); } @@ -99,11 +100,11 @@ function TrackingItem(props: ItemProps): JSX.Element { const { activateTracking } = toolProps; return ( - + - + ); } @@ -138,12 +139,12 @@ function ToBackgroundItem(props: ItemProps): JSX.Element { const { toBackgroundShortcut, toBackground } = toolProps; return ( - + - + ); } @@ -153,12 +154,12 @@ function ToForegroundItem(props: ItemProps): JSX.Element { const { toForegroundShortcut, toForeground } = toolProps; return ( - + - + ); } @@ -182,12 +183,12 @@ function SwitchColorItem(props: ItemProps): JSX.Element { onVisibleChange={changeColorPickerVisible} resetVisible={false} > - + - + ); @@ -198,7 +199,7 @@ function RemoveItem(props: ItemProps): JSX.Element { const { removeShortcut, locked, remove } = toolProps; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx index 05c1272ace44..1e77e7af2b64 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -12,8 +12,8 @@ import { CaretDownOutlined, CaretUpFilled, } from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; +import CVATTooltip from 'components/common/cvat-tooltip'; import AnnotationsFiltersInput from 'components/annotation-page/annotations-filters-input'; import StatesOrderingSelector from 'components/annotation-page/standard-workspace/objects-side-bar/states-ordering-selector'; import { StatesOrdering } from 'reducers/interfaces'; @@ -41,9 +41,9 @@ function LockAllSwitcher(props: Props): JSX.Element { } = props; return ( - + {statesLocked ? : } - + ); } @@ -54,13 +54,13 @@ function HideAllSwitcher(props: Props): JSX.Element { } = props; return ( - + ); } @@ -69,13 +69,13 @@ function CollapseAllSwitcher(props: Props): JSX.Element { const { statesCollapsed, expandAllStates, collapseAllStates } = props; return ( - + {statesCollapsed ? ( ) : ( )} - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/cursor-control.tsx b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/cursor-control.tsx index b8b634567f56..72b2c99d3f4d 100644 --- a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/cursor-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/cursor-control.tsx @@ -4,11 +4,11 @@ import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { CursorIcon } from 'icons'; import { ActiveControl } from 'reducers/interfaces'; import { Canvas3d as Canvas } from 'cvat-canvas3d-wrapper'; +import CVATTooltip from 'components/common/cvat-tooltip'; interface Props { canvasInstance: Canvas; @@ -20,15 +20,15 @@ function CursorControl(props: Props): JSX.Element { const { activeControl, cursorShortkey } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/move-control.tsx b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/move-control.tsx index 05ddd20a8b32..4a41c6df86c4 100644 --- a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/move-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/move-control.tsx @@ -4,10 +4,10 @@ import React from 'react'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import { MoveIcon } from 'icons'; import { ActiveControl } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; import { Canvas3d as Canvas } from 'cvat-canvas3d-wrapper'; interface Props { @@ -19,15 +19,15 @@ function MoveControl(props: Props): JSX.Element { const { activeControl } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/photo-context.tsx b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/photo-context.tsx index b18b84b86379..f5b9587b0c59 100644 --- a/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/photo-context.tsx +++ b/cvat-ui/src/components/annotation-page/standard3D-workspace/controls-side-bar/photo-context.tsx @@ -2,10 +2,11 @@ // // SPDX-License-Identifier: MIT +import React from 'react'; import CameraIcon from '@ant-design/icons/CameraOutlined'; -import Tooltip from 'antd/lib/tooltip'; + +import CVATTooltip from 'components/common/cvat-tooltip'; import { Canvas3d as Canvas } from 'cvat-canvas3d-wrapper'; -import React from 'react'; import { ActiveControl } from 'reducers/interfaces'; interface Props { @@ -19,7 +20,7 @@ function PhotoContextControl(props: Props): JSX.Element { const { activeControl, contextImageHide, hideShowContextImage } = props; return ( - + - + ); } diff --git a/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx b/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx index 22ca7c9798e9..5bc79ca24064 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx @@ -1,14 +1,14 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; - import { Col } from 'antd/lib/grid'; import Icon from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import Popover from 'antd/lib/popover'; +import CVATTooltip from 'components/common/cvat-tooltip'; + import { FirstIcon, BackJumpIcon, @@ -104,18 +104,18 @@ function PlayerButtons(props: Props): JSX.Element { return ( - + - - + + - + - + - - + + - - + + - + )} > - + {prevButton} - + {!playing ? ( - + - + ) : ( - + - + )} - + - - + + - - + + - + )} > - + {nextButton} - + - + - - + + - + ); } diff --git a/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx b/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx index 65ef51305669..dfe72354c344 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -7,11 +7,11 @@ import React, { useState, useEffect } from 'react'; import { Row, Col } from 'antd/lib/grid'; import { LinkOutlined } from '@ant-design/icons'; import Slider from 'antd/lib/slider'; -import Tooltip from 'antd/lib/tooltip'; import InputNumber from 'antd/lib/input-number'; import Input from 'antd/lib/input'; import Text from 'antd/lib/typography/Text'; +import CVATTooltip from 'components/common/cvat-tooltip'; import { clamp } from 'utils/math'; interface Props { @@ -63,26 +63,26 @@ function PlayerNavigation(props: Props): JSX.Element { - + {frameFilename} - + - + - + - + { - if (typeof value !== 'undefined') { + onChange={(value: number | undefined | string | null) => { + if (typeof value !== 'undefined' && value !== null) { setFrameInputValue(Math.floor(clamp(+value, startFrame, stopFrame))); } }} @@ -93,7 +93,7 @@ function PlayerNavigation(props: Props): JSX.Element { onInputChange(frameInputValue); }} /> - + ); diff --git a/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx b/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx index 7db9b687307a..2ac1339dfcba 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx @@ -5,12 +5,13 @@ import React from 'react'; import { Row, Col } from 'antd/lib/grid'; import { QuestionCircleOutlined } from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import Table from 'antd/lib/table'; import Modal from 'antd/lib/modal'; import Spin from 'antd/lib/spin'; import Text from 'antd/lib/typography/Text'; +import CVATTooltip from 'components/common/cvat-tooltip'; + interface Props { collecting: boolean; data: any; @@ -76,12 +77,12 @@ export default function StatisticsModalComponent(props: Props): JSX.Element { }); const makeShapesTracksTitle = (title: string): JSX.Element => ( - + {title} - + ); const columns = [ diff --git a/cvat-ui/src/components/common/cvat-tooltip.tsx b/cvat-ui/src/components/common/cvat-tooltip.tsx new file mode 100644 index 000000000000..062fedd1ffa2 --- /dev/null +++ b/cvat-ui/src/components/common/cvat-tooltip.tsx @@ -0,0 +1,18 @@ +// Copyright (C) 2021 Intel Corporation +// +// SPDX-License-Identifier: MIT + +import React from 'react'; +import Tooltip, { TooltipProps } from 'antd/lib/tooltip'; + +function CVATTooltip(props: TooltipProps): JSX.Element { + const { children, ...rest } = props; + + return ( + + {children} + + ); +} + +export default React.memo(CVATTooltip); diff --git a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx index 804a87257020..5ac9d3aeeac2 100644 --- a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx +++ b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -7,12 +7,12 @@ import { Row, Col } from 'antd/lib/grid'; import { PercentageOutlined } from '@ant-design/icons'; import Input from 'antd/lib/input'; import Checkbox from 'antd/lib/checkbox'; -import Tooltip from 'antd/lib/tooltip'; import Form, { FormInstance, RuleObject, RuleRender } from 'antd/lib/form'; import Text from 'antd/lib/typography/Text'; +import { Store } from 'antd/lib/form/interface'; +import CVATTooltip from 'components/common/cvat-tooltip'; import patterns from 'utils/validation-patterns'; -import { Store } from 'antd/lib/form/interface'; export interface AdvancedConfiguration { bugTracker?: string; @@ -176,7 +176,7 @@ class AdvancedConfigurationForm extends React.PureComponent { private renderImageQuality(): JSX.Element { return ( - + { > } /> - + ); } private renderOverlap(): JSX.Element { return ( - + { > - + ); } private renderSegmentSize(): JSX.Element { return ( - + - + ); } @@ -329,7 +329,7 @@ class AdvancedConfigurationForm extends React.PureComponent { private renderChunkSize(): JSX.Element { return ( - Defines a number of frames to be packed in a chunk when send from client to server. Server @@ -346,12 +346,11 @@ class AdvancedConfigurationForm extends React.PureComponent { More: 1 - 4 )} - mouseLeaveDelay={0} > - + ); } diff --git a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx index 6330ca00cdfe..30db61c7c7a5 100644 --- a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx +++ b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -10,7 +10,6 @@ import Text from 'antd/lib/typography/Text'; import Paragraph from 'antd/lib/typography/Paragraph'; import Collapse from 'antd/lib/collapse'; import TextArea from 'antd/lib/input/TextArea'; -import Tooltip from 'antd/lib/tooltip'; import copy from 'copy-to-clipboard'; import ErrorStackParser from 'error-stack-parser'; @@ -18,6 +17,7 @@ import { ThunkDispatch } from 'utils/redux'; import { resetAfterErrorAsync } from 'actions/boundaries-actions'; import { CombinedState } from 'reducers/interfaces'; import logger, { LogType } from 'cvat-logger'; +import CVATTooltip from 'components/common/cvat-tooltip'; import consts from 'consts'; interface StateToProps { @@ -146,7 +146,7 @@ class GlobalErrorBoundary extends React.PureComponent {
  • - + {/* eslint-disable-next-line */} { @@ -157,7 +157,7 @@ class GlobalErrorBoundary extends React.PureComponent { Copy {' '} - + the error message to clipboard
  • diff --git a/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx b/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx index 8e97274297bd..32c56dd7677e 100644 --- a/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx +++ b/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx @@ -1,12 +1,12 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import { EditOutlined, CloseOutlined } from '@ant-design/icons'; -import Tooltip from 'antd/lib/tooltip'; import Text from 'antd/lib/typography/Text'; +import CVATTooltip from 'components/common/cvat-tooltip'; import consts from 'consts'; import { Label } from './common'; @@ -25,7 +25,7 @@ export default function ConstructorViewerItem(props: ConstructorViewerItemProps) return (
    {label.name} - + - + {label.id < 0 && ( - + - + )}
    ); diff --git a/cvat-ui/src/components/labels-editor/label-form.tsx b/cvat-ui/src/components/labels-editor/label-form.tsx index e8e7388069aa..4d7639524dfc 100644 --- a/cvat-ui/src/components/labels-editor/label-form.tsx +++ b/cvat-ui/src/components/labels-editor/label-form.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -8,12 +8,12 @@ import Icon, { CloseCircleOutlined, PlusOutlined } from '@ant-design/icons'; import Input from 'antd/lib/input'; import Button from 'antd/lib/button'; import Checkbox from 'antd/lib/checkbox'; -import Tooltip from 'antd/lib/tooltip'; import Select from 'antd/lib/select'; import Form, { FormInstance } from 'antd/lib/form'; import Badge from 'antd/lib/badge'; import { Store } from 'antd/lib/form/interface'; +import CVATTooltip from 'components/common/cvat-tooltip'; import ColorPicker from 'components/annotation-page/standard-workspace/objects-side-bar/color-picker'; import { ColorizeIcon } from 'icons'; import patterns from 'utils/validation-patterns'; @@ -132,17 +132,27 @@ export default class LabelForm extends React.Component { const type = attr ? attr.input_type.toUpperCase() : AttributeType.SELECT; return ( - + - + ); } @@ -168,7 +178,7 @@ export default class LabelForm extends React.Component { }; return ( - + { dropdownStyle={{ display: 'none' }} /> - + ); } @@ -199,14 +209,14 @@ export default class LabelForm extends React.Component { const value = attr ? attr.values[0] : 'false'; return ( - + - + ); } @@ -281,7 +291,7 @@ export default class LabelForm extends React.Component { const value = attr ? attr.mutable : false; return ( - + { Mutable - + ); } @@ -301,7 +311,7 @@ export default class LabelForm extends React.Component { const locked = attr ? attr.id >= 0 : false; return ( - + - + ); } @@ -407,7 +417,7 @@ export default class LabelForm extends React.Component { private renderDoneButton(): JSX.Element { return ( - + - + ); } @@ -427,7 +437,7 @@ export default class LabelForm extends React.Component { if (label) return null; return ( - + - + ); } @@ -446,7 +456,7 @@ export default class LabelForm extends React.Component { const { onSubmit } = this.props; return ( - + - + ); } @@ -469,7 +479,7 @@ export default class LabelForm extends React.Component { {() => ( - + - + )} diff --git a/cvat-ui/src/components/labels-editor/labels-editor.tsx b/cvat-ui/src/components/labels-editor/labels-editor.tsx index a95ed14df5eb..df92fc416feb 100644 --- a/cvat-ui/src/components/labels-editor/labels-editor.tsx +++ b/cvat-ui/src/components/labels-editor/labels-editor.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -6,12 +6,12 @@ import './styles.scss'; import React from 'react'; import Tabs from 'antd/lib/tabs'; import Button from 'antd/lib/button'; -import Tooltip from 'antd/lib/tooltip'; import notification from 'antd/lib/notification'; import Text from 'antd/lib/typography/Text'; import copy from 'copy-to-clipboard'; import { CopyOutlined, EditOutlined, BuildOutlined } from '@ant-design/icons'; +import CVATTooltip from 'components/common/cvat-tooltip'; import RawViewer from './raw-viewer'; import ConstructorViewer from './constructor-viewer'; import ConstructorCreator from './constructor-creator'; @@ -195,7 +195,7 @@ export default class LabelsEditor extends React.PureComponent + - + )} > { - + - + - + - + diff --git a/cvat-ui/src/components/model-runner-modal/detector-runner.tsx b/cvat-ui/src/components/model-runner-modal/detector-runner.tsx index db757867c138..2c049fe8b587 100644 --- a/cvat-ui/src/components/model-runner-modal/detector-runner.tsx +++ b/cvat-ui/src/components/model-runner-modal/detector-runner.tsx @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -8,7 +8,6 @@ import { Row, Col } from 'antd/lib/grid'; import { CloseCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import Select from 'antd/lib/select'; import Checkbox, { CheckboxChangeEvent } from 'antd/lib/checkbox'; -import Tooltip from 'antd/lib/tooltip'; import Tag from 'antd/lib/tag'; import Text from 'antd/lib/typography/Text'; import InputNumber from 'antd/lib/input-number'; @@ -19,6 +18,8 @@ import { OptionData, OptionGroupData } from 'rc-select/lib/interface'; import { Model, StringObject } from 'reducers/interfaces'; +import CVATTooltip from 'components/common/cvat-tooltip'; + import { clamp } from 'utils/math'; import consts from 'consts'; import { DimensionType } from '../../reducers/interfaces'; @@ -93,7 +94,7 @@ function DetectorRunner(props: Props): JSX.Element { onChange: (label: string) => void, ): JSX.Element { return ( - +