Skip to content

Commit

Permalink
Some documentation added for skeletons feature (#4925)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Sep 9, 2022
1 parent d7eb742 commit f9a2e27
Show file tree
Hide file tree
Showing 16 changed files with 125 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: 'Annotation with skeletons'
linkTitle: 'Annotation with skeletons'
weight: 12
description: 'Guide to creating and editing skeletons.'
---


Skeletons should be used as annotations `templates` when you need to annotate complex objects sharing the same structure
(e.g. human pose estimation, facial landmarks, etc.).
A skeleton consist of any number of points (also called as elements), joined or not joined by edges.
Any point itself is considered like an individual object with its own attributes and properties
(like color, occluded, outside, etc). At the same time a skeleton point can exist only within the parent skeleton.

Any skeleton elements can be hidden (by marking them `outside`) if necessary (for example if a part is out of a frame).
Currently there are two formats which support exporting skeletons: CVAT & COCO.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: "Creating the skeleton"
linkTitle: "Creating the skeleton"
weight: 1
---

#### Initial skeleton setup

Unlike other CVAT objects, to start annotating using skeletons, first of all you need to setup a skeleton.
You can do that in the label configurator during creating a task/project, or later in created instances.

So, start by clicking `Setup skeleton` option:

![](/images/image-setup-skeleton-1.jpg)

Below the regular label form where you need to add a name, and setup attributes if necessary,
you will see a drawing area with some buttons aside:

![](/images/image-skeleton-configurator-overview.jpg)

- PUT AN IMAGE AS A BACKGROUND - is a helpful feature you can use to draw a skeleton template easier,
seeing an example - object you need to annotate in the future.
- PUT NEW SKELETON POINTS - is activated by default.
It is a mode where you can add new skeleton points clicking the drawing area.
- DRAW AN EDGE BETWEEN TWO POINTS - in this mode you can add an edge,
clicking any two points, which are not joined yet.
- REMOVE A DRAWN SKELETON POINTS - in this mode clicking a point will remove the point and all attached edges.
You can also remove an edge only, it will be highligted as red on hover.
- DOWNLOAD DRAWN TEMPLATE AS AN .SVG - you can download setup configuration to use it in future
- UPLOAD A TEMPLATE FROM AN .SVG FILE - you can upload previously downloaded configuration

Let's draw an exampe skeleton - star. After the skeleton is drawn, you can setup each its point.
Just hover the point, do right mouse click and click `Configure`:

![](/images/image-skeleton-drawn-example.jpg)

Here you can setup a point name, its color and attributes if necessary like for a regular CVAT label:

![](/images/image-skeleton-point-setup.jpg)

Press `Done` button to finish editing the point. Press `Continue` button to save the skeleton.
Continue creating a task/project in a regular way.

For an existing task/project you are not allowed to change a skeleton configuration for now.
You can copy/insert skeletons configuration using `Raw` tab of the label configurator.

#### Drawing a skeleton from rectangle

In opened job go to left sidebar and find `Draw new skeleton` control, hover it:

![](/images/image-draw-new-skeleton.jpg)

If the control is absent, be sure you have setup at least one skeleton in the corresponding task/project.
In a pop-up dropdown you can select between a skeleton `Shape` and a skeleton `Track`, depends on your task.
Draw a skeleton as a regular bounding box, clicking two points on a canvas:

![](/images/image-draw-new-skeleton.gif)

Well done, you've just created the first skeleton.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: 'Editing the skeleton'
linkTitle: 'Editing the skeleton'
weight: 2
---

#### Editing skeletons on the canvas

A drawn skeleton is wrapped by a bounding box for a user convenience.
Using this wrapper the user can edit the skeleton as a regular bounding box, by dragging, resizing, or rotating:

![](/images/skeleton_editing_canvas.gif)

Moreover, each the skeleton point can be dragged itself. After dragging, the wrapping bounding box is
adjusted automatically, other points are not affected:

![](/images/skeleton_editing_canvas-2.gif)

You can use `Shortcuts` on both a skeleton itself and its elements.
- Hover the mouse cursor over the bounding box to apply a shortcut on the whole skeleton
(like lock, occluded, pinned, keyframe and outside for skeleton tracks)
- Hover the mouse cursor over one of skeleton points to apply a shortcut to this point
(the same shortcuts list, but **outside is available also for a skeleton shape elements**)

#### Editing skeletons on the sidebar

Using the sidebar is another way to setup skeleton properties, and attributes.
It works a similar way, like for other kinds of objects supported by CVAT, but with some changes:

- A user is not allowed to switch a skeleton label
- `Outside` property is always available for skeleton elements (it does not matter if they are tracks or not)
- Additional collapse is available for a user, to see a list of skeleton parts

<div style="display: flex; align-items: flex-start;">
<img src="/images/image-skeleton-track-sidebar.jpg" width="300px" />
<img src="/images/image-skeleton-shape-sidebar.jpg" width="300px" />
</div>


9 changes: 7 additions & 2 deletions site/content/en/docs/manual/basics/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ In tab `Workspace` you can:

- `Attribute annotation mode (AAM) zoom margin` input box — defines margins (in px)
for shape in the attribute annotation mode.
- Click `Save` to save settings (settings will be saved on the server and will not change after the page is refreshed).
Click `Cancel` or press `F2` to return to the annotation.

- `Control points size` — defines a size of any interactable points in the tool
(polygon's vertexes, rectangle dragging points, etc.)

- `Default number of points in polygon approximation`
With this setting, you can choose the default number of points in polygon.
Works for serverless interactors and OpenCV scissors.

- Click `Save` to save settings (settings will be saved on the server and will not change after the page is refreshed).
Click `Cancel` or press `F2` to return to the annotation.

5 changes: 4 additions & 1 deletion site/content/en/docs/manual/basics/types-of-shapes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ There are several shapes with which you can annotate your images:
- `Ellipse`
- `Cuboid`
- `Cuboid in 3d task`
- `Skeleton`
- `Tag`

And there is how they all look like:
Expand All @@ -23,6 +24,8 @@ And there is how they all look like:

![](/images/image240_mapillary_vistas.jpg 'Ellipse') ![](/images/image015_detrac.jpg 'Cuboid')

![](/images/image218_carla_town3.jpg 'Cuboid in 3d task') ![](/images/image135.jpg 'Tag')
![](/images/image218_carla_town3.jpg 'Cuboid in 3d task') ![](/images/image_skeleton_sample.jpg 'Skeleton')

![](/images/image135.jpg 'Tag')

`Tag` - has no shape in the workspace, but is displayed in objects sidebar.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/content/en/images/image-setup-skeleton-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/content/en/images/image_skeleton_sample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f9a2e27

Please sign in to comment.