Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added paint brush tools #4543

Merged
merged 134 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
8a7edce
Temporary commit
bsekachev Mar 18, 2022
0fba641
Merge branch 'develop' into bs/masks
bsekachev Mar 23, 2022
3f38997
Merge branch 'develop' into bs/masks
bsekachev Mar 24, 2022
e54b279
tmp
bsekachev Mar 25, 2022
23905d6
Basic usage of fabric.js
bsekachev Mar 28, 2022
7a2dd8c
Implemented continuation
bsekachev Mar 29, 2022
ec2cd8d
Implemented polygon tools
bsekachev Mar 30, 2022
be391b1
Merge branch 'develop' into bs/masks
bsekachev Apr 2, 2022
742030f
Draggable, resizable masks
bsekachev Apr 2, 2022
0da5bdb
Relative positioning
bsekachev Apr 2, 2022
2cbf076
Initial remove underlying pixels
bsekachev Apr 4, 2022
54dcdf6
Adjusted drawing, editing. Saving on the server, improved cvat-core part
bsekachev Apr 5, 2022
9869ec2
Initial editing implemented
bsekachev Apr 5, 2022
4d761e1
Added dump/upload using cvat format
bsekachev Apr 5, 2022
7b8e54d
Occluded for masks
bsekachev Apr 5, 2022
5fd93fc
Upgraded lint-staged
bsekachev Aug 1, 2022
2538f9b
Upgraded eslint-plugin-jest
bsekachev Aug 1, 2022
abfe434
Upgraded types@node
bsekachev Aug 1, 2022
3be9db6
Upgraded typescript-eslint/parser
bsekachev Aug 1, 2022
5e184db
Upgraded typescript-eslint/eslint-plugin
bsekachev Aug 1, 2022
3aab6f4
Merged develop
bsekachev Aug 1, 2022
78ad22f
Merged develop
bsekachev Aug 1, 2022
c1f8fe1
Merged develop
bsekachev Aug 1, 2022
7e59415
Some features adjustments
bsekachev Aug 2, 2022
68df962
Some code refactoring
bsekachev Aug 3, 2022
51dcca3
tmp
bsekachev Aug 4, 2022
0415609
Merged develop, implemented draw marker for ROI
bsekachev Aug 4, 2022
60e05c5
Better position handling
bsekachev Aug 4, 2022
9fd18cc
Remove underlying pixels in cvat-core
bsekachev Aug 4, 2022
b16a5a4
Masks transformation
bsekachevv Apr 11, 2022
aab1be8
tmp
bsekachev Aug 9, 2022
79e3b0d
Merge branch 'develop' into bs/masks
bsekachev Aug 9, 2022
af1e15b
Fix show empty tasks (#100)
Marishka17 Aug 19, 2022
75ba69b
[Snyk] Upgrade dotenv-webpack from 7.1.1 to 8.0.0 (#98)
azhavoro Aug 19, 2022
ab9281b
Merged develop
bsekachev Aug 23, 2022
93412ca
Merge branch 'develop' into bs/masks
bsekachev Aug 23, 2022
d89bdde
Merged develop
bsekachev Sep 12, 2022
1218279
Merged develop
bsekachev Sep 13, 2022
ac219e4
Resolved conflict in icons
bsekachev Sep 15, 2022
219cfbe
Merge branch 'develop' into bs/masks
bsekachev Sep 16, 2022
7acf0ee
Merge branch 'develop' into bs/masks
bsekachev Sep 22, 2022
c85f471
Some code refactoring
bsekachev Sep 25, 2022
92c9894
ML model refactoring
bsekachev Sep 25, 2022
39ad8cc
Fixed removing underlying pixels
bsekachev Sep 25, 2022
a6f7d28
Redone edit, resize
bsekachev Sep 25, 2022
5e0bf9c
Support advanced editing
bsekachev Sep 26, 2022
7870ba3
Added menu item for editing
bsekachev Sep 26, 2022
b78fe68
Support for different colorization settings
bsekachev Sep 26, 2022
8cc9ed0
Implemented bitmap for masks
bsekachev Sep 26, 2022
024b788
Minor performance optimizations
bsekachev Sep 26, 2022
3e2c611
Updated license headers
bsekachev Sep 26, 2022
bdb8187
Added statistics for masks
bsekachev Sep 27, 2022
277395c
Merge branch 'develop' into bs/masks
bsekachev Sep 27, 2022
57b0b0a
Removed fill tool (useless)
bsekachev Sep 27, 2022
50db78c
Multiple fixes
bsekachev Sep 27, 2022
30daaeb
Changing brush size like in photoshop
bsekachev Sep 28, 2022
9fcf8ea
Added info message
bsekachev Sep 28, 2022
2ddc5fa
Fixed some issues, returning a mask from dextr
bsekachev Sep 28, 2022
e7de228
Canvas configured to show intermediate shape mask
bsekachev Sep 28, 2022
930e760
Added missed file
bsekachev Sep 29, 2022
6008ccb
Merge branch 'develop' into bs/masks
bsekachev Sep 29, 2022
ad9e225
Implemented masks pipeline for detectors
bsekachev Sep 29, 2022
2c42574
Fixed filtration in some cases and adjusting brush tool
bsekachev Sep 29, 2022
866aa78
Fixed editing opacity
bsekachev Sep 29, 2022
415ab2d
Fixed some issues during editing
bsekachev Sep 29, 2022
56407aa
Copy/paste
bsekachev Oct 3, 2022
1a017c8
Merge branch 'develop' into bs/masks
bsekachev Oct 3, 2022
f1862f2
Fixed several issues
bsekachev Oct 3, 2022
fa4345e
Updated icons
bsekachev Oct 3, 2022
66180d7
Fixed import from cvat for videos
bsekachev Oct 3, 2022
e8c430b
Fixed export in segmentaiton mask format
bsekachev Oct 3, 2022
55e7239
Fixed selection & opacity when creating a first mask
bsekachev Oct 4, 2022
725aa24
Restricted merging for masks
bsekachev Oct 4, 2022
5f3bd5f
Fixed grouping a bit
bsekachev Oct 4, 2022
9680d9f
Merged develop
bsekachev Oct 5, 2022
86db29f
Server option for import masks as polygons
bsekachev Oct 5, 2022
f7947ee
Added UI option
bsekachev Oct 6, 2022
aaf22dd
Couple of minor fixes
bsekachev Oct 6, 2022
97d1a3a
Fixed for a project
bsekachev Oct 6, 2022
48408d6
Fixed opacity after uploading annotations to a job
bsekachev Oct 6, 2022
7f97a89
Some format fixes
bsekachev Oct 7, 2022
000150d
Added kwargs to COCO format
bsekachev Oct 7, 2022
64a9a49
Merged develop
bsekachev Oct 7, 2022
2bd3b07
Fixed copy/paste issues
bsekachev Oct 7, 2022
9efe0ef
Fixed a couple of cypress tests
bsekachev Oct 7, 2022
619ce01
Fixed issue with editing
bsekachev Oct 7, 2022
e296ab0
Fixed UI fail when there is no labels
bsekachev Oct 7, 2022
12f01c3
Fixed one cypres test
bsekachev Oct 7, 2022
93425d1
Fixed scss issues
bsekachev Oct 10, 2022
d4dbefa
Fixed pylint issues
bsekachev Oct 10, 2022
4af1dbe
Fixed cypres test
bsekachev Oct 10, 2022
343cf9e
Adjusted tests stability
bsekachev Oct 10, 2022
3ea71ca
Fixed case 13
bsekachev Oct 10, 2022
24655c8
Fixed case 108
bsekachev Oct 10, 2022
d605b33
Fixed copy/paste cypress test
bsekachev Oct 10, 2022
56e8305
Fixed some eslint issues in cvat-canvas & cvat-ui
bsekachev Oct 10, 2022
a1994a9
Fixed some ICDAR formats
bsekachev Oct 10, 2022
ee53105
Fixed datumaro 3D format
bsekachev Oct 10, 2022
389adeb
Added missed argument
bsekachev Oct 10, 2022
5fa560a
Added some interactors versioning
bsekachev Oct 10, 2022
fc9a311
Removed brush blinking
bsekachev Oct 10, 2022
9e2d923
Merged develop
bsekachev Oct 12, 2022
a8c2cec
Applied some comments
bsekachev Oct 12, 2022
853414a
Fixed changing color
bsekachev Oct 12, 2022
119306e
Fixed issue with drawing on a rotated canvas
bsekachev Oct 14, 2022
d746f09
Remove underlying pixels while editing
bsekachev Oct 14, 2022
5431163
Minor fix with underlying pixels order
bsekachev Oct 14, 2022
6401a65
Removed extra comment
bsekachev Oct 14, 2022
f7680a0
Allowed 1pixel masks
bsekachev Oct 14, 2022
4516877
Fixed issue with brush marker disappearing
bsekachev Oct 17, 2022
605a037
Renamed some variables for clearness
bsekachev Oct 17, 2022
604e183
Merged develop
bsekachev Oct 17, 2022
9671b2b
Updated changelog
bsekachev Oct 17, 2022
5cc2050
Updated versions
bsekachev Oct 17, 2022
19f173b
Added shared transformation logic
bsekachev Oct 18, 2022
41728a1
Fixed changelog file
bsekachev Oct 18, 2022
51cf104
Update serverless functions (#5067)
yasakova-anastasia Oct 18, 2022
f2baf68
Added tooltips, removed cursor
bsekachev Oct 18, 2022
65a2115
Merge branch 'bs/masks' of github.com:opencv/cvat into bs/masks
bsekachev Oct 18, 2022
d236fa6
Merged develop
bsekachev Oct 18, 2022
06fed0b
Some optimizations
bsekachev Oct 19, 2022
c38fa28
More optimizations
bsekachev Oct 19, 2022
7d432f6
Merged develop
bsekachev Oct 21, 2022
3e0aadb
Re-used vector drawing
bsekachev Oct 23, 2022
8e118bb
Merge branch 'develop' into bs/masks
bsekachev Oct 24, 2022
a36195f
Several minor fixes & improvements
bsekachev Oct 24, 2022
d3b3c4a
Hiding a component instead of disabling
bsekachev Oct 24, 2022
801e95a
Minor refactoring
bsekachev Oct 24, 2022
201901b
stopping drawing a polygon using double N
bsekachev Oct 24, 2022
88ea69d
Fixed import
bsekachev Oct 24, 2022
547065d
Fixed test
bsekachev Oct 24, 2022
74892f0
Merged develop
bsekachev Oct 26, 2022
0417038
Merge branch 'develop' into bs/masks
bsekachev Nov 1, 2022
7e9371f
Merge branch 'develop' into bs/masks
nmanovic Nov 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Objects sorting option in the sidebar, by z order. Additional visualization when the sorting is applied
(<https://github.com/opencv/cvat/pull/5145>)
- Added YOLOv5 serverless function NVIDIA GPU support (<https://github.com/opencv/cvat/pull/4960>)
- Mask tools are supported now (brush, eraser, polygon-plus, polygon-minus, returning masks
from online detectors & interactors) (<https://github.com/opencv/cvat/pull/4543>)
- Added Webhooks (<https://github.com/opencv/cvat/pull/4863>)

### Changed
Expand Down
4 changes: 3 additions & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.15.4",
"version": "2.16.0",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand All @@ -17,6 +17,8 @@
],
"dependencies": {
"@types/polylabel": "^1.0.5",
"@types/fabric": "^4.5.7",
"fabric": "^5.2.1",
"polylabel": "^1.1.0",
"svg.draggable.js": "2.2.2",
"svg.draw.js": "^2.0.4",
Expand Down
11 changes: 10 additions & 1 deletion cvat-canvas/src/scss/canvas.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corp
// Copyright (C) 2022 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -72,6 +72,10 @@ polyline.cvat_shape_drawing_opacity {
fill: darkmagenta;
}

image.cvat_canvas_shape_grouping {
visibility: hidden;
}

.cvat_canvas_shape_region_selection {
@extend .cvat_shape_action_dasharray;
@extend .cvat_shape_action_opacity;
Expand Down Expand Up @@ -340,6 +344,11 @@ g.cvat_canvas_shape_occluded {
height: 100%;
}

.cvat_masks_canvas_wrapper {
z-index: 3;
display: none;
}

#cvat_canvas_attachment_board {
position: absolute;
z-index: 4;
Expand Down
7 changes: 7 additions & 0 deletions cvat-canvas/src/typescript/canvas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -8,6 +9,7 @@ import {
MergeData,
SplitData,
GroupData,
MasksEditData,
InteractionData as _InteractionData,
InteractionResult as _InteractionResult,
CanvasModel,
Expand Down Expand Up @@ -38,6 +40,7 @@ interface Canvas {

interact(interactionData: InteractionData): void;
draw(drawData: DrawData): void;
edit(editData: MasksEditData): void;
group(groupData: GroupData): void;
split(splitData: SplitData): void;
merge(mergeData: MergeData): void;
Expand Down Expand Up @@ -129,6 +132,10 @@ class CanvasImpl implements Canvas {
this.model.draw(drawData);
}

public edit(editData: MasksEditData): void {
this.model.edit(editData);
}

public split(splitData: SplitData): void {
this.model.split(splitData);
}
Expand Down
12 changes: 12 additions & 0 deletions cvat-canvas/src/typescript/canvasController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -15,6 +16,7 @@ import {
Mode,
InteractionData,
Configuration,
MasksEditData,
} from './canvasModel';

export interface CanvasController {
Expand All @@ -24,6 +26,7 @@ export interface CanvasController {
readonly focusData: FocusData;
readonly activeElement: ActiveElement;
readonly drawData: DrawData;
readonly editData: MasksEditData;
readonly interactionData: InteractionData;
readonly mergeData: MergeData;
readonly splitData: SplitData;
Expand All @@ -35,6 +38,7 @@ export interface CanvasController {

zoom(x: number, y: number, direction: number): void;
draw(drawData: DrawData): void;
edit(editData: MasksEditData): void;
interact(interactionData: InteractionData): void;
merge(mergeData: MergeData): void;
split(splitData: SplitData): void;
Expand Down Expand Up @@ -91,6 +95,10 @@ export class CanvasControllerImpl implements CanvasController {
this.model.draw(drawData);
}

public edit(editData: MasksEditData): void {
this.model.edit(editData);
}

public interact(interactionData: InteractionData): void {
this.model.interact(interactionData);
}
Expand Down Expand Up @@ -143,6 +151,10 @@ export class CanvasControllerImpl implements CanvasController {
return this.model.drawData;
}

public get editData(): MasksEditData {
return this.model.editData;
}

public get interactionData(): InteractionData {
return this.model.interactionData;
}
Expand Down
Loading