Skip to content

Commit

Permalink
1.1 doc updates (#1110)
Browse files Browse the repository at this point in the history
* Create release-110.md

Add release notes blog for 1.1

* Update export.md

Adding YOLO export format.

* Update labeling.md

Adding details on image labeling enhancements/use case

* Update release-110.md

Updating blog ID

* Remove references to annotation_ids

* Adding it back in

super stealth like

* Update release-110.md

* Move annotation_ids to the correct spot

* Add release blog to index.html

* Update labeling.md

* Update release-110.md

Adding more details to blog post

* Update predictions.md

placeholder for updated predictions section

* Update token info

* Blog updates and gifs

* Update predictions to be accurate

* Smaller gifs and updating blog post

* Update release-110.md

Add newsletter reference

* Update export.md

Add clarification about YOLO format

* Fixing missed image

* Update images for blog

Updating to gif instead of png

* Update release-110.md

Adding explicit height and width to images
  • Loading branch information
smoreface authored Jun 30, 2021
1 parent e3431c8 commit 536f604
Show file tree
Hide file tree
Showing 14 changed files with 343 additions and 17 deletions.
15 changes: 15 additions & 0 deletions docs/source/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@
<!-- </a> -->
<!-- </div> -->


<!-- Release 1.1.0 -->
<div class="column">
<a href="/blog/release-110.html">
<div class="card">
<div class="image-wrap">
<div style="background-image: url(/images/release-110/multi-labeling.gif); background-size:cover" class="image"></div>
</div>
<div class="category">release notes</div>
<div class="desc">30 June 2021, 3 min read</div>
<div class="title">Label Studio v1.1 is now available!</div>
</div>
</a>
</div>

<!-- Publish NLP labeling blog -->
<div class="column">
<a href="/blog/Ten-important-considerations-for-NLP-labeling.html">
Expand Down
97 changes: 97 additions & 0 deletions docs/source/blog/release-110.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Label Studio v1.1 is now available!
type: blog
image: /images/release-110/multi-labeling.gif
order: 93
meta_title: Label Studio Release Notes 1.1.0
meta_description: Release notes and information about Label Studio version 1.1.0, with improved data labeling functionality for image annotations and object character recognition (OCR) labeling for machine learning projects.
---

Label Studio version 1.1 is now available, delivering on our promises in our [public roadmap](https://github.com/heartexlabs/label-studio/blob/master/roadmap.md).

Our main focus for this release was to improve the image annotation experience, whether you're adding shapes, bounding boxes, drawing brush masks, or performing optical character recognition (OCR) with images.

<br/><img src="/images/release-110/label-multiple-regions.gif" alt="Gif of adding polygons and rectangle regions and then labeling them to an aerial image of a city in the Label Studio UI." class="gif-border" width="800px" height="425px" />

Read on for the exciting highlights of this release!

## Performance improvements

We want Label Studio to be faster and more responsive when adding bounding boxes and shapes to images, so this release includes performance optimizations. Now you can add hundreds of bounding boxes to an image without significant user interface delays.

## Quickly create any type of image region

If you want to combine different types of regions in your image annotations, now you can!

Draw whichever shapes or masks that make sense for your images, from rectangles, ellipses, and polygons, to brush masks or keypoints!

You can combine the different types of Control tags in the labeling configuration that you create for the labeling interface, like the following example:

```xml
<View>
<Image name="image" value="$image" />
<Rectangle name="rect" toName="image" />
<Ellipse name="ellipse" toName="image" />
<KeyPoint name="kp" toName="image" />
<Polygon name="polygon" toName="image" />
<Brush name="brush" toName="image" />
<Labels name="labels" toName="image" fillOpacity="0.5" strokeWidth="5">
<Label value="Building" background="green"></Label>
<Label value="Vehicle" background="blue"></Label>
<Label value="Pavement" background="red"></Label>
</Labels>
</View>
```

Then, you can use the multi-tool selector to choose whether to add a rectangle, ellipse, keypoint, polygon, or brush region to the image.

<br/><img src="/images/release-110/multi-labeling.gif" alt="Gif of adding polygons and brush labels to an aerial image of a city in the Label Studio UI." class="gif-border" width="800px" height="519px" />

See more in [Advanced image labeling](/guide/labeling.html#Advanced-image-labeling).

## Quickly create, hide, and remove regions

With this added flexibility in adding regions comes faster labeling! You can now add a rectangle or an ellipse to your image with just two clicks, or double click to create a polygon, rectangle, or ellipse.

If you accidentally select a point on an image while creating a polygon, just double click to remove the erroneous point and continue creating the region. You need to have at least three polygon points to be able to remove one.

<br/><img src="/images/release-110/deletepolygonpoint.gif" alt="Gif of drawing a polygon and removing an accidental point of the polygon on an image in the Label Studio UI." class="gif-border" />

While you could previously show or hide regions one by one, now you can toggle the visibility of all regions at once, or hide all regions for a specific label. This makes it easier for you to create overlapping regions and look at specific labeled regions together.

## Import partial predictions and finish labeling in Label Studio

If you perform data annotation in stages or with different groups of annotators, you might want to separate creating regions with bounding boxes and brushes, from assigning labels to those regions. With Label Studio 1.1, that's now possible!

You can now separate creating regions from assigning labels, which means you can import predicted bounding boxes or polygons from a machine learning model, then correct the placement of the detected objects and finish labeling them in Label Studio. This workflow is perfect for two-step labeling, where you want one annotator, or a machine learning model, to create regions and another annotator to label the regions.

<br/><img src="/images/release-110/label-predicted-regions.gif" alt="Gif of labeling unlabeled rectangular, polygonal, and elliptical regions using the Label Studio UI." class="gif-border" width="800px" height="535px" />

For example, if you have a machine learning model to perform object detection that identifies regions of interest in images, you can upload those predictions to Label Studio and have human annotators apply labels to those regions of interest. If you're doing that with OCR, you can use a machine learning model to identify which regions in an image have text, and then add those predictions to Label Studio and have human annotators transcribe the recognized text.

For more details and example JSON formats, see [Import pre-annotated data into Label Studio](/guide/predictions.html#Import-pre-annotated-regions-for-images). To create regions yourself, see [Advanced image labeling](/guide/labeling.html#Advanced-image-labeling).

## YOLO export support
Label Studio now supports exporting annotations in YOLO labeling format, which is especially helpful for image annotations. Read more in [Export annotations and data from Label Studio](/guide/export.html#YOLO).

## OCR improvements

Beyond the expanded image annotation functionality, we've also improved support for OCR labeling for when you're extracting text from images.

<br/><img src="/images/release-110/OCR-example.gif" alt="Gif of adding recognized text in the sidebar after adding a rectangle bounding box on a receipt for a cotton canvas bag in the Label Studio UI." class="gif-border" width="800px" height="524px" />

Write the text for a selected region in the sidebar, rather than at the bottom of the labeling interface, making it easier to see all the recognized text regions that you've identified and transcribed.

## Stay in touch

Sign up for the [Label Studio Newsletter](https://labelstudio.substack.com/) to find out about new features, tips for using Label Studio, and information about machine learning research and best practices.










9 changes: 9 additions & 0 deletions docs/source/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ See the [API reference documentation](/api) for further guidance and interactive

### Authenticate to the API

You must retrieve your access token so that you can authenticate to the API.

1. In the Label Studio UI, click the user icon in the upper right.
2. Click **Account & Settings**.
3. Copy the access token.
Expand All @@ -23,6 +25,13 @@ In your first API call, specify the access token in the headers:
curl -X <method> <Label Studio URL>/api/<endpoint> -H 'Authorization: Token <token>'
```

You can also retrieve the access token using the command line.
1. From the command line, run the following:
```bash
label-studio user --username <username>
```
2. In the output returned in your terminal, the token for the user is listed as part of the user info.

See [API documentation for authentication](/api#section/Authentication).

### List all projects
Expand Down
4 changes: 4 additions & 0 deletions docs/source/guide/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Export audio transcription labels for automatic speech recognition as the JSON m
{“audio_filepath”: “/path/to/audio.wav”, “text”: “the transcription”, “offset”: 301.75, “duration”: 0.82, “utt”: “utterance_id”, “ctm_utt”: “en_4156”, “side”: “A”}
```

### YOLO

Export object detection annotations in the YOLOv3 format. You must have at least one `RectangleLabels` or similar object detection annotations present in your labeling configuration to use the YOLO export format.


## Label Studio JSON format of annotated tasks

Expand Down
66 changes: 66 additions & 0 deletions docs/source/guide/labeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,70 @@ For example, keep a label selected after creating a region, display labels on bo

You can also modify the layout of the screen, hide or show predictions, annotations, or the results panel, and hide or show various controls and buttons.

## Advanced image labeling

If you want to perform advanced image labeling, follow these examples and guidance for assistance.

### Add multiple types of regions to image annotations

You can add multiple types of regions to image annotations. You can add any of the following:
- Rectangles
- Ellipses
- Keypoints
- Polygons
- Brush masks

To add different types of regions to your image annotations, follow this example.

Create a custom template for your labeling interface using the following example:
```xml
<View>
<Image name="image" value="$image" />
<Rectangle name="rect" toName="image" />
<Ellipse name="ellipse" toName="image" />
<KeyPoint name="kp" toName="image" />
<Polygon name="polygon" toName="image" />
<Brush name="brush" toName="image" />
<Choices name="choices" toName="image">
<Choice value="yes"></Choice>
<Choice value="no"></Choice>
</Choices>
<Labels name="labels" toName="image" fillOpacity="0.5" strokeWidth="5">
<Label value="building" background="green"></Label>
<Label value="vehicle" background="blue"></Label>
</Labels>
</View>
```

This example makes rectangles, ellipses, polygons, keypoints, and brush masks available to the annotator, along with image classification choices of yes and no, and region labels of building and vehicle.

### Faster image labeling

You can add a rectangle or an ellipse to your image with just two clicks, or double click to create a polygon, rectangle, or ellipse.

If you accidentally select a point on an image while creating a polygon, just double click to remove the erroneous point and continue creating the region. There must be at least three points on the polygon to be able to remove a point.

### Create regions without labels

When you're annotating images, you can create regions without applying labels.

1. Create a region by double-clicking or clicking and dragging to create a bounding box, or click the points necessary to construct a polygon.
2. Select the created region in the sidebar or on the image.
3. Select the label that you want to apply to the region.
4. Repeat these steps for any regions that you want to create.

This can be helpful for two-step labeling, where you want one annotator to create regions and another annotator to label the regions.

By default, regions without labels appear gray.

### Erase brush mask labels

If you make a mistake when labeling with the brush mask, you can erase it. You must select a brush region in the sidebar before you can erase any part of it.

If you want to completely remove a region and start over, delete the region instead of erasing it. Erasing a region does not delete it.





<!-- md annotation_ids.md -->
134 changes: 134 additions & 0 deletions docs/source/guide/predictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,140 @@ Import pre-annotated tasks into Label Studio [using the UI](tasks.html#Import-da
In the Label Studio UI, the imported prediction for this task looks like the following:
<center><img src="../images/predictions_loaded.png" alt="screenshot of the Label Studio UI showing an image of airplanes with bounding boxes covering each airplane." style="width: 100%; max-width: 700px"></center>

## Import pre-annotated regions for images

If you want to import images with pre-annotated regions without labels assigned to them, follow this example.

Use the following labeling configuration:
```xml
<View>
<View style="display:flex;align-items:start;gap:8px;flex-direction:row">
<Image name="image" value="$image" zoom="true" zoomControl="true" rotateControl="false"/>
<Rectangle name="rect" toName="image" showInline="false"/>
</View>
<Ellipse name="ellipse" toName="image"/>
<KeyPoint name="kp" toName="image"/>
<Polygon name="polygon" toName="image"/>
<Brush name="brush" toName="image"/>
<Labels name="labels" toName="image" fillOpacity="0.5" strokeWidth="5">
<Label value="Vehicle" background="green"/>
<Label value="Building" background="blue"/>
<Label value="Pavement" background="red"/>
</Labels>
</View>
```

After you set up an example project, create example tasks that match the following format.

<br/>
{% details <b>Click to expand the example image region JSON</b> %}
Save this example JSON as a file to import it into Label Studio, for example, `example_prediction_task.json`.

{% codeblock lang:json %}
[{
"id":8,
"predictions":[
{
"id":10,
"result":[
{
"original_width":800,
"original_height":450,
"image_rotation":0,
"value":{
"x":55.46666666666667,
"y":2.3696682464454977,
"width":35.86666666666667,
"height":46.91943127962085,
"rotation":0
},
"id":"ABC",
"from_name":"rect",
"to_name":"image",
"type":"rectangle"
},
{
"original_width":800,
"original_height":450,
"image_rotation":0,
"value":{
"x":58.4,
"y":64.21800947867298,
"width":30.533333333333335,
"height":19.90521327014218,
"rotation":0
},
"id":"DEF",
"from_name":"rect",
"to_name":"image",
"type":"rectangle"
},
{
"original_width":800,
"original_height":450,
"image_rotation":0,
"value":{
"points":[
[
20.933333333333334,
28.90995260663507
],
[
25.866666666666667,
64.69194312796209
],
[
38.4,
62.796208530805686
],
[
34.13333333333333,
27.488151658767773
]
]
},
"id":"GHI",
"from_name":"polygon",
"to_name":"image",
"type":"polygon"
},
{
"original_width":800,
"original_height":450,
"image_rotation":0,
"value":{
"x":8.4,
"y":20.14218009478673,
"radiusX":4,
"radiusY":7.109004739336493,
"rotation":0
},
"id":"JKL",
"from_name":"ellipse",
"to_name":"image",
"type":"ellipse"
}
],
"task":8
}
],
"data":{
"image":"/data/upload/31159626248_d0362d027c_c.jpg"
},
"project":4
}]
{% endcodeblock %}

In this example there are 3 regions inside 1 result field for a prediction, or pre-annotation:
- region `ABC` - a rectangle bounding box
- region `DEF` - a second rectangle bounding box
- region `GHI` - a polygonal segmentation
- region `JKL` - an ellipse
None of the regions have labels applied. The labeling configuration must use the `Rectangle` tag instead of the `RectangleLabels` tag to support this type of prediction. Even though the labeling configuration for this example has a `Labels` tag, the predictions do not need to specify labels for the regions.

{% enddetails %}
<br/>

<!-- md image_units.md -->

## Import pre-annotations for text
Expand Down
Loading

0 comments on commit 536f604

Please sign in to comment.