You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/guide/export.md
+85-73Lines changed: 85 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,70 +9,105 @@ meta_description: Label Studio documentation for exporting data labeling annotat
9
9
10
10
At any point in your labeling project, you can export the annotations from Label Studio.
11
11
12
-
Label Studio stores your annotations in a raw JSON format in the SQLite database backend, PostGreSQL database backend, or whichever cloud or database storage you specify as target storage. Cloud storage buckets contain one file per labeled task named as `task_id.json`. See [Cloud storage setup](storage.html) for more details about syncing target storage.
12
+
Label Studio stores your annotations in a raw JSON format in the SQLite database backend, PostgreSQL database backend, or whichever cloud or database storage you specify as target storage. Cloud storage buckets contain one file per labeled task named `task_id.json`. For more information about syncing target storage, see [Cloud storage setup](storage.html).
13
+
14
+
Image annotations exported in JSON format use percentages of overall image size, not pixels, to describe the size and location of the bounding boxes. For more information, see [how to convert the image annotation units](#Units-of-image-annotations).
13
15
14
-
Image annotations exported in JSON format use percentages of overall image size, not pixels, to describe the size and location of the bounding boxes. See [how to convert the image annotation units](#Units-of-image-annotations).
15
16
16
17
## Export data from Label Studio
17
18
18
19
Export your completed annotations from Label Studio.
19
20
20
-
> Some export formats export only the annotations and not the data from the task. See the [export formats supported by Label Studio](#Export-formats-supported-by-Label-Studio).
21
+
!!! note
22
+
Some export formats export only the annotations and not the data from the task. For more information, see the [export formats supported by Label Studio](#Export-formats-supported-by-Label-Studio).
21
23
22
24
### Export using the UI in Community Edition of Label Studio
23
25
24
-
You can export data and annotations from the Label Studio UI.
26
+
Use the following steps to export data and annotations from the Label Studio UI.
25
27
26
28
1. For a project, click **Export**.
27
29
2. Select an available export format.
28
30
3. Click **Export** to export your data.
29
31
30
-
#### Notes
31
-
* Export will always include the annotated tasks, regardless of filters set on the tab.
32
-
* Cancelled annotated tasks will be included in the exported result too.
33
-
* If you want to apply tab filters to the export, try to use [export snapshots using the SDK](https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_snapshot_create) or [API](#Export-snapshots-using-the-API).
34
-
* If the export times out, see how to [export snapshots using the SDK](https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_snapshot_create) or [API](#Export-snapshots-using-the-API).
32
+
!!! note
33
+
1. The export will always include the annotated tasks, regardless of filters set on the tab.
34
+
2. Cancelled annotated tasks will be included in the exported result too.
35
+
3. If you want to apply tab filters to the export, try to use [export snapshots using the SDK](https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_snapshot_create) or [API](#Export-snapshots-using-the-API).
36
+
37
+
#### Export timeout in Community Edition
38
+
39
+
If the export times out, see how to [export snapshots using the SDK](https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_snapshot_create) or [API](#Export-snapshots-using-the-API).
35
40
36
41
### <iclass='ent'></i> Export snapshots using the UI
37
42
38
43
In Label Studio Enterprise, create a snapshot of your data and annotations. Create a snapshot to export exactly what you want from your data labeling project. This delayed export method makes it easier to export large labeling projects from the Label Studio UI.
39
44
40
45
1. Within a project in the Label Studio UI, click **Export**.
41
46
2. Click **Create New Snapshot**.
42
-
3.For **Export from...**, select the option for **All Tasks**. The default option is THIS.
43
-
4.For**Include in the Snapshot...**, choose which type of data you want to include in the snapshot. Select **All tasks**, **Only annotated** tasks, or **Only reviewed** tasks.
44
-
5.For **Annotations**, enable the types of annotations that you want to export. You can specify **Annotations**, **Ground Truth**annotations, and**Skipped**annotations. By default, only annotations are exported.
45
-
6.(Optional) Add a **Snapshot Name** to make it easier to find in the future. By default, export snapshots are named `PROJECT-NAME-at-YEAR-MM-DD-HH-MM`, where the time is in UTC.
46
-
7.For **Drafts**, choose whether to export the complete draft annotations for tasks, or only the IDs of draft annotations, to indicate that drafts exist.
47
-
8.For **Predictions**, choose whether to export the complete predictions for tasks, or only the IDs of predictions to indicate that the tasks had predictions.
48
-
9. (Optional) Enable the option to remove annotator emails to anonymize your result dataset.
47
+
3.**Apply filters from tab ...**: Select **Default** from the drop-down list.
48
+
4.(Optional)**Snapshot Name**: Enter a snapshot name to make it easier to find in the future. By default, export snapshots are named `PROJECT-NAME-at-YEAR-MM-DD-HH-MM`, where the time is in UTC.
49
+
5.**Include in the Snapshot…**: Choose which type of data you want to include in the snapshot. Select **All tasks**, **Only annotated**tasks, or**Only reviewed**tasks.
50
+
6.**Drafts**: Choose whether to export the complete draft annotations (**Complete drafts**) for tasks, or only the IDs (**Only IDs**) of draft annotations, to indicate that drafts exist.
51
+
7.**Predictions**: Choose whether to export the complete predictions (**Complete predictions**) for tasks, or only the IDs (**Only IDs**) of predictions to indicate that the tasks had predictions.
52
+
8.**Annotations**: Enable the types of annotations that you want to export. You can specify **Annotations**, **Ground Truth** annotations, and **Skipped** annotations. By default, only annotations are exported.
53
+
9. (Optional) Enable the **Remove user details** option to remove the user's details.
49
54
10. Click **Create a Snapshot** to start the export process.
50
-
11. You see the list of snapshots available to download, with details about what is included in the snapshot and when and by whom it was created.
51
-
12. Click **Download** and select the export format that you want to use. The snapshot file downloads to your computer.
55
+
11. You see the list of snapshots available to download, with details about what is included in the snapshot, when it was created, and who created it.
56
+
12. Click **Download** and select the export format that you want to use. Now, the snapshot file downloads to your computer.
52
57
53
58
### Export using the API
59
+
54
60
You can call the Label Studio API to export annotations. For a small labeling project, call the [export endpoint](/api#operation/api_projects_export_read) to export annotations.
55
61
56
62
### Export snapshots using the API
63
+
57
64
For a large labeling project with hundreds of thousands of tasks, do the following:
58
65
1. Make a POST request to [create a new export file or snapshot](/api#operation/api_projects_exports_create). The response includes an `id` for the created file.
59
-
2.[Check the status of the export file creation](/api#operation/api_projects_exports_read) using the `id` as the `export_pk`.
66
+
2.[Check the status of the export file created](/api#operation/api_projects_exports_read) using the `id` as the `export_pk`.
60
67
3. Using the `id` from the created snapshot as the export primary key, or `export_pk`, make a GET request to [download the export file](/api#operation/api_projects_exports_download_read).
61
68
62
69
## Manually convert JSON annotations to another format
63
-
You can run the [Label Studio converter tool](https://github.com/heartexlabs/label-studio-converter) on a directory or file of completed JSON annotations using the command line or Python to convert the completed annotations from Label Studio JSON format into another format. If you use versions of Label Studio earlier than 1.0.0, this is the only way to convert your Label Studio JSON format annotations into another labeling format.
70
+
You can run the [Label Studio converter tool](https://github.com/heartexlabs/label-studio-converter) on a directory or file of completed JSON annotations using the command line or Python to convert the completed annotations from Label Studio JSON format into another format.
71
+
72
+
!!! note
73
+
If you use versions of Label Studio earlier than 1.0.0, then this is the only way to convert your Label Studio JSON format annotations into another labeling format.
74
+
64
75
65
76
## Export formats supported by Label Studio
66
77
67
-
Label Studio supports many common and standard formats for exporting completed labeling tasks. If you don't see a format that works for you, you can contribute one. See the [GitHub repository for the Label Studio Converter tool](https://github.com/heartexlabs/label-studio-converter).
78
+
Label Studio supports many common and standard formats for exporting completed labeling tasks. If you don't see a format that works for you, you can contribute one. For more information, see the [GitHub repository for the Label Studio Converter tool](https://github.com/heartexlabs/label-studio-converter).
79
+
80
+
### ASR_MANIFEST
81
+
82
+
Export audio transcription labels for automatic speech recognition as the JSON manifest format expected by [NVIDIA NeMo models](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/v0.11.0/collections/nemo_asr.html). Supports audio transcription labeling projects that use the `Audio` or `AudioPlus` tags with the `TextArea` tag.
Export your brush mask labels as NumPy 2d arrays and PNG images. Each label outputs as one image. Supports brush labeling image projects that use the `BrushLabels` tag.
91
+
92
+
### COCO
93
+
94
+
A popular machine learning format used by the [COCO dataset](http://cocodataset.org/#home) for object detection and image segmentation tasks. Supports bounding box and polygon image labeling projects that use the `RectangleLabels` or `PolygonLabels` tags.
95
+
96
+
### CoNLL2003
97
+
98
+
A popular format used for the [CoNLL-2003 named entity recognition challenge](https://www.clips.uantwerpen.be/conll2003/ner/). Supports text labeling projects that use the `Text` and `Labels` tags.
99
+
100
+
### CSV
101
+
102
+
Results are stored as comma-separated values with the column names specified by the values of the `"from_name"` and `"to_name"` fields in the labeling configuration. Supports all project types.
68
103
69
104
### JSON
70
105
71
106
List of items in [raw JSON format](#Label-Studio-JSON-format-of-annotated-tasks) stored in one JSON file. Use this format to export both the data and the annotations for a dataset. Supports all project types.
72
107
73
108
### JSON_MIN
74
109
75
-
List of items where only `"from_name", "to_name"` values from the [raw JSON format](#Label-Studio-JSON-format-of-annotated-tasks) are exported. Use this format to export the annotations and the data for a dataset, and no Label-Studio-specific fields. Supports all project types.
110
+
List of items where only `"from_name", "to_name"` values from the [raw JSON format](#Label-Studio-JSON-format-of-annotated-tasks) are exported. Use this format to export the annotations and the data for a dataset, and no Label-Studio-specific fields. Supports all project types.
76
111
77
112
For example:
78
113
```json
@@ -91,69 +126,45 @@ For example:
91
126
}
92
127
```
93
128
94
-
### CSV
95
-
96
-
Results are stored as comma-separated values with the column names specified by the values of the `"from_name"` and `"to_name"` fields in the labeling configuration. Supports all project types.
97
-
98
-
99
-
### TSV
100
-
101
-
Results are stored in tab-separated tabular file with column names specified by `"from_name"` and `"to_name"` values in the labeling configuration. Supports all project types.
102
-
103
-
### CONLL2003
104
-
105
-
Popular format used for the [CoNLL-2003 named entity recognition challenge](https://www.clips.uantwerpen.be/conll2003/ner/). Supports text labeling projects that use the `Text` and `Labels` tags.
106
-
107
-
### COCO
108
-
109
-
Popular machine learning format used by the [COCO dataset](http://cocodataset.org/#home) for object detection and image segmentation tasks. Supports bounding box and polygon image labeling projects that use the `RectangleLabels` or `PolygonLabels` tags.
110
-
111
129
### Pascal VOC XML
112
130
113
-
Popular XML-formatted task data used for object detection and image segmentation tasks. Supports bounding box image labeling projects that use the `RectangleLabels` tag..
114
-
115
-
### Brush labels to NumPy & PNG
116
-
117
-
Export your brush mask labels as NumPy 2d arrays and PNG images. Each label outputs as one image. Supports brush labeling image projects that use the `BrushLabels` tag.
118
-
119
-
### ASR_MANIFEST
120
-
121
-
Export audio transcription labels for automatic speech recognition as the JSON manifest format expected by [NVIDIA NeMo models](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/v0.11.0/collections/nemo_asr.html). Supports audio transcription labeling projects that use the `Audio` or `AudioPlus` tags with the `TextArea` tag.
Export object detection annotations in the YOLOv3 and YOLOv4 format. Supports object detection labeling projects that use the `RectangleLabels` tag.
131
+
A popular XML-formatted task data is used for object detection and image segmentation tasks. Supports bounding box image labeling projects that use the `RectangleLabels` tag.
130
132
131
133
### spaCy
132
134
133
-
Label Studio doesn't support exporting directly to spaCy binary format, but you can convert annotations exported from Label Studio to a format compatible with spaCy. You must have the spacy python package installed to perform this conversion.
135
+
Label Studio does not support exporting directly to spaCy binary format, but you can convert annotations exported from Label Studio to a format compatible with spaCy. You must have the spacy python package installed to perform this conversion.
134
136
135
137
To transform Label Studio annotations into spaCy binary format, do the following:
136
138
1. Export your annotations to CONLL2003 format.
137
-
2. Open the downloaded file and update the first line of the exported file to add a O on the first line:
139
+
2. Open the downloaded file and update the first line of the exported file to add `O` on the first line:
138
140
```
139
141
-DOCSTART- -X- O O
140
142
```
141
-
3. From the command line, run spacy convert to convert the CONLL-formatted annotations to spaCy binary format, replacing `/path/to/<filename>` with the path and file name of your annotations:
143
+
3. From the command line, run spacy convert to convert the CoNLL-formatted annotations to spaCy binary format, replacing `/path/to/<filename>` with the path and file name of your annotations:
For more information, see the spaCy documentation on [Converting existing corpora and annotations](https://spacy.io/usage/training#data-convert) on running spacy convert.
155
+
156
+
### TSV
157
+
158
+
Results are stored in a tab-separated tabular file with column names specified by `"from_name"` and `"to_name"` values in the labeling configuration. Supports all project types.
159
+
160
+
### YOLO
161
+
162
+
Export object detection annotations in the YOLOv3 and YOLOv4 format. Supports object detection labeling projects that use the `RectangleLabels` tag.
151
163
152
-
See the spaCy documentation on [Converting existing corpora and annotations](https://spacy.io/usage/training#data-convert) for more details on running spacy convert.
153
164
154
165
## Label Studio JSON format of annotated tasks
155
166
156
-
When you annotate data, Label Studio stores the output in JSON format. The raw JSON structure of each completed task follows this example:
167
+
When you annotate data, Label Studio stores the output in JSON format. The raw JSON structure of each completed task uses the following example:
157
168
158
169
```json
159
170
{
@@ -250,6 +261,7 @@ When you annotate data, Label Studio stores the output in JSON format. The raw J
250
261
```
251
262
252
263
### Relevant JSON property descriptions
264
+
253
265
Review the full list of JSON properties in the [API documentation](api.html).
254
266
255
267
| JSON property name | Description |
@@ -265,13 +277,13 @@ Review the full list of JSON properties in the [API documentation](api.html).
265
277
| result.from_name | Name of the tag used to label the region. See [control tags](/tags). |
266
278
| result.to_name | Name of the object tag that provided the region to be labeled. See [object tags](/tags). |
267
279
| result.type | Type of tag used to annotate the task. |
268
-
| result.value | Tag-specific value that includes details of the result of labeling the task. The value structure depends on the tag for the label. [Explore each tag](/tags) for more details. |
280
+
| result.value | Tag-specific value that includes details of the result of labeling the task. The value structure depends on the tag for the label. For more information, see [Explore each tag](/tags). |
269
281
| annotations.completed_by | User ID of the user that created the annotation. Matches the list order of users on the People page on the Label Studio UI. |
270
282
| annotations.was_cancelled | Boolean. Details about whether or not the annotation was skipped, or cancelled. |
271
-
| annotations.reviews |Enterprise only. Array containing the details of reviews for this annotation. |
283
+
| annotations.reviews |<i class='ent'></i> Array containing the details of reviews for this annotation. |
272
284
| reviews.id | Enterprise only. ID of the specific annotation review. |
273
-
| reviews.created_by |Enterprise only. Dictionary containing user ID, email, first name and last name of the user performing the review. |
274
-
| reviews.accepted |Enterprise only. Boolean. Whether the reviewer accepted the annotation as part of their review. |
285
+
| reviews.created_by |<i class='ent'></i> Dictionary containing user ID, email, first name and last name of the user performing the review. |
286
+
| reviews.accepted |<i class='ent'></i> Boolean. Whether the reviewer accepted the annotation as part of their review. |
275
287
| drafts | Array of draft annotations. Follows similar format as the annotations array. Included only for tasks exported as a snapshot [from the UI](#Export-snapshots-using-the-UI) or [using the API](#Export-snapshots-using-the-API).
276
288
| predictions | Array of machine learning predictions. Follows the same format as the annotations array, with one additional parameter. |
277
289
| predictions.score | The overall score of the result, based on the probabilistic output, confidence level, or other. |
Copy file name to clipboardExpand all lines: docs/source/includes/annotation_ids.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
Each annotation that you create when you label a task contains regions and results.
4
4
5
-
-**Regions** refer to the selected area of the data, whether a text span, image area, audio segment, or something else.
5
+
-**Regions** refer to the selected area of the data, whether a text span, image area, audio segment, or another entity.
6
6
-**Results** refer to the labels assigned to the region.
7
7
8
8
Each region has a unique ID for each annotation, formed as a string with the characters `A-Za-z0-9_-`. Each result ID is the same as the region ID that it applies to.
9
9
10
-
When a prediction is used to create an annotation, the result IDs stay the same in the annotation field. This lets you track the regions generated by your machine learning model and compare them directly to the human-created and reviewed annotations.
10
+
When a prediction is used to create an annotation, the result IDs stay the same in the annotation field. This allows you to track the regions generated by your machine learning model and compare them directly to the human-created and reviewed annotations.
0 commit comments