From e10f95dde2ac4f012f7b211f232acb67d541c305 Mon Sep 17 00:00:00 2001 From: Andrea Ovalle <74880762+ovalle15@users.noreply.github.com> Date: Fri, 10 Feb 2023 12:00:33 -0500 Subject: [PATCH] Ontology Updates (Instructions --> name) --- .../prediction_upload/video_predictions.ipynb | 161 ++++++++++-------- 1 file changed, 88 insertions(+), 73 deletions(-) diff --git a/examples/prediction_upload/video_predictions.ipynb b/examples/prediction_upload/video_predictions.ipynb index 3a13e8da4..d25f6efd1 100644 --- a/examples/prediction_upload/video_predictions.ipynb +++ b/examples/prediction_upload/video_predictions.ipynb @@ -92,10 +92,25 @@ "id": "cm8xMaLbGb7v", "pycharm": { "is_executing": true + }, + "outputId": "c613c58a-6c14-4632-83a1-a06dcc2a472a", + "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[31m3.4 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[31m21.4 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", @@ -106,7 +121,7 @@ "metadata": { "id": "NIq-6M9kHKSs" }, - "execution_count": null, + "execution_count": 2, "outputs": [] }, { @@ -128,7 +143,7 @@ "metadata": { "id": "z7ZLKLYLHP__" }, - "execution_count": null, + "execution_count": 3, "outputs": [] }, { @@ -165,7 +180,7 @@ "metadata": { "id": "_aFUwNVhzloh" }, - "execution_count": null, + "execution_count": 4, "outputs": [] }, { @@ -193,7 +208,7 @@ "metadata": { "id": "FJhCAqeR-cUJ" }, - "execution_count": null, + "execution_count": 5, "outputs": [] }, { @@ -235,7 +250,7 @@ "metadata": { "id": "R--ZQXHkkYFd" }, - "execution_count": null, + "execution_count": 6, "outputs": [] }, { @@ -255,7 +270,7 @@ "metadata": { "id": "TY4ejoZZkeZn" }, - "execution_count": null, + "execution_count": 7, "outputs": [] }, { @@ -321,7 +336,7 @@ "metadata": { "id": "hMRgfWFykvm7" }, - "execution_count": null, + "execution_count": 8, "outputs": [] }, { @@ -390,7 +405,7 @@ "metadata": { "id": "bmDBu_YHkymO" }, - "execution_count": null, + "execution_count": 9, "outputs": [] }, { @@ -415,7 +430,7 @@ "metadata": { "id": "Xil6CUrqk63g" }, - "execution_count": null, + "execution_count": 10, "outputs": [] }, { @@ -500,7 +515,7 @@ "metadata": { "id": "gu0ITN_flCAq" }, - "execution_count": null, + "execution_count": 11, "outputs": [] }, { @@ -529,24 +544,24 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "cae014f9-3105-4b8d-91b1-7313328f4f7d" + "outputId": "3ef124e5-318b-4664-846c-cb5733c4ddf6" }, - "execution_count": null, + "execution_count": 12, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\n" ] } @@ -569,7 +584,7 @@ " 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", @@ -577,7 +592,7 @@ " ),\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", @@ -585,13 +600,13 @@ " ), \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", @@ -600,13 +615,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(value=\"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", @@ -624,7 +639,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", @@ -647,7 +662,7 @@ "metadata": { "id": "Kt4XWWqgIiWk" }, - "execution_count": null, + "execution_count": 13, "outputs": [] }, { @@ -671,7 +686,7 @@ "metadata": { "id": "8n-AvzdiOR6d" }, - "execution_count": null, + "execution_count": 14, "outputs": [] }, { @@ -693,9 +708,9 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "568e8a29-4f6a-45fa-ab57-33705c2dfe0a" + "outputId": "84101fa9-c173-41ee-a6d2-de0cca96156a" }, - "execution_count": null, + "execution_count": 15, "outputs": [ { "output_type": "execute_result", @@ -705,7 +720,7 @@ ] }, "metadata": {}, - "execution_count": 104 + "execution_count": 15 } ] }, @@ -733,18 +748,18 @@ "base_uri": "https://localhost:8080/" }, "id": "SG6AroR4cYPl", - "outputId": "cb8e4db1-024e-460f-c1b3-b79f422104ed" + "outputId": "8df9b354-347d-4d48-d3f1-a6afc888c0c1" }, - "execution_count": null, + "execution_count": 16, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "{'schemaNodeId': 'cldue0sfz0xuk070h5m79fxr7', 'featureSchemaId': 'cldue0sfz0xuj070hhe8abich', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'cldue0sg00xuq070hcd11ew6c', 'featureSchemaId': 'cldue0sg00xul070hfmr2ctri', 'required': False, 'name': 'bbox_with_radio_subclass', 'tool': 'rectangle', 'color': '#7fff00', 'archived': 0, 'classifications': [{'schemaNodeId': 'cldue0sg00xup070ha6bm5j6j', 'featureSchemaId': 'cldue0sg00xum070hbja6ekim', 'archived': 0, 'required': False, 'instructions': 'sub_radio_question', 'name': 'sub_radio_question', 'type': 'radio', 'options': [{'schemaNodeId': 'cldue0sg00xuo070ha4qi5dzz', 'featureSchemaId': 'cldue0sg00xun070hgs3h2t3y', 'label': 'first_sub_radio_answer', 'value': 'first_sub_radio_answer'}]}]}\n", - "{'schemaNodeId': 'cldue0sg00xus070hasoyhc7i', 'featureSchemaId': 'cldue0sg00xur070hds6dfn5s', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'cldue0sg00xuu070hgle477r7', 'featureSchemaId': 'cldue0sg00xut070h5ysf6h4b', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#7f00ff', 'archived': 0, 'classifications': []}\n" + "{'schemaNodeId': 'cldyrtcxi001707yra30a43ky', 'featureSchemaId': 'cldyrtcxi001607yr5j5b83ps', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'cldyrtcxj001d07yrcpumdrzy', 'featureSchemaId': 'cldyrtcxi001807yrggaaal18', 'required': False, 'name': 'bbox_with_radio_subclass', 'tool': 'rectangle', 'color': '#7fff00', 'archived': 0, 'classifications': [{'schemaNodeId': 'cldyrtcxj001c07yr498u7sjy', 'featureSchemaId': 'cldyrtcxj001907yr3idhdbgi', 'archived': 0, 'required': False, 'instructions': 'sub_radio_question', 'name': 'sub_radio_question', 'type': 'radio', 'options': [{'schemaNodeId': 'cldyrtcxj001b07yr2afe29ej', 'featureSchemaId': 'cldyrtcxj001a07yr3ro1dhpb', 'label': 'first_sub_radio_answer', 'value': 'first_sub_radio_answer'}]}]}\n", + "{'schemaNodeId': 'cldyrtcxj001f07yrh4k3g2sl', 'featureSchemaId': 'cldyrtcxj001e07yrcge9h9b8', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'cldyrtcxj001h07yrdvca3afo', 'featureSchemaId': 'cldyrtcxj001g07yr8oo9647y', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#7f00ff', 'archived': 0, 'classifications': []}\n" ] }, { @@ -754,20 +769,20 @@ "{'name': 'bbox_with_radio_subclass',\n", " 'segments': [{'keyframes': [{'frame': 13,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]},\n", + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]},\n", " {'frame': 14,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]},\n", + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]},\n", " {'frame': 15,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]}]}]}" + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]}]}]}" ] }, "metadata": {}, - "execution_count": 105 + "execution_count": 16 } ] }, @@ -795,7 +810,7 @@ "metadata": { "id": "F-Y7sSyAV3tn" }, - "execution_count": null, + "execution_count": 17, "outputs": [] }, { @@ -823,9 +838,9 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "e9d969ad-4e51-4e7c-ffd5-a72f6374bcf6" + "outputId": "1752019e-1da0-4d32-b667-60b55535176e" }, - "execution_count": null, + "execution_count": 18, "outputs": [ { "output_type": "stream", @@ -871,9 +886,9 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "f88329d1-f651-4c89-eedc-8aac2da278a5" + "outputId": "9587a18e-bd30-48f3-fcca-5a935995ad93" }, - "execution_count": null, + "execution_count": 19, "outputs": [ { "output_type": "stream", @@ -907,22 +922,22 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "fff72e06-4ef1-4311-9d3e-1cf0383da3f6", + "outputId": "34ff0993-896d-48ad-c2d0-c08b7fd79ac3", "pycharm": { "is_executing": true } }, - "execution_count": null, + "execution_count": 20, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ - "" + "" ] }, "metadata": {}, - "execution_count": 109 + "execution_count": 20 } ] }, @@ -1187,7 +1202,7 @@ "metadata": { "id": "A8_HVvu9Uvfl" }, - "execution_count": null, + "execution_count": 21, "outputs": [] }, { @@ -1210,18 +1225,18 @@ "base_uri": "https://localhost:8080/" }, "id": "uV7PeokXcURb", - "outputId": "829bbb80-f814-45fb-a2cc-8cb68dc4fd6b" + "outputId": "7c28955f-a2f1-4e63-af98-e0138afd6a66" }, - "execution_count": null, + "execution_count": 22, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "{'schemaNodeId': 'cldue0sfz0xuk070h5m79fxr7', 'featureSchemaId': 'cldue0sfz0xuj070hhe8abich', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'cldue0sg00xuq070hcd11ew6c', 'featureSchemaId': 'cldue0sg00xul070hfmr2ctri', 'required': False, 'name': 'bbox_with_radio_subclass', 'tool': 'rectangle', 'color': '#7fff00', 'archived': 0, 'classifications': [{'schemaNodeId': 'cldue0sg00xup070ha6bm5j6j', 'featureSchemaId': 'cldue0sg00xum070hbja6ekim', 'archived': 0, 'required': False, 'instructions': 'sub_radio_question', 'name': 'sub_radio_question', 'type': 'radio', 'options': [{'schemaNodeId': 'cldue0sg00xuo070ha4qi5dzz', 'featureSchemaId': 'cldue0sg00xun070hgs3h2t3y', 'label': 'first_sub_radio_answer', 'value': 'first_sub_radio_answer'}]}]}\n", - "{'schemaNodeId': 'cldue0sg00xus070hasoyhc7i', 'featureSchemaId': 'cldue0sg00xur070hds6dfn5s', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'cldue0sg00xuu070hgle477r7', 'featureSchemaId': 'cldue0sg00xut070h5ysf6h4b', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#7f00ff', 'archived': 0, 'classifications': []}\n" + "{'schemaNodeId': 'cldyrtcxi001707yra30a43ky', 'featureSchemaId': 'cldyrtcxi001607yr5j5b83ps', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'cldyrtcxj001d07yrcpumdrzy', 'featureSchemaId': 'cldyrtcxi001807yrggaaal18', 'required': False, 'name': 'bbox_with_radio_subclass', 'tool': 'rectangle', 'color': '#7fff00', 'archived': 0, 'classifications': [{'schemaNodeId': 'cldyrtcxj001c07yr498u7sjy', 'featureSchemaId': 'cldyrtcxj001907yr3idhdbgi', 'archived': 0, 'required': False, 'instructions': 'sub_radio_question', 'name': 'sub_radio_question', 'type': 'radio', 'options': [{'schemaNodeId': 'cldyrtcxj001b07yr2afe29ej', 'featureSchemaId': 'cldyrtcxj001a07yr3ro1dhpb', 'label': 'first_sub_radio_answer', 'value': 'first_sub_radio_answer'}]}]}\n", + "{'schemaNodeId': 'cldyrtcxj001f07yrh4k3g2sl', 'featureSchemaId': 'cldyrtcxj001e07yrcge9h9b8', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'cldyrtcxj001h07yrdvca3afo', 'featureSchemaId': 'cldyrtcxj001g07yr8oo9647y', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#7f00ff', 'archived': 0, 'classifications': []}\n" ] }, { @@ -1231,20 +1246,20 @@ "{'name': 'bbox_with_radio_subclass',\n", " 'segments': [{'keyframes': [{'frame': 13,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]},\n", + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]},\n", " {'frame': 14,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]},\n", + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]},\n", " {'frame': 15,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", - " 'classifications': [{'schemaId': 'cldue0sg00xum070hbja6ekim',\n", - " 'answer': {'schemaId': 'cldue0sg00xun070hgs3h2t3y'}}]}]}]}" + " 'classifications': [{'schemaId': 'cldyrtcxj001907yr3idhdbgi',\n", + " 'answer': {'schemaId': 'cldyrtcxj001a07yr3ro1dhpb'}}]}]}]}" ] }, "metadata": {}, - "execution_count": 111 + "execution_count": 22 } ] }, @@ -1273,7 +1288,7 @@ "metadata": { "id": "9gD_alThQA3G" }, - "execution_count": null, + "execution_count": 23, "outputs": [] }, { @@ -1303,9 +1318,9 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "21c3a6e4-6df7-4e01-d719-6df2cdf5753c" + "outputId": "e54c658c-9841-4287-a5c6-f94fccb26fee" }, - "execution_count": null, + "execution_count": 24, "outputs": [ { "output_type": "stream", @@ -1347,9 +1362,9 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "901b7b6e-a42d-43fd-9c2e-c2e11d0c4510" + "outputId": "894a7e5d-c13c-4a37-abeb-58389bdd15cd" }, - "execution_count": null, + "execution_count": 25, "outputs": [ { "output_type": "execute_result", @@ -1359,7 +1374,7 @@ ] }, "metadata": {}, - "execution_count": 114 + "execution_count": 25 } ] }, @@ -1381,7 +1396,7 @@ "metadata": { "id": "aAhkyvJlWK1p" }, - "execution_count": null, + "execution_count": 26, "outputs": [] } ]