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

Remove annotations #1061

Closed

Conversation

Priya4607
Copy link
Contributor

Issue #33
Included a button Remove Annotation (remove all annotations in a single frame or a range of frames) which prompts for user input, a user can enter a frame number number or a range of frames by prescribing startvalue,endvalue and press okay. In case the user enters three numbers each followed by a comma, it displays an alert message. This removes all annotations inside the range that users specifies.
I did not alter the functionality of original Remove Annotation button just changed the name to Remove all Annotations.
Tasks:
-[x] clears history of removed annotations
-[x] removes annotations for a range of frames / a single frame
-[ ] save work

Issues: I need some clarity on shapes under class shapeCollectionModel in cvat/apps/engine/static/engine/js/shapeCollection.js. I understand that boxmodels are stored as an array in shapes. I'm not sure I understand how to reference them with the frames if that's possible so that particular boxmodel can be removed when Remove Annotation is invoked. Whenever I try to save the changes I am not able to see the changes, as it retains the original work. How should I proceed from here? Could you please shed some light on this issue?

@nmanovic
Copy link
Contributor

@Priya4607 , thanks for the PR. We appreciate your time but the PR cannot be accepted. Next version of UI is coming (https://github.com/opencv/cvat/tree/develop/cvat-ui). It will be completely rewritten (ReactJS + Antd). It is already available in develop branch but it isn't enabled by default. If you can move the feature into the new UI we will be glad to accept it.

@nmanovic nmanovic closed this Jan 16, 2020
@Priya4607
Copy link
Contributor Author

@nmanovic Any suggestions on how should I proceed further if I were to move up the features to a new UI. Would be glad if you could help me with the files I should be dealing with to solve issue #33 .

@nmanovic
Copy link
Contributor

nmanovic commented Jan 17, 2020

@Priya4607 , in general there are a couple of similar issues. In one case you want to delete objects in a range of frames. In another case you want to delete objects by a condition (e.g. with a specific label or attribute). Thus it is better to delete by a filter and a range of frames it is only one filter criteria. But it can be a starting point.

You need to add specific code into cvat-core to remove annotations: https://github.com/opencv/cvat/tree/develop/cvat-core/

After that you need to add a button and a dialog into cvat-ui and call cvat-core to actually remove annotations: https://github.com/opencv/cvat/tree/develop/cvat-ui

cvat-core is a js client library and acts as a proxy between cvat-ui and cvat-server. cvat-ui implements the new UI.

@Priya4607
Copy link
Contributor Author

@nmanovic thanks for the response, I am not able to view the new UI, I did update my local by git pull upstream develop and did the following:
cd cvat
cd cvat-core && npm install
cd ../cvat-ui && npm install
cd ../cvat-canvas && npm install
cd ../cvat-ui
npm start
inside the virtual environment,
python manage.py migrate
python manage.py runserver 0:7000

On opening http://localhost:3000/ and navigating to open the job of a task, I don't see the UI changes in the Annotation page, it still looks the same.
Annotation UI

I had a look at the mock up of annotation page. Is the new UI being run on a different port? How should I be able to see the new UI?

And regarding the filter, is it already available in the new UI?

@nmanovic
Copy link
Contributor

@Priya4607 ,

  • filter for annotations is available now.
  • New UI is not visible by default. You should specify URL explicitly /tasks/<task id>/jobs/<job id>

@Priya4607
Copy link
Contributor Author

@nmanovic ,
As you said filter for annotation is available now, but I don't see filter(that allows one to select objects by condition) for annotations in the new UI. Could you provide some clarity, as in where it is available exactly?
As you pointed out it is better to use filter to delete objects, I was thinking about using filter to specify criteria that selects labels/attributes/all objects in a range of frame instead of all frames. And then adding a delete button beside the filter, which prompts for user confirmation. I'm not sure about its feasibility, please present your views whenever possible.

@nmanovic
Copy link
Contributor

@Priya4607 , sorry for misleading. I said "filter for annotations is available now". A common filter should be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants