-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Hole cutting in polygons #2958
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
Comments
Hi, @nstolyarov Please, use additional "background" class to create "holes" in polygons. Just draw it over a polygon object and then dump The idea is that polygon with a hole is not a polygon anymore, it is a mask or another complex object (we cannot represent holes using only coordinate number sequences). CVAT does not support masks and I do not expect it will in the nearest future (if only community is ready to contribute). Currently I will close the issue because it is dublicate of #1849 and #2384. |
@bsekachev, thank you for answer. But as I said there is the problem with "background" class. It seems reasonable to use it, but when I add a label "background" (or any other name) with RGB(0,0,0) any other classes override this one on SegmentationClass mask if we dump annotations via Segmentation mask 1.1. Even if I move it to foreground with "+" hotkey. |
@zhiltsov-max Could you please comment on this? I also tried to dump a task with a couple of polygons and in case of dumping to CVAT Images it works as expected, but in case of dumping to SegmentationMask I get an archive without any masks. |
Here is the second example but I have label "Trash" with RGB(1,1,1) instead of "background" RGB(0,0,0) It can work but you need to use other tools for changing pixels color after dump. Maybe it is not a bad idea to make "background" label be able in foreground layer? |
@zhiltsov-max could you please provide your commit id? |
@nstolyarov, can you check if the fix in open-edge-platform/datumaro#188 resolves the problem for you? It should allow exporting of masks with How to test:
Examples: I have a task with such config: Exported masks But you're right about high overhead of using this functionality. |
@zhiltsov-max, hi! I tried to do it but unfortunately I still have no "background" over objects of other classes. My steps:
Maybe I do something wrong when fully rebuilding containers? |
@nstolyarov, in step 3 try to rebuild with |
@zhiltsov-max hi! |
@nstolyarov, thanks for testing and confirming it works in the |
My actions before raising this issue
There is no way to cut holes in polygons. Sometimes there may be a foreign object on the surface to be marked, which must be removed. Now this can only be done using the complex action shown in the video. The same video shows an example of how this is done in other software. An attempt to add a separate class for marking in black (RGB 000) also failed, because CVAT does not display black on the result mask.
Expected Behaviour
Get the ability to cut holes in polygons.
Current Behaviour
No normal ability to cut holes in polygons.
Possible Solution
This can be done, for example, by adding an operation to subtract one polygon from another. Alternatively, you can add the Background class, which can be used to mark up objects that are not subject to markup.
Context
Cutting is a very common operation in our project. The current cutting method is very time consuming.
Your Environment
git log -1
): commit 7a2dcff (HEAD -> develop, origin/develop, origin/HEAD)Author: Anastasia Yasakova [email protected]
Date: Tue Mar 9 10:41:33 2021 +0300
docker version
(e.g. Docker 17.0.05): 20.10.54.15.0-136-generic
x86_64
The text was updated successfully, but these errors were encountered: