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 hotkeys to change labels #3070

Merged
merged 12 commits into from
Apr 7, 2021
Merged

Added hotkeys to change labels #3070

merged 12 commits into from
Apr 7, 2021

Conversation

bsekachev
Copy link
Member

@bsekachev bsekachev commented Apr 6, 2021

Motivation and context

Resolved #2990
Resolved #2317

From design

Task: Hotkeys for labels.
Solution: Add key selector button to labels panel in the left sidebar. Clicking on the button will open popover with number selection for 0-9. Unpresented labels will be covered with opacity. [Num key + some modifier key] handler will be added to the standard workspace.

I suppose it should change a label of activated object or change a label to create the next object if no any objects activated

Screenshot from 2021-04-06 20-11-24

Screenshot from 2021-04-06 18-24-12

HOW TO USE?

Activate (or deactivate if need to change default label) object and press Ctrl+Num (0...9)
Default binding can be changed like shown on the screenshot below

How has this been tested?

Manual testing

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@bsekachev bsekachev added the enhancement New feature or request label Apr 6, 2021
@coveralls
Copy link

coveralls commented Apr 6, 2021

Coverage Status

Coverage increased (+0.05%) to 74.175% when pulling 1d54500 on dk/label-hotkeys into d2a1d12 on develop.

@bsekachev bsekachev changed the title [WIP] Added hotkeys to change labels Added hotkeys to change labels Apr 6, 2021
@bsekachev bsekachev requested a review from nmanovic as a code owner April 6, 2021 18:36
@bsekachev bsekachev mentioned this pull request Apr 6, 2021
6 tasks
@bsekachev
Copy link
Member Author

Hi @dvkruchinin
We need tests to cover these changes. Three test cases are expected:

  1. Change label for an activated object
  2. Change default label (label before creating N)
  3. Change shortcut for a label and then one of two previous items

@bsekachev bsekachev mentioned this pull request Apr 6, 2021
2 tasks
@dvkruchinin
Copy link
Contributor

Hi @bsekachev

We need tests to cover these changes. Three test cases are expected:

  1. Change label for an activated object
  2. Change default label (label before creating N)
  3. Change shortcut for a label and then one of two previous items

A test will be prepared.

@bsekachev bsekachev merged commit 7524202 into develop Apr 7, 2021
@nmanovic nmanovic deleted the dk/label-hotkeys branch April 7, 2021 11:25
@nstolyarov
Copy link

@bsekachev hello!
Thank you for this feature. It works well, but I've found some bug with label name visualization. When you change label either with hotkeys or with gui tool, the label's color changes properly, but its name becomes unchanged. It changes only when you reload image.

I am using the following version: [develop] Some client code refactoring ( #3077 )

@bsekachev
Copy link
Member Author

bsekachev commented Apr 9, 2021

Hi @nstolyarov

Just tried it again and it worked for me:
Peek 2021-04-09 15-36

I use the same commit. Could you please provide more details?
Do you have any errors on the browser console?

@nstolyarov
Copy link

nstolyarov commented Apr 12, 2021

Hi @bsekachev , I've found the reason of this.

It happens if I have Always show object details flag enabled in the settings. It works fine if flag is disabled.

@bsekachev
Copy link
Member Author

@nstolyarov

Got it, thanks. It will be fixed.

@bsekachev
Copy link
Member Author

@nstolyarov

Fixed by #3084

@baroly2020
Copy link

Hi @bsekachev, My Cvat is not show hotkeys in tab labels, How to added hotheys to change labels? I tried downloaded your code and replace folder cvat on my pc but it still doesn't show up, I'm not developer so I don't know what to do. I am sorry to trouble you. Thank u so much.
Screenshot 2021-04-13 164755

@bsekachev
Copy link
Member Author

Hi @baroly2020
Need to perform almost the same steps as for initial installation.

First of all update the code:

git checkout develop
git pull origin develop

or redownload .zip, extract and replace all the files if you do not use git.

Then rebuild the images and restart the containers. By default this command would be:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

@ronzhin-dmitry
Copy link

Is it possible to use this hotkey feature in Attribute annotation mode? Or some sort of fast label-change in the mentioned mode, except for up and down arrows (i.e. if the list of classes is too long they are not very useful)?

Also, is it possible to quickly delete annotation from attribute annotation mode (by pressing delete for example)?

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 this pull request may close these issues.

Fix polygon crop behaviour Add shortcuts for changing the current label
7 participants