Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 67 additions & 52 deletions examples/prediction_upload/image_predictions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,25 @@
"!pip install -q 'labelbox[data]'"
],
"metadata": {
"id": "cm8xMaLbGb7v"
"id": "cm8xMaLbGb7v",
"outputId": "7c03c878-a503-4729-e97b-89dcfd0fc2be",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": []
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m187.7/187.7 KB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m43.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Building wheel for pygeotile (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
]
}
]
},
{
"cell_type": "code",
Expand All @@ -111,7 +126,7 @@
"metadata": {
"id": "NIq-6M9kHKSs"
},
"execution_count": null,
"execution_count": 2,
"outputs": []
},
{
Expand All @@ -133,7 +148,7 @@
"metadata": {
"id": "z7ZLKLYLHP__"
},
"execution_count": null,
"execution_count": 3,
"outputs": []
},
{
Expand Down Expand Up @@ -165,7 +180,7 @@
"metadata": {
"id": "v5wL6oojz9Ge"
},
"execution_count": null,
"execution_count": 4,
"outputs": []
},
{
Expand Down Expand Up @@ -205,7 +220,7 @@
"metadata": {
"id": "I75K-wx7_sDs"
},
"execution_count": null,
"execution_count": 5,
"outputs": []
},
{
Expand Down Expand Up @@ -242,7 +257,7 @@
"metadata": {
"id": "b2UjSoYez9I1"
},
"execution_count": null,
"execution_count": 6,
"outputs": []
},
{
Expand Down Expand Up @@ -277,7 +292,7 @@
"metadata": {
"id": "xCU4JRP0z9Nh"
},
"execution_count": null,
"execution_count": 7,
"outputs": []
},
{
Expand Down Expand Up @@ -322,7 +337,7 @@
"metadata": {
"id": "gAIzsxEjLmhv"
},
"execution_count": null,
"execution_count": 8,
"outputs": []
},
{
Expand Down Expand Up @@ -370,7 +385,7 @@
"metadata": {
"id": "jRwfE4MFz9Ph"
},
"execution_count": null,
"execution_count": 9,
"outputs": []
},
{
Expand All @@ -393,7 +408,7 @@
"metadata": {
"id": "PBB37YpWTiVR"
},
"execution_count": null,
"execution_count": 10,
"outputs": []
},
{
Expand Down Expand Up @@ -437,7 +452,7 @@
"metadata": {
"id": "39vz-tYsz9Ry"
},
"execution_count": null,
"execution_count": 11,
"outputs": []
},
{
Expand All @@ -464,7 +479,7 @@
"metadata": {
"id": "UelSiWN2z9Tg"
},
"execution_count": null,
"execution_count": 12,
"outputs": []
},
{
Expand Down Expand Up @@ -520,7 +535,7 @@
"metadata": {
"id": "mrjb8qY3z9VY"
},
"execution_count": null,
"execution_count": 13,
"outputs": []
},
{
Expand Down Expand Up @@ -549,24 +564,24 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9f4d0970-d26e-438b-da20-8d09d8b3b665"
"outputId": "83945c20-debc-484c-a3c8-79c46a2687dc"
},
"execution_count": null,
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<DataRow {\n",
" \"created_at\": \"2023-02-08 15:34:40+00:00\",\n",
" \"created_at\": \"2023-02-10 14:52:01+00:00\",\n",
" \"external_id\": null,\n",
" \"global_key\": \"19bdf9f3-fe33-40b5-aa70-8e13dd2896ca\",\n",
" \"global_key\": \"2830605d-dc77-4b34-ba7f-ad1a6ef76d72\",\n",
" \"media_attributes\": {},\n",
" \"metadata\": [],\n",
" \"metadata_fields\": [],\n",
" \"row_data\": \"https://storage.googleapis.com/labelbox-datasets/image_sample_data/2560px-Kitano_Street_Kobe01s5s4110.jpeg\",\n",
" \"uid\": \"cldvu0iew12rs07v50oys1y4o\",\n",
" \"updated_at\": \"2023-02-08 15:34:40+00:00\"\n",
" \"uid\": \"cldyndd996b3u07zx7560b4v9\",\n",
" \"updated_at\": \"2023-02-10 14:52:01+00:00\"\n",
"}>\n"
]
}
Expand All @@ -589,33 +604,33 @@
" classifications=[ # List of Classification objects\n",
" lb.Classification( # Radio classification given the name \"text\" with two options: \"first_radio_answer\" and \"second_radio_answer\"\n",
" class_type=lb.Classification.Type.RADIO,\n",
" instructions=\"radio_question\", \n",
" name=\"radio_question\", \n",
" options=[\n",
" lb.Option(value=\"first_radio_answer\"),\n",
" lb.Option(value=\"second_radio_answer\")\n",
" ]\n",
" ),\n",
" lb.Classification( # Checklist classification given the name \"text\" with two options: \"first_checklist_answer\" and \"second_checklist_answer\"\n",
" class_type=lb.Classification.Type.CHECKLIST,\n",
" instructions=\"checklist_question\", \n",
" name=\"checklist_question\", \n",
" options=[\n",
" lb.Option(value=\"first_checklist_answer\"),\n",
" lb.Option(value=\"second_checklist_answer\")\n",
" ]\n",
" ), \n",
" lb.Classification( # Text classification given the name \"text\"\n",
" class_type=lb.Classification.Type.TEXT,\n",
" instructions=\"free_text\"\n",
" name=\"free_text\"\n",
" ),\n",
" lb.Classification(\n",
" class_type=lb.Classification.Type.RADIO,\n",
" instructions=\"nested_radio_question\",\n",
" name=\"nested_radio_question\",\n",
" options=[\n",
" lb.Option(\"first_radio_answer\",\n",
" options=[\n",
" lb.Classification(\n",
" class_type=lb.Classification.Type.RADIO,\n",
" instructions=\"sub_radio_question\",\n",
" name=\"sub_radio_question\",\n",
" options=[lb.Option(\"first_sub_radio_answer\")]\n",
" )\n",
" ]\n",
Expand All @@ -624,13 +639,13 @@
" ),\n",
" lb.Classification(\n",
" class_type=lb.Classification.Type.CHECKLIST,\n",
" instructions=\"nested_checklist_question\",\n",
" name=\"nested_checklist_question\",\n",
" options=[\n",
" lb.Option(\"first_checklist_answer\",\n",
" options=[\n",
" lb.Classification(\n",
" class_type=lb.Classification.Type.CHECKLIST,\n",
" instructions=\"sub_checklist_question\", \n",
" name=\"sub_checklist_question\", \n",
" options=[lb.Option(\"first_sub_checklist_answer\")]\n",
" )\n",
" ]\n",
Expand All @@ -648,7 +663,7 @@
" classifications=[\n",
" lb.Classification(\n",
" class_type=lb.Classification.Type.RADIO,\n",
" instructions=\"sub_radio_question\",\n",
" name=\"sub_radio_question\",\n",
" options=[\n",
" lb.Option(value=\"first_sub_radio_answer\")\n",
" ]\n",
Expand All @@ -674,7 +689,7 @@
"metadata": {
"id": "Kt4XWWqgIiWk"
},
"execution_count": null,
"execution_count": 15,
"outputs": []
},
{
Expand All @@ -698,7 +713,7 @@
"metadata": {
"id": "8n-AvzdiOR6d"
},
"execution_count": null,
"execution_count": 16,
"outputs": []
},
{
Expand All @@ -720,9 +735,9 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "e0b4c92c-1415-4557-e134-60323b167442"
"outputId": "d58a40ac-bd0b-4006-87f1-0d79c4703a61"
},
"execution_count": null,
"execution_count": 17,
"outputs": [
{
"output_type": "execute_result",
Expand All @@ -732,7 +747,7 @@
]
},
"metadata": {},
"execution_count": 84
"execution_count": 17
}
]
},
Expand Down Expand Up @@ -777,7 +792,7 @@
"metadata": {
"id": "zv2OLTXKSGWv"
},
"execution_count": null,
"execution_count": 18,
"outputs": []
},
{
Expand Down Expand Up @@ -816,7 +831,7 @@
"metadata": {
"id": "F-Y7sSyAV3tn"
},
"execution_count": null,
"execution_count": 19,
"outputs": []
},
{
Expand Down Expand Up @@ -844,9 +859,9 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "cd1c04aa-31a8-4891-b1db-ef28d1469539"
"outputId": "a0f083b9-69ca-4da1-84e5-1b8e9df5d1d4"
},
"execution_count": null,
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -890,12 +905,12 @@
],
"metadata": {
"id": "jEtoDiDrPFvI",
"outputId": "48a0f1d3-2c79-41bf-d739-a7e84e74749a",
"outputId": "25424674-fa97-4b9b-d1c0-8e16d7366c87",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"execution_count": 21,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -929,19 +944,19 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9ab1b671-b3a3-4056-bf45-7bda1d6e20a0"
"outputId": "e3b38d7b-9623-4467-b3f2-6f1ebe2cea41"
},
"execution_count": null,
"execution_count": 22,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<Batch ID: 2374e520-a7c6-11ed-8123-cf5deef7e8cf>"
"<Batch ID: 865e8ff0-a952-11ed-b4e7-81bd51991e76>"
]
},
"metadata": {},
"execution_count": 89
"execution_count": 22
}
]
},
Expand Down Expand Up @@ -1096,7 +1111,7 @@
"metadata": {
"id": "A8_HVvu9Uvfl"
},
"execution_count": null,
"execution_count": 23,
"outputs": []
},
{
Expand Down Expand Up @@ -1136,7 +1151,7 @@
"metadata": {
"id": "9gD_alThQA3G"
},
"execution_count": null,
"execution_count": 24,
"outputs": []
},
{
Expand Down Expand Up @@ -1166,9 +1181,9 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "02ca8f6b-a7ce-4626-9751-0f39ab0adf01"
"outputId": "a5f3ba79-fd9d-44b0-f868-502e7abaa826"
},
"execution_count": null,
"execution_count": 25,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -1200,9 +1215,9 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0184b7df-067d-4e7a-d14d-21b718d4e857"
"outputId": "049841d5-2d22-45d6-c461-617f9ca3ed49"
},
"execution_count": null,
"execution_count": 26,
"outputs": [
{
"output_type": "execute_result",
Expand All @@ -1212,7 +1227,7 @@
]
},
"metadata": {},
"execution_count": 93
"execution_count": 26
}
]
},
Expand All @@ -1234,7 +1249,7 @@
"metadata": {
"id": "aAhkyvJlWK1p"
},
"execution_count": null,
"execution_count": 27,
"outputs": []
}
]
Expand Down