-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Semi-automatic tools enhancements (Client-side points minimizer) #3450
Conversation
This is a feature you requested, please provide your feedback. @dvkruchinin |
@bsekachev thank you, we'll take a look. |
Sure. I'll prepare a test. Unfortunately, it will not be possible to do this for OpenCV yet, since the problem of losing the Content-Length header is not solved if OpenCV is loaded from the browser under the control of Cypress. |
@nmanovic Here you can see errors in tests we discussed last meeting |
@dvkruchinin , could you please look at problems with tests in the PR? |
|
...c/components/annotation-page/standard-workspace/controls-side-bar/approximation-accuracy.tsx
Outdated
Show resolved
Hide resolved
@bsekachev , it will be great to apply the approxPolyDP function for existing polygons somehow in the future. For example, how to reduce the number of points for Mask RCNN? |
@bsekachev , looks like a natural idea to have "done" button directly on the slider. It is more visible. But I'm not sure. |
I can't reproduce the problem locally or in a fork. This could probably be related to internal problems of the github actions virtual environment. |
Looks like OpenCV can return it after approximation (event despite of "closed" flag equals to true). I am not sure we should strict it because in this case we can only return original points, but it is not clear for a user (users shift slider to less points, but unexpectedly they get all the points).
Done |
These ideas are bound each other, because in current implementation "Done" button exists when drawing all polyshapes, but the slider does not. Right now I would suggest leaving as is beacuse I don't have ideas how it should be implemented in UI for all the cases (exactly when it should appear and disappear, how it should work with drawing (when we need Done button, but a user is not assumed to create extra points to be minimized), or with editing (when we could need minimize points after detectors, but done button is not supposed to be used), etc. |
@nmanovic Done |
Every interaction with DEXTR leads to the problem below. Probably need to check the threshold value.
|
if (approxPolyMaxDistance > 0) { | ||
if (approxPolyMaxDistance <= 8) { | ||
// −2.75x+7y+1=0 linear made from two points (1; 0.25) and (8; 3) | ||
threshold = (2.75 * approxPolyMaxDistance - 1) / 7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the threshold be negative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If approxPolyAccuracy == 13, it will be -1/7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, approxPolyMaxDistance is an integer >= 1 and <= 8 in this piece of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if approxPolyAccuracy == 13, then approxPolyMaxDistance == 0 and the condition in line 35 is false
Could you please provide more details (image, points, threshold), because I can't reproduce it. |
Use the video file: https://github.com/opencv/opencv/blob/master/samples/data/vtest.avi?raw=true, try to annotate people using DEXTR. |
Maybe just give me points that DEXTR returns to client and be sure you pull the latest changes (I committed all the changes) |
@bsekachev , I will merge. But I cannot pull dots from extreme points (less and more). |
Motivation and context
Related #2936
Related #2515
New setting:
On the fly working:
How has this been tested?
Manual testing
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.