Skip to content

Commit d921b3d

Browse files
yamini-labelboxezekielemersonzeke-emersonmnoszczakovalle15
authored
SDK release 3.48.0 (#1140)
Co-authored-by: Zeke <[email protected]> Co-authored-by: ezekielemerson <[email protected]> Co-authored-by: mnoszczak <[email protected]> Co-authored-by: Andrea Ovalle <[email protected]> Co-authored-by: Ramy <[email protected]> Co-authored-by: Kevin Kim <[email protected]> Co-authored-by: kkim-labelbox <[email protected]> Co-authored-by: Jay H Patel <[email protected]> Co-authored-by: Jay Patel <[email protected]> Co-authored-by: Val Brodsky <[email protected]> Co-authored-by: Val Brodsky <[email protected]>
1 parent 2ac118a commit d921b3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1943
-2310
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/google/yapf
3-
rev: v0.33.0
3+
rev: v0.44.0
44
hooks:
55
- id: yapf
66
name: "yapf"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
# Changelog
2+
# Version 3.48.0 (2023-06-13)
3+
## Added
4+
* Support for ISO format to exports V2 date filters
5+
* Support to specify confidence for all free-text annotations
6+
7+
## Changed
8+
* Removed backports library and replaced it with python dateutil package to parse iso strings
9+
10+
## Notebooks
11+
* Added predictions to model run example
12+
* Added notebook to run yolov8 and sam on video and upload to LB
13+
* Updated google colab notebooks to reflect raster segmentation tool being released on 6/13
14+
* Updated radio NDJSON annotations format to support confidence
15+
* Added confidence to all free-text annotations (ndjson)
16+
* Fixed issues with cv2 library rooting from the Geospatial notebook used a png map with a signed URL with an expired token
217

318
# Version 3.47.1 (2023-05-24)
419
## Fixed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
copyright = '2021, Labelbox'
2222
author = 'Labelbox'
2323

24-
release = '3.47.1'
24+
release = '3.48.0'
2525

2626
# -- General configuration ---------------------------------------------------
2727

examples/README.md

Lines changed: 54 additions & 63 deletions
Large diffs are not rendered by default.

examples/annotation_import/image.ipynb

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@
180180
"nested_radio_annotation_ndjson = {\n",
181181
" \"name\": \"nested_radio_question\",\n",
182182
" \"answer\": {\n",
183-
" \"name\": \"first_radio_answer\"\n",
184-
" },\n",
185-
" \"classifications\": [{\n",
186-
" \"name\": \"sub_radio_question\",\n",
187-
" \"answer\": {\n",
188-
" \"name\": \"first_sub_radio_answer\"\n",
189-
" }\n",
190-
" }]\n",
183+
" \"name\": \"first_radio_answer\",\n",
184+
" \"classifications\": [{\n",
185+
" \"name\": \"sub_radio_question\",\n",
186+
" \"answer\": {\n",
187+
" \"name\": \"first_sub_radio_answer\"\n",
188+
" }\n",
189+
" }]\n",
190+
" }\n",
191191
"}\n",
192192
"\n",
193193
"\n",
@@ -431,19 +431,8 @@
431431
"metadata": {},
432432
"source": [
433433
"# Identifying what values in the numpy array correspond to the mask annotation\n",
434-
"color = (0, 0, 0)\n",
435-
"\n",
436-
"# convert a polygon to mask\n",
437-
"im_height, im_width = 100,100 # need to provide the height and width of image\n",
438-
"mask_data = lb_types.MaskData(arr=\n",
439-
" polygon_annotation.value.draw(height=im_height,width=im_width,color=color))\n",
440-
"\n",
441-
"# convert a 2D array to 3D array\n",
442-
"arr_2d = np.zeros((100,100), dtype=\"uint8\")\n",
443-
"mask_data = lb_types.MaskData.from_2D_arr(arr_2d)\n",
444-
"\n",
445-
"# a 3D array where 3rd axis is RGB values\n",
446-
"mask_data = lb_types.MaskData(arr=np.zeros([400,450,3],dtype=\"uint8\"))\n",
434+
"color = (255, 255, 255)\n",
435+
"mask_data = lb_types.MaskData(url=\"https://storage.googleapis.com/labelbox-datasets/image_sample_data/raster_seg.png\")\n",
447436
"\n",
448437
"# Python annotation\n",
449438
"mask_annotation = lb_types.ObjectAnnotation(\n",
@@ -455,8 +444,8 @@
455444
"mask_annotation_ndjson = {\n",
456445
" \"name\": \"mask\",\n",
457446
" \"classifications\": [],\n",
458-
" \"mask\": {\"instanceURI\": \"https://storage.labelbox.com/cjhfn5y6s0pk507024nz1ocys%2F1d60856c-59b7-3060-2754-83f7e93e0d01-1?Expires=1666901963361&KeyName=labelbox-assets-key-3&Signature=t-2s2DB4YjFuWEFak0wxYqfBfZA\",\n",
459-
" \"colorRGB\": (0, 0, 0)}\n",
447+
" \"mask\": {\"instanceURI\": \"https://storage.googleapis.com/labelbox-datasets/image_sample_data/raster_seg.png\",\n",
448+
" \"colorRGB\": (255, 255, 255)}\n",
460449
"}"
461450
],
462451
"cell_type": "code",
@@ -746,7 +735,7 @@
746735
" options=[lb.Option(value=\"first_sub_radio_answer\")]),\n",
747736
" ]),\n",
748737
" lb.Tool(tool=lb.Tool.Type.POLYGON, name=\"polygon\"),\n",
749-
" lb.Tool(tool=lb.Tool.Type.SEGMENTATION, name=\"mask\"),\n",
738+
" lb.Tool(tool=lb.Tool.Type.RASTER_SEGMENTATION, name=\"mask\"),\n",
750739
" lb.Tool(tool=lb.Tool.Type.POINT, name=\"point\"),\n",
751740
" lb.Tool(tool=lb.Tool.Type.LINE, name=\"polyline\"),\n",
752741
" lb.Tool(tool=lb.Tool.Type.RELATIONSHIP, name=\"relationship\")\n",
@@ -831,7 +820,7 @@
831820
{
832821
"metadata": {},
833822
"source": [
834-
"labels = []\n",
823+
"label = []\n",
835824
"annotations = [\n",
836825
" radio_annotation,\n",
837826
" nested_radio_annotation,\n",
@@ -848,7 +837,7 @@
848837
" bbox_target,\n",
849838
" relationship,\n",
850839
"]\n",
851-
"labels.append(\n",
840+
"label.append(\n",
852841
" lb_types.Label(data=lb_types.ImageData(global_key=global_key),\n",
853842
" annotations=annotations))"
854843
],
@@ -867,7 +856,7 @@
867856
{
868857
"metadata": {},
869858
"source": [
870-
"ndjson_labels = []\n",
859+
"ndjson_label = []\n",
871860
"annotations = [\n",
872861
" radio_annotation_ndjson,\n",
873862
" nested_radio_annotation_ndjson,\n",
@@ -890,7 +879,7 @@
890879
" \"globalKey\": global_key\n",
891880
" },\n",
892881
" })\n",
893-
" ndjson_labels.append(annotation)"
882+
" ndjson_label.append(annotation)"
894883
],
895884
"cell_type": "code",
896885
"outputs": [],
@@ -919,7 +908,7 @@
919908
" client=client,\n",
920909
" project_id=project.uid,\n",
921910
" name=\"mal_job\" + str(uuid.uuid4()),\n",
922-
" predictions=labels\n",
911+
" predictions=label\n",
923912
")\n",
924913
"upload_job.wait_until_done()\n",
925914
"\n",
@@ -948,11 +937,10 @@
948937
"# client = client, \n",
949938
"# project_id = project.uid, \n",
950939
"# name=\"label_import_job\"+str(uuid.uuid4()), \n",
951-
"# labels=ndjson_labels)\n",
940+
"# labels=label)\n",
952941
"\n",
953942
"# print(\"Errors:\", upload_job.errors)\n",
954-
"# print(\"Status of uploads: \", upload_job.statuses)\n",
955-
"# print(\" \")"
943+
"# print(\"Status of uploads: \", upload_job.statuses)"
956944
],
957945
"cell_type": "code",
958946
"outputs": [],

0 commit comments

Comments
 (0)