Bin
2025-12-17 1442f92732d7c5311a627a7ba3aaa0bb8ffc539f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
---
test_name: simple_export
strict: false
marks:
- usefixtures:
  - django_live_url
stages:
- id: signup
  type: ref
- name: stage
  request:
    headers:
      content-type: application/json
    json:
      label_config: <View><Text name="text" value="$text"/><Choices name="label" toName="text"><Choice
        value="pos"/><Choice value="neg"/></Choices></View>
    method: POST
    url: '{django_live_url}/api/projects'
  response:
    save:
      json:
        pk: id
    status_code: 201
- name: stage
  request:
    files:
      file: tests/test_suites/samples/lines.txt
    headers:
      content-type: multipart/form-data
    method: POST
    url: '{django_live_url}/api/projects/{pk}/import'
  response:
    json:
      annotation_count: 0
      prediction_count: 0
      task_count: 3
    status_code: 201
- name: stage
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/next'
  response:
    save:
      json:
        task_pk: id
    status_code: 200
- name: stage
  request:
    headers:
      content-type: application/json
    json:
      lead_time: 34.56
      result:
      - from_name: label
        to_name: text
        type: choices
        value:
          choices:
          - pos
    method: POST
    url: '{django_live_url}/api/tasks/{task_pk}/annotations'
  response:
    save:
      json:
        annotation_pk: id
    status_code: 201
- name: stage
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/export'
  response:
    status_code: 200
- name: stage
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/export?ids[]={task_pk}'
  response:
    status_code: 200
- name: stage
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/export?ids[]=9999999'
  response:
    status_code: 200
 
 
---
test_name: YOLO_export_option_polygons
strict: true
marks:
- usefixtures:
  - django_live_url
stages:
- id: signup
  type: ref
- name: stage
  request:
    headers:
      content-type: application/json
    json:
      label_config: <View><Header value="Select label and click the image to start"/><Image name="image" value="$image" /><PolygonLabels name="label" toName="image" strokeWidth="3" pointSize="small"><Label value="Airplane" background="red"/><Label value="Car" background="blue"/></PolygonLabels></View>
    method: POST
    url: '{django_live_url}/api/projects'
  response:
    save:
      json:
        pk: id
    status_code: 201
- name: stage_export
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/export/formats'
  response:
    json:
      - title: JSON
        description: List of items in raw JSON format stored in one JSON file. Use to export
          both the data and the annotations for a dataset. It's Label Studio Common Format
        link: https://labelstud.io/guide/export.html#JSON
        name: JSON
      - title: JSON-MIN
        description: List of items where only "from_name", "to_name" values from the raw
          JSON format are exported. Use to export only the annotations for a dataset.
        link: https://labelstud.io/guide/export.html#JSON-MIN
        name: JSON_MIN
      - title: CSV
        description: Results are stored as comma-separated values with the column names
          specified by the values of the "from_name" and "to_name" fields.
        link: https://labelstud.io/guide/export.html#CSV
        name: CSV
      - title: TSV
        description: Results are stored in tab-separated tabular file with column names
          specified by "from_name" "to_name" values
        link: https://labelstud.io/guide/export.html#TSV
        name: TSV
      - title: COCO
        description: Popular machine learning format used by the COCO dataset for object
          detection and image segmentation tasks with polygons and rectangles.
        link: https://labelstud.io/guide/export.html#COCO
        tags:
        - image segmentation
        - object detection
        - keypoints
        name: COCO
      - title: COCO with Images
        description: COCO format with images downloaded.
        link: https://labelstud.io/guide/export.html#COCO
        tags:
        - image segmentation
        - object detection
        - keypoints
        name: COCO_WITH_IMAGES
      - title: YOLO
        description: Popular TXT format is created for each image file. Each txt file contains
          annotations for the corresponding image file, that is object class, object coordinates,
          height & width.
        link: https://labelstud.io/guide/export.html#YOLO
        tags:
        - image segmentation
        - object detection
        - keypoints
        name: YOLO
      - title: YOLO with Images
        description: YOLO format with images downloaded.
        link: https://labelstud.io/guide/export.html#YOLO
        tags:
        - image segmentation
        - object detection
        - keypoints
        name: YOLO_WITH_IMAGES
      - title: YOLOv8 OBB
        description: Popular TXT format is created for each image file. Each txt file contains
          annotations for the corresponding image file. The YOLO OBB format designates bounding
          boxes by their four corner points with coordinates normalized between 0 and 1,
          so it is possible to export rotated objects.
        link: https://labelstud.io/guide/export.html#YOLO
        tags:
        - image segmentation
        - object detection
        name: YOLO_OBB
      - title: YOLOv8 OBB with Images
        description: YOLOv8 OBB format with images downloaded.
        link: https://labelstud.io/guide/export.html#YOLO
        tags:
        - image segmentation
        - object detection
        name: YOLO_OBB_WITH_IMAGES
      - title: CONLL2003
        description: Popular format used for the CoNLL-2003 named entity recognition challenge.
        link: https://labelstud.io/guide/export.html#CONLL2003
        tags:
        - sequence labeling
        - text tagging
        - named entity recognition
        name: CONLL2003
        disabled: true
      - title: Pascal VOC XML
        description: Popular XML format used for object detection and polygon image segmentation
          tasks.
        link: https://labelstud.io/guide/export.html#Pascal-VOC-XML
        tags:
        - image segmentation
        - object detection
        name: VOC
        disabled: true
      - title: Brush labels to NumPy
        description: Export your brush labels as NumPy 2d arrays. Each label outputs as
          one image.
        link: https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG
        tags:
        - image segmentation
        name: BRUSH_TO_NUMPY
        disabled: true
      - title: Brush labels to PNG
        description: Export your brush labels as PNG images. Each label outputs as one image.
        link: https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG
        tags:
        - image segmentation
        name: BRUSH_TO_PNG
        disabled: true
      - title: ASR Manifest
        description: Export audio transcription labels for automatic speech recognition
          as the JSON manifest format expected by NVIDIA NeMo models.
        link: https://labelstud.io/guide/export.html#ASR-MANIFEST
        tags:
        - speech recognition
        name: ASR_MANIFEST
        disabled: true
      - title: "Brush labels to COCO"
        description: "Export your brush labels as COCO format for segmentation tasks. Converts RLE encoded masks to COCO polygons."
        link: "https://labelstud.io/guide/export.html#COCO"
        tags:
          - "image segmentation"
          - "brush annotations"
        name: "BRUSH_TO_COCO"
        disabled: true
 
 
    status_code: 200
 
 
---
test_name: mig_export
strict: false
marks:
- usefixtures:
  - django_live_url
stages:
- id: signup
  type: ref
- name: stage
  request:
    headers:
      content-type: application/json
    json:
      label_config:
        <View>
          <Image name="image" valueList="$images"/>
            <RectangleLabels name="labels" toName="image">
              <Label value="Cat"/>
              <Label value="Dog"/>
            </RectangleLabels>
        </View>
    method: POST
    url: '{django_live_url}/api/projects'
  response:
    save:
      json:
        pk: id
    status_code: 201
- name: stage_export
  request:
    method: GET
    url: '{django_live_url}/api/projects/{pk}/export/formats'
  response:
    strict:
      - json:list_any_order
    json:
      - title: 'JSON'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#JSON'
        name: 'JSON'
      - title: 'JSON-MIN'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#JSON-MIN'
        name: 'JSON_MIN'
      - title: 'CSV'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#CSV'
        name: 'CSV'
      - title: 'TSV'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#TSV'
        name: 'TSV'
      - title: 'COCO'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#COCO'
        tags: ['image segmentation', 'object detection']
        name: 'COCO'
        disabled: true
      - title: 'YOLO'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#YOLO'
        tags: ['image segmentation', 'object detection']
        name: 'YOLO'
        disabled: true
      - title: 'YOLOv8 OBB'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#YOLO'
        tags: ['image segmentation', 'object detection']
        name: 'YOLO_OBB'
        disabled: true
      - title: 'CONLL2003'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#CONLL2003'
        tags: ['sequence labeling', 'text tagging', 'named entity recognition']
        name: 'CONLL2003'
        disabled: true
      - title: 'Pascal VOC XML'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#Pascal-VOC-XML'
        tags: ['image segmentation', 'object detection']
        name: 'VOC'
        disabled: true
      - title: 'Brush labels to NumPy'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG'
        tags: ['image segmentation']
        name: 'BRUSH_TO_NUMPY'
        disabled: true
      - title: 'Brush labels to PNG'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG'
        tags: ['image segmentation']
        name: 'BRUSH_TO_PNG'
        disabled: true
      - title: 'ASR Manifest'
        description: !anystr
        link: 'https://labelstud.io/guide/export.html#ASR-MANIFEST'
        tags: ['speech recognition']
        name: 'ASR_MANIFEST'
        disabled: true
    status_code: 200