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

Add switcher to polygon cut behaviour (auto cut - user choice) #2961

Closed
2 tasks done
nstolyarov opened this issue Mar 16, 2021 · 4 comments · Fixed by #3021
Closed
2 tasks done

Add switcher to polygon cut behaviour (auto cut - user choice) #2961

nstolyarov opened this issue Mar 16, 2021 · 4 comments · Fixed by #3021
Labels
enhancement New feature or request

Comments

@nstolyarov
Copy link

My actions before raising this issue

I am trying to edit a polygon by holding down the shift key and drawing a line inside the polygon. This is how I try to cut off a part of the polygon. When I click on the last point of the new line, I want to select which part to keep. There is such a function and it is described in the User Guide, but in reality it works once in five. In other cases, a smaller part is removed. In doing so, I do the same thing.

pic

Expected Behaviour

At the end of the polygon editing, it becomes possible to choose which part to leave.

Current Behaviour

When you finish editing a polygon, the smaller part is removed almost always. In some cases it works correctly, but we haven't found such right conditions.

Possible Solution

Fix this problem.

Context

It is very important feature for our project.

Your Environment

  • Git hash commit (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 docker version (e.g. Docker 17.0.05): 20.10.5
  • Are you using Docker Swarm or Kubernetes? No
  • Operating System and version (e.g. Linux, Windows, MacOS): GNU/Linux Ubuntu
    4.15.0-136-generic
    x86_64
@bsekachev
Copy link
Member

bsekachev commented Mar 16, 2021

Hi @nstolyarov

It is not a bug actually.
In the most of cases CVAT decides itself what part of polygon should be cut. In the past CVAT always left a choice for a user, but there were issues where users didn't like the behavior #1579 #1515.

Now it works in the following way:

Two criteria are computed to decide which part of a polygon should be cut during editing automatically. The first criteria is a number of cut points. The second criteria is a length of a cut curve. If both criteria recommend to cut the same part, algorithm works automatically, if not, a user asked to make a choice.

Related PR #1921

@nmanovic nmanovic added the enhancement New feature or request label Mar 16, 2021
@nmanovic nmanovic added this to the Backlog milestone Mar 16, 2021
@nstolyarov
Copy link
Author

Is it possible to add some toggle switch for choosing between smart and old version of editing?

@bsekachev
Copy link
Member

@nstolyarov

Yes, it is possible.

@bsekachev bsekachev changed the title Polygon editor bug Add switcher to polygon cut behaviour (auto cut - user choice) Mar 17, 2021
@jahaniam
Copy link
Contributor

Thanks for having this . Choosing automatically was also annoying to me sometimes. Toggle helps.

bsekachev pushed a commit that referenced this issue Mar 29, 2021
* Added switcher to maintain poylgon crop behaviour (#2961)

* Updated versions & changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants