Skip to content

Commit abb2ecd

Browse files
committed
Merge branch 'develop' into PTDT-1107
2 parents 436a25b + 4472b4d commit abb2ecd

File tree

15 files changed

+1070
-959
lines changed

15 files changed

+1070
-959
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ test-custom: build
4444
-e DA_GCP_LABELBOX_API_KEY=${DA_GCP_LABELBOX_API_KEY} \
4545
-e LABELBOX_TEST_API_KEY_CUSTOM=${LABELBOX_TEST_API_KEY_CUSTOM} \
4646
-e LABELBOX_TEST_GRAPHQL_API_ENDPOINT=${LABELBOX_TEST_GRAPHQL_API_ENDPOINT} \
47+
-e LABELBOX_TEST_REST_API_ENDPOINT=${LABELBOX_TEST_REST_API_ENDPOINT} \
4748
local/labelbox-python:test pytest $(PATH_TO_TEST)

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Train a model using data annotated on Labelbox
3636

3737
| Notebook | Github | Google Colab |
3838
| --------------------------- | --------------------------------- | ------------ |
39-
| Object Detection (Detectron2) | [Github](coco_object.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/integrations/detectron2/coco_object.ipynb) |
40-
| Panoptic Detection (Detectron2) | [Github](coco_panoptic.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/integrations/detectron2/coco_panoptic.ipynb)
39+
| Object Detection (Detectron2) | [Github](examples/integrations/detectron2/coco_object.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/integrations/detectron2/coco_object.ipynb) |
40+
| Panoptic Detection (Detectron2) | [Github](examples/integrations/detectron2/coco_panoptic.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/master/examples/integrations/detectron2/coco_panoptic.ipynb)
4141
------
4242

4343
## [Annotation Import (Ground Truth & MAL)](annotation_import)

examples/annotation_import/image.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,14 @@
271271
"# Bounding box with nested classification\n",
272272
"bbox_with_radio_subclass_annotation = lb_types.ObjectAnnotation(\n",
273273
" name=\"bbox_with_radio_subclass\",\n",
274-
" confidence=0.5, # must match your ontology feature's name\n",
275274
" value=lb_types.Rectangle(\n",
276275
" start=lb_types.Point(x=933, y=541), # Top left\n",
277276
" end=lb_types.Point(x=191, y=330), # Bottom right\n",
278277
" ),\n",
279278
" classifications=[\n",
280279
" \tlb_types.ClassificationAnnotation(\n",
281280
" \tname=\"sub_radio_question\",\n",
282-
" \t\tvalue=lb_types.Radio(answer=lb_types.ClassificationAnswer(name=\"first_sub_radio_answer\", confidence=0.5))\n",
281+
" \t\tvalue=lb_types.Radio(answer=lb_types.ClassificationAnswer(name=\"first_sub_radio_answer\"))\n",
283282
" )\n",
284283
" ]\n",
285284
")\n",
@@ -313,7 +312,6 @@
313312
"# Python AnotationTypes \n",
314313
"polygon_annotation = lb_types.ObjectAnnotation(\n",
315314
" name = \"polygon\", # must match your ontology feature's name \n",
316-
" confidence = 0.5, \n",
317315
" value=lb_types.Polygon( # Coordinates for the verticies of your polygon\n",
318316
" points=[lb_types.Point(x=1489.581,y=183.934), lb_types.Point(x=2278.306,y=256.885), lb_types.Point(x=2428.197,y=200.437), lb_types.Point(x=2560.0,y=335.419),\n",
319317
" lb_types.Point(x=2557.386,y=503.165), lb_types.Point(x=2320.596,y=503.103), lb_types.Point(x=2156.083, y=628.943), lb_types.Point(x=2161.111,y=785.519),\n",
@@ -401,7 +399,6 @@
401399
"# Python Annotation\n",
402400
"point_annotation = lb_types.ObjectAnnotation(\n",
403401
" name = \"point\", # must match your ontology feature's name\n",
404-
" confidence=0.5,\n",
405402
" value = lb_types.Point(x=1166.606, y=1441.768),\n",
406403
")\n",
407404
"\n",
@@ -629,7 +626,10 @@
629626
" name=\"point\"), \n",
630627
" lb.Tool( # Polyline tool given the name \"line\"\n",
631628
" tool=lb.Tool.Type.LINE,\n",
632-
" name=\"polyline\")]\n",
629+
" name=\"polyline\"),\n",
630+
" lb.Tool( # Relationship tool given the name \"relationship\"\n",
631+
" tool=lb.Tool.Type.RELATIONSHIP,\n",
632+
" name=\"relationship\")]\n",
633633
")\n",
634634
"\n",
635635
"ontology = client.create_ontology(\"Image Prediction Import Demo\", ontology_builder.asdict(), media_type=lb.MediaType.Image)"
@@ -865,4 +865,4 @@
865865
"execution_count": null
866866
}
867867
]
868-
}
868+
}

examples/annotation_import/pdf.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,14 @@
120120
{
121121
"metadata": {},
122122
"source": [
123-
"tool_name = \"super\"\n",
124123
"ontology_builder = lb.OntologyBuilder(\n",
125124
" tools=[ \n",
126125
" lb.Tool( # Entity tool given the name \"NER\"\n",
127126
" tool=lb.Tool.Type.NER, \n",
128-
" name= tool_name)]\n",
127+
" name= \"NER\"),\n",
128+
" lb.Tool( # Relationship tool given the name \"relationship\"\n",
129+
" tool=lb.Tool.Type.RELATIONSHIP, \n",
130+
" name=\"relationship\")]\n",
129131
" )"
130132
],
131133
"cell_type": "code",

0 commit comments

Comments
 (0)