Skip to content

Commit b92b3b2

Browse files
Revert "SDK release 3.48.0 (#1140)"
This reverts commit d921b3d.
1 parent d921b3d commit b92b3b2

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

+2310
-1943
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.44.0
3+
rev: v0.33.0
44
hooks:
55
- id: yapf
66
name: "yapf"

CHANGELOG.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
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
172

183
# Version 3.47.1 (2023-05-24)
194
## 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.48.0'
24+
release = '3.47.1'
2525

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

examples/README.md

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

examples/annotation_import/image.ipynb

Lines changed: 32 additions & 20 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-
" \"classifications\": [{\n",
185-
" \"name\": \"sub_radio_question\",\n",
186-
" \"answer\": {\n",
187-
" \"name\": \"first_sub_radio_answer\"\n",
188-
" }\n",
189-
" }]\n",
190-
" }\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",
191191
"}\n",
192192
"\n",
193193
"\n",
@@ -431,8 +431,19 @@
431431
"metadata": {},
432432
"source": [
433433
"# Identifying what values in the numpy array correspond to the mask annotation\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",
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",
436447
"\n",
437448
"# Python annotation\n",
438449
"mask_annotation = lb_types.ObjectAnnotation(\n",
@@ -444,8 +455,8 @@
444455
"mask_annotation_ndjson = {\n",
445456
" \"name\": \"mask\",\n",
446457
" \"classifications\": [],\n",
447-
" \"mask\": {\"instanceURI\": \"https://storage.googleapis.com/labelbox-datasets/image_sample_data/raster_seg.png\",\n",
448-
" \"colorRGB\": (255, 255, 255)}\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",
449460
"}"
450461
],
451462
"cell_type": "code",
@@ -735,7 +746,7 @@
735746
" options=[lb.Option(value=\"first_sub_radio_answer\")]),\n",
736747
" ]),\n",
737748
" lb.Tool(tool=lb.Tool.Type.POLYGON, name=\"polygon\"),\n",
738-
" lb.Tool(tool=lb.Tool.Type.RASTER_SEGMENTATION, name=\"mask\"),\n",
749+
" lb.Tool(tool=lb.Tool.Type.SEGMENTATION, name=\"mask\"),\n",
739750
" lb.Tool(tool=lb.Tool.Type.POINT, name=\"point\"),\n",
740751
" lb.Tool(tool=lb.Tool.Type.LINE, name=\"polyline\"),\n",
741752
" lb.Tool(tool=lb.Tool.Type.RELATIONSHIP, name=\"relationship\")\n",
@@ -820,7 +831,7 @@
820831
{
821832
"metadata": {},
822833
"source": [
823-
"label = []\n",
834+
"labels = []\n",
824835
"annotations = [\n",
825836
" radio_annotation,\n",
826837
" nested_radio_annotation,\n",
@@ -837,7 +848,7 @@
837848
" bbox_target,\n",
838849
" relationship,\n",
839850
"]\n",
840-
"label.append(\n",
851+
"labels.append(\n",
841852
" lb_types.Label(data=lb_types.ImageData(global_key=global_key),\n",
842853
" annotations=annotations))"
843854
],
@@ -856,7 +867,7 @@
856867
{
857868
"metadata": {},
858869
"source": [
859-
"ndjson_label = []\n",
870+
"ndjson_labels = []\n",
860871
"annotations = [\n",
861872
" radio_annotation_ndjson,\n",
862873
" nested_radio_annotation_ndjson,\n",
@@ -879,7 +890,7 @@
879890
" \"globalKey\": global_key\n",
880891
" },\n",
881892
" })\n",
882-
" ndjson_label.append(annotation)"
893+
" ndjson_labels.append(annotation)"
883894
],
884895
"cell_type": "code",
885896
"outputs": [],
@@ -908,7 +919,7 @@
908919
" client=client,\n",
909920
" project_id=project.uid,\n",
910921
" name=\"mal_job\" + str(uuid.uuid4()),\n",
911-
" predictions=label\n",
922+
" predictions=labels\n",
912923
")\n",
913924
"upload_job.wait_until_done()\n",
914925
"\n",
@@ -937,10 +948,11 @@
937948
"# client = client, \n",
938949
"# project_id = project.uid, \n",
939950
"# name=\"label_import_job\"+str(uuid.uuid4()), \n",
940-
"# labels=label)\n",
951+
"# labels=ndjson_labels)\n",
941952
"\n",
942953
"# print(\"Errors:\", upload_job.errors)\n",
943-
"# print(\"Status of uploads: \", upload_job.statuses)"
954+
"# print(\"Status of uploads: \", upload_job.statuses)\n",
955+
"# print(\" \")"
944956
],
945957
"cell_type": "code",
946958
"outputs": [],

0 commit comments

Comments
 (0)