Commit 568a88f4 authored by André Anjos's avatar André Anjos 💬

[doc] Improve guide formatting and help options

parent 9e605ae5
Pipeline #26491 passed with stages
in 12 minutes and 53 seconds
......@@ -29,73 +29,99 @@ use it to view annotations only, you will not be able to edit the keypoints.
Keyboard shortcuts
------------------
? : opens a dialog with this help message
``?``
opens a dialog with this help message
a | Zero | <KP_Zero> : places new point under pointer cursor, on the currently
active (annotation) object
``a | Zero | <KP_Zero>``
places new point under pointer cursor, on the currently active (annotation)
object
i | <Shift>-Zero | <Shift>-KP_Zero : inserts new point on a currently active
object, before the current active point
``i | <Shift>-Zero | <Shift>-KP_Zero``
inserts new point on a currently active object, before the current active
point
d | <Del> : deletes the currently active point on the currently active object
(marked in different color)
``d | <Del>``
deletes the currently active point on the currently active object (marked in
different color)
o : edit the next object
``o``
edits the next object
O : edit the previous object
``O``
edits the previous object
m : toogle current object between "polygon" and "line" modes
``m``
toogles current object between "polygon" and "line" modes
c : creates a new (annotation) object
``c``
creates a new (annotation) object
D : deletes current (annotation) object
``D``
deletes current (annotation) object
X : deletes all annotated objects
``X``
deletes all annotated objects
n : moves to the next image
``n``
moves to the next image
p : moves to the previous image
``p``
moves to the previous image
s : saves current annotations
``s``
saves current annotations
q : quits the application, saving annotations for the current image
``q``
quits the application, saving annotations for the current image
<Alt> : Temporarily shows line connections or polygon decorations (while
pressed)
``<Alt>``
Temporarily shows line connections or polygon decorations (while pressed)
<Esc> : Quits the application **without saving**
``<Esc>``
Quits the application **without saving**
Annotation movement
-------------------
N.B.: Only works with the last annotated point (or the one closest to pointer)
.. note:: Only works with the last annotated point (or the one closest to
pointer)
h | Left : moves active annotation by 1 pixel to the left
``h | Left``
moves active annotation by 1 pixel to the left
l | Right : moves active annotation by 1 pixel to the right
``l | Right``
moves active annotation by 1 pixel to the right
k | Up : moves active annotation by 1 pixel up
``k | Up``
moves active annotation by 1 pixel up
j | Down : moves active annotation by 1 pixel down
``j | Down``
moves active annotation by 1 pixel down
<Shift> + motion keys : moves active annotation by 5 pixels on that direction
``<Shift> + motion keys``
moves active annotation by 5 pixels on that direction
Pointer shortcuts
-----------------
N.B.: Tested with a mouse. Trackpads do not normally offer these keys.
.. note:: Tested with a mouse. Trackpads do not normally offer these keys.
<Left> : places new annotation under the pointer cursor
``<Left>``
places new annotation under the pointer cursor
<Shift>-<Left> : inserts new annotation before the current annotation
``<Shift>-<Left>``
inserts new annotation before the current annotation
<Right> : deletes the currently active annotation
``<Right>``
deletes the currently active annotation
<Wheel Down> : moves to the next image
``<Wheel Down>``
moves to the next image
<Wheel Up> : moves to the previous image
``<Wheel Up>``
moves to the previous image
"""
......
......@@ -4,10 +4,10 @@
Annotator Guide
=================
This guide explains in a step by step, how to annotate images using the
built-in annotation app. We will use an example image from Lenna_ for this
tutorial. The annotator app is agnostic to images and can load anything that
is supported by :py:mod:`bob.io.image`.
This guide explains step by step, how to annotate images using the built-in
annotation app. We will use an example image from Lenna_ for this tutorial.
The annotator app is agnostic to images and can load anything that is supported
by :py:mod:`bob.io.image`.
Image annotation
......@@ -23,6 +23,7 @@ containing the image you would like to annotate:
$ conda activate myenv
(myenv) $ bob annotate -vv /path/to/images /path/to/annotations
The output path, marked on the above example with ``/path/to/annotations`` is
the directory where annotated points will be written to. This path is created
if it does not exist. If it does exist, annotations are preloaded for each
......@@ -31,10 +32,10 @@ the point it was stopped.
The app will scan for image files with a given extension name (``.png`` by
default) on the input path provided (e.g.: ``/path/to/images``). Images will
then be displayed in order, one after the other so you can annotate or review
their annotation. Annotations are saved to the output directory copying the
*same folder structure* found on the input path. For example, if the images
were lying like this on the input path:
then be sorted and displayed in alphabetical order, one after the other so you
can annotate or review their annotation. Annotations are saved to the output
directory copying the *same folder structure* found on the input path. For
example, if the images were lying like this on the input path:
.. code-block:: text
......@@ -58,8 +59,8 @@ Annotation format
Annotations are saved in JSON_ format, which is easily readable and loadable in
a variety of programming environments. The specific format used by the
annotator app may change, but it essentially just lists annotated points, in
the order objects are created.
annotator application may change, but it essentially just lists annotated
points, in the order objects are created.
Zoom
......@@ -89,6 +90,9 @@ application with a zoom factor of ``2.0`` do:
resizing the drawing window. The higher the zoom factor, the more precise
will be your annotation. Conversely, the lower, the less precise.
Currently, the application does not support automatic window resizing, but
it is a feature we are planning to add.
Further help
------------
......@@ -101,9 +105,11 @@ app:
(myenv) $ bob annotate --help
Annotating images
-----------------
Read the annotator application help message, which lists all known keyboard and
pointer/mouse bindings. Familiarise yourself with these shortcuts as that
improves annotation performance, reducing the time you spend annotating images.
You can check the contents of the help dialog through this documentation,
looking at the docstring of the :py:mod:`bob.ip.annotator.gui` module.
.. todo:: This section still needs to be created
.. include:: links.rst
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment