|
56 | 56 | }, |
57 | 57 | { |
58 | 58 | "cell_type": "code", |
59 | | - "execution_count": 1, |
| 59 | + "execution_count": null, |
60 | 60 | "id": "8d8d554f", |
61 | 61 | "metadata": {}, |
62 | 62 | "outputs": [], |
|
103 | 103 | }, |
104 | 104 | { |
105 | 105 | "cell_type": "code", |
106 | | - "execution_count": 56, |
| 106 | + "execution_count": 3, |
107 | 107 | "id": "6ffec272", |
108 | 108 | "metadata": {}, |
109 | 109 | "outputs": [], |
|
243 | 243 | }, |
244 | 244 | { |
245 | 245 | "cell_type": "code", |
246 | | - "execution_count": 38, |
| 246 | + "execution_count": 7, |
247 | 247 | "id": "5cbe5b5a", |
248 | 248 | "metadata": {}, |
249 | 249 | "outputs": [], |
250 | 250 | "source": [ |
251 | 251 | "box_annotation = ObjectAnnotation(\n", |
252 | 252 | " name='box', \n", |
253 | | - " extra={'unit': 'POINTS','page': 1}, \n", |
| 253 | + " extra={'unit': 'POINTS','page': 0}, #pages are 0-indexed, 0 indicates page 1 \n", |
254 | 254 | " value=Rectangle(\n", |
255 | 255 | " extra={}, \n", |
256 | 256 | " start=Point(x=557,y=898),\n", |
|
260 | 260 | }, |
261 | 261 | { |
262 | 262 | "cell_type": "code", |
263 | | - "execution_count": 39, |
| 263 | + "execution_count": 8, |
264 | 264 | "id": "4896ea42", |
265 | 265 | "metadata": {}, |
266 | 266 | "outputs": [], |
|
302 | 302 | }, |
303 | 303 | { |
304 | 304 | "cell_type": "code", |
305 | | - "execution_count": 51, |
| 305 | + "execution_count": 9, |
306 | 306 | "id": "64ac1f74", |
307 | 307 | "metadata": {}, |
308 | 308 | "outputs": [ |
| 309 | + { |
| 310 | + "name": "stderr", |
| 311 | + "output_type": "stream", |
| 312 | + "text": [ |
| 313 | + "/Users/jonathantso/opt/anaconda3/lib/python3.8/site-packages/labelbox/data/annotation_types/classification/classification.py:85: UserWarning: Dropdown classification is deprecated and will be removed in a future release\n", |
| 314 | + " warnings.warn(\"Dropdown classification is deprecated and will be \"\n" |
| 315 | + ] |
| 316 | + }, |
309 | 317 | { |
310 | 318 | "data": { |
311 | 319 | "text/plain": [ |
312 | 320 | "{'uid': None,\n", |
313 | 321 | " 'data': ImageData(im_bytes=None,file_path=None,url=None,arr=None),\n", |
314 | | - " 'annotations': [ObjectAnnotation(name='box', feature_schema_id=None, extra={'unit': 'POINTS', 'page': 1}, value=Rectangle(extra={}, start=Point(extra={}, x=557.0, y=898.0), end=Point(extra={}, x=852.0, y=1140.0)), classifications=[]),\n", |
| 322 | + " 'annotations': [ObjectAnnotation(name='box', feature_schema_id=None, extra={'unit': 'POINTS', 'page': 0}, value=Rectangle(extra={}, start=Point(extra={}, x=557.0, y=898.0), end=Point(extra={}, x=852.0, y=1140.0)), classifications=[]),\n", |
315 | 323 | " ClassificationAnnotation(name='text', feature_schema_id=None, extra={}, value=Text(answer='the answer to the text question')),\n", |
316 | 324 | " ClassificationAnnotation(name='checklist', feature_schema_id=None, extra={}, value=Checklist(name='checklist', answer=[ClassificationAnswer(name='first_checklist_answer', feature_schema_id=None, extra={}, keyframe=None), ClassificationAnswer(name='second_checklist_answer', feature_schema_id=None, extra={}, keyframe=None)])),\n", |
317 | 325 | " ClassificationAnnotation(name='radio', feature_schema_id=None, extra={}, value=Radio(answer=ClassificationAnswer(name='second_radio_answer', feature_schema_id=None, extra={}, keyframe=None)))],\n", |
318 | 326 | " 'extra': {}}" |
319 | 327 | ] |
320 | 328 | }, |
321 | | - "execution_count": 51, |
| 329 | + "execution_count": 9, |
322 | 330 | "metadata": {}, |
323 | 331 | "output_type": "execute_result" |
324 | 332 | } |
|
361 | 369 | }, |
362 | 370 | { |
363 | 371 | "cell_type": "code", |
364 | | - "execution_count": 52, |
| 372 | + "execution_count": 10, |
365 | 373 | "id": "8794d8aa", |
366 | 374 | "metadata": { |
367 | | - "scrolled": true |
| 375 | + "scrolled": false |
368 | 376 | }, |
369 | 377 | "outputs": [ |
370 | 378 | { |
371 | 379 | "data": { |
372 | 380 | "text/plain": [ |
373 | | - "[{'uuid': 'fd4475d6-8ece-44d0-ba55-feeac4cfa9e8',\n", |
374 | | - " 'dataRow': {'id': 'cl76eelhd0fm3071n9ropffkr'},\n", |
| 381 | + "[{'uuid': '4a1ca900-85d7-4643-883e-277170000f9c',\n", |
| 382 | + " 'dataRow': {'id': 'cl7hrmmi90m5c0y6h5nk00u02'},\n", |
375 | 383 | " 'name': 'box',\n", |
376 | | - " 'classifications': [],\n", |
377 | | - " 'page': 1,\n", |
| 384 | + " 'page': 0,\n", |
378 | 385 | " 'unit': 'POINTS',\n", |
| 386 | + " 'classifications': [],\n", |
379 | 387 | " 'bbox': {'top': 898.0, 'left': 557.0, 'height': 242.0, 'width': 295.0}},\n", |
380 | 388 | " {'name': 'text',\n", |
381 | 389 | " 'answer': 'the answer to the text question',\n", |
382 | | - " 'uuid': 'fc1913c6-b735-4dea-bd25-c18152a4715f',\n", |
383 | | - " 'dataRow': {'id': 'cl76eelhd0fm3071n9ropffkr'}},\n", |
| 390 | + " 'uuid': '35588dd3-9050-4471-ac13-a8ed6ac1fd4a',\n", |
| 391 | + " 'dataRow': {'id': 'cl7hrmmi90m5c0y6h5nk00u02'}},\n", |
384 | 392 | " {'name': 'checklist',\n", |
385 | | - " 'uuid': '9d7b2e57-d68f-4388-867a-af2a9b233719',\n", |
386 | | - " 'dataRow': {'id': 'cl76eelhd0fm3071n9ropffkr'},\n", |
| 393 | + " 'uuid': '38bc716c-d199-4e6e-bd31-0d2128716444',\n", |
| 394 | + " 'dataRow': {'id': 'cl7hrmmi90m5c0y6h5nk00u02'},\n", |
387 | 395 | " 'answer': [{'name': 'first_checklist_answer'},\n", |
388 | 396 | " {'name': 'second_checklist_answer'}]},\n", |
389 | 397 | " {'name': 'radio',\n", |
390 | 398 | " 'answer': {'name': 'second_radio_answer'},\n", |
391 | | - " 'uuid': 'ad60897f-ea1a-47de-b923-459339764921',\n", |
392 | | - " 'dataRow': {'id': 'cl76eelhd0fm3071n9ropffkr'}}]" |
| 399 | + " 'uuid': '8a21a248-9669-4465-b0c0-5a8d75903c8f',\n", |
| 400 | + " 'dataRow': {'id': 'cl7hrmmi90m5c0y6h5nk00u02'}}]" |
393 | 401 | ] |
394 | 402 | }, |
395 | | - "execution_count": 52, |
| 403 | + "execution_count": 10, |
396 | 404 | "metadata": {}, |
397 | 405 | "output_type": "execute_result" |
398 | 406 | } |
|
405 | 413 | }, |
406 | 414 | { |
407 | 415 | "cell_type": "code", |
408 | | - "execution_count": 53, |
| 416 | + "execution_count": 11, |
409 | 417 | "id": "787524ac", |
410 | 418 | "metadata": {}, |
411 | 419 | "outputs": [], |
|
420 | 428 | }, |
421 | 429 | { |
422 | 430 | "cell_type": "code", |
423 | | - "execution_count": 57, |
| 431 | + "execution_count": 13, |
424 | 432 | "id": "eb5116f9", |
425 | 433 | "metadata": {}, |
426 | | - "outputs": [], |
| 434 | + "outputs": [ |
| 435 | + { |
| 436 | + "name": "stdout", |
| 437 | + "output_type": "stream", |
| 438 | + "text": [ |
| 439 | + "Errors: []\n" |
| 440 | + ] |
| 441 | + } |
| 442 | + ], |
427 | 443 | "source": [ |
428 | 444 | "# Errors will appear for each annotation that failed.\n", |
429 | 445 | "# Empty list means that there were no errors\n", |
|
0 commit comments