User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs:vision:image_tagging:start [2018/02/28 08:00]
Ryan Summers
cs:vision:image_tagging:start [2022/02/18 23:09] (current)
Chris Nathman [labelImg]
Line 2: Line 2:
 ====== Image Tagging ====== ====== Image Tagging ======
  
-===== Sloth ===== 
  
----- +===== labelImg =====
-=== Setup === +
-In order to tag images, we use a piece of software called Sloth. To install it from the robosub debian repository, run the following command:+
  
-  sudo aptitude install sloth+For complete details on using labelImg, see [[https://​github.com/​tzutalin/​labelImg]].
  
----- +We use labelImg to tag objects in images. labelImg ​can be installed with pip with the command ​''​pip3 install labelImg''​Once installed you can run ''​labelImg''​ from a terminalWhen running labelImg with no arguments, you will have to use the labelImg interface ​to select and image or directory ​to open, and you will need to type in labels manuallyBecause ​of this it can be more efficient ​to run labelImg with image_directory and predefined_classes argumentsIf you have a dataset with images ​in a directory called ''​images''​ and a label file called ''​labels.txt'',​ you can run labelImg as shown below to open the image directory ​and have a list of labels to select ​from:
-=== Using Sloth === +
-To use sloth and start tagging ​images, you can run the following ​command. +
- +
-  sloth -c /​path/​to/​vision_dev/​sloth/​robosub_config.py /path/to/​annotation/​file +
- +
-*-c* Is a flag to give the path to a configuration file. This file is provided in the vision_dev/​sloth ​directory. The path you provide should point to this file. +
- +
-The last argument is a path to an annotation file. This is most likely named something like `labels.json`. You will need to provide this path in order to tag images. +
- +
-Should you find this tedious, there is a script in the sloth directory of the vision_dev repository which performs some of this for you. It can be used as follows: +
- +
-  ./​robosub_sloth.sh /path/to/​annotation/​file +
- +
-This removes the need to add the -c flag repeatedlyThis script can also be symlinked to without issues. +
- +
----- +
- +
-=== Sloth Keybindings === +
- +
-The full list of keybindings used in sloth can be found in the [[https://​github.com/​PalouseRobosub/​vision_dev/​blob/​master/​sloth/​robosub_config.py|robosub_config.py]] ​file near the bottomA shorthand list is provided ​below +
- +
-**__Default keybindings__** +
- +
-<WRAP group> +
-<WRAP 20% column>​ +
-  * **Space** +
-  * **Backspace** +
-  * **PgDown** +
-  * **PgUp** +
-  * **Tab** +
-  * **Shift+Tab** +
-  * **Ctrl+f** +
-  * **Del** +
-  * **Esc** +
-  * **Shift+l** +
-  * **Shift+c** +
-</​WRAP>​ +
-<WRAP column>​ +
-Mark image as labeled/​confirmed and go to next\\ +
-Next image/​frame\\ +
-Previous image/​frame\\ +
-Previous image/​frame\\ +
-Select next annotation\\ +
-Select previous annotation\\ +
-Fit current image/frame into window\\ +
-Delete selected annotations\\ +
-Exit insert mode\\ +
-Mark current image as labeled\\ +
-Mark all annotations in image as confirmed +
-</​WRAP>​ +
-</​WRAP>​ +
- +
- +
-**__Robosub Specific__** +
- +
-<WRAP group> +
-<WRAP 20% column>​ +
-  * **F5** +
-  * **Ctrl+Shift+Del** +
-  * **c** +
-  * **n** +
-</​WRAP>​ +
-<WRAP column>​ +
-Toggle the visibility of label names on annotation boxes\\ +
-Delete all annotations from the current ​image and mark it as unlabeled\\ +
-Copy all annotations ​from the previous image to this one\\ +
-Mark image as labeled/​confirmed and copy annotations to next image. \\ +
-(Equivalent to **Space** then **c**) +
-</​WRAP>​ +
-</​WRAP>​ +
- +
-**__Annotations__** +
-<WRAP group> +
-<WRAP 20% column>​ +
-  * **s** +
-  * **p** +
-  * **t** +
-  * **1** +
-  * **2** +
-  * **3** +
-  * **4** +
-  * **5** +
-  * **6** +
-</​WRAP>​ +
-<WRAP column>​ +
-Start Gate Post\\ +
-Path Marker\\ +
-Torpedo Target\\ +
-Die 1\\ +
-Die 2\\ +
-Die 3\\ +
-Die 4\\ +
-Die 5\\ +
-Die 6 +
-</​WRAP>​ +
-</​WRAP>​ +
- +
----- +
-=== Sloth Mouse Controls === +
- +
-While creating annotations,​ the following are useful mouse controls. +
- +
- +
-  * **Right Click and Drag** +
- +
-<WRAP indent>​ +
-<WRAP indent>​ +
-Resize an annotation. Resizing is based upon the quadrant of the annotation clicked on. +
-</​WRAP>​ +
-</​WRAP>​ +
- +
-  * **Ctrl+Left Click** +
- +
-<WRAP indent>​ +
-<WRAP indent>​ +
-Select multiple annotations at once. +
-</​WRAP>​ +
-</​WRAP>​+
  
 +  labelImg images labels.txt