diff --git a/examples/annotation_import/video.ipynb b/examples/annotation_import/video.ipynb index f2ba46337..0d151fe7f 100644 --- a/examples/annotation_import/video.ipynb +++ b/examples/annotation_import/video.ipynb @@ -67,21 +67,21 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "voluntary-minister", - "outputId": "e8d4945a-2268-40f0-d909-be1f198d7b09" + "outputId": "5b41a2ab-e9e9-400c-e595-05bac9f2c57c" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m185.5/185.5 KB\u001b[0m \u001b[31m8.1 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[31m73.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m185.5/185.5 KB\u001b[0m \u001b[31m6.1 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[31m26.2 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" ] @@ -94,7 +94,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "metadata": { "id": "committed-richards" }, @@ -124,14 +124,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "metadata": { "id": "affecting-myanmar" }, "outputs": [], "source": [ "# Add your api key\n", - "API_KEY = None\n", + "API_KEY=None\n", "client = Client(api_key=API_KEY)" ], "id": "affecting-myanmar" @@ -159,7 +159,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, "metadata": { "id": "suburban-crowd" }, @@ -208,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 5, "metadata": { "id": "NCkQ1pB6zBne" }, @@ -234,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 6, "metadata": { "id": "8xF7QbwZ41Q5" }, @@ -320,13 +320,13 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 7, "metadata": { "id": "hm-zJTtE_APt" }, "outputs": [], "source": [ - "######## Checklist classification ########\n", + "######## classifications ########\n", "\n", "## NDJSON\n", "\n", @@ -365,13 +365,13 @@ "id": "N5ibW4frr5rw" }, "id": "N5ibW4frr5rw", - "execution_count": 11, + "execution_count": 8, "outputs": [] }, { "cell_type": "code", "source": [ - "########## Frame Classifications ##########\n", + "########## Classifications under frame base tools ##########\n", "\n", "# Frame base nested classifications do not support using the feature's name to extract ontology features. \n", "# For this single case we are going to use the classification's featureSchemaId and the answers' featureSchemaId \n", @@ -385,11 +385,11 @@ " {\n", " \"frame\": 10,\n", " \"bbox\": {\n", - " \"top\": 1366.0,\n", - " \"left\": 662.0,\n", - " \"height\": 1688.0,\n", - " \"width\": 876.0\n", - " },\n", + " \"top\": 146.0,\n", + " \"left\": 98.0,\n", + " \"height\": 382.0,\n", + " \"width\": 341.0\n", + " },\n", " \"classifications\" : [\n", " {'schemaId' : '', 'answer' : {'schemaId': '' }}\n", " ] \n", @@ -397,11 +397,11 @@ " { \n", " \"frame\": 11,\n", " \"bbox\": {\n", - " \"top\": 1366.0,\n", - " \"left\": 662.0,\n", - " \"height\": 1688.0,\n", - " \"width\": 876.0\n", - " },\n", + " \"top\": 146.0,\n", + " \"left\": 98.0,\n", + " \"height\": 382.0,\n", + " \"width\": 341.0\n", + " },\n", " \"classifications\" : [\n", " {'schemaId' : '', 'answer' : {'schemaId': '' }}\n", " ] \n", @@ -409,11 +409,11 @@ " { \n", " \"frame\": 13,\n", " \"bbox\": {\n", - " \"top\": 1366.0,\n", - " \"left\": 662.0,\n", - " \"height\": 1688.0,\n", - " \"width\": 876.0\n", - " },\n", + " \"top\": 146.0,\n", + " \"left\": 98.0,\n", + " \"height\": 382.0,\n", + " \"width\": 341.0\n", + " },\n", " \"classifications\" : [\n", " {'schemaId' : '', 'answer' : {'schemaId': '' }}\n", " ] \n", @@ -427,7 +427,7 @@ "id": "TU6PLazxZdWl" }, "id": "TU6PLazxZdWl", - "execution_count": 12, + "execution_count": 9, "outputs": [] }, { @@ -452,30 +452,30 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ysLRIWM3HGFv", - "outputId": "517efa9f-f85a-4de4-eaa2-fbf45ad9e325" + "outputId": "ef2fcf93-9b4b-478d-a500-3f89cb2c5529" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "clci3wcf60nfu070kctyy1n4t\n", + "clcj3stei2y2c07zx2qxmfa7t\n", "\n" ] } @@ -515,7 +515,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 11, "metadata": { "id": "ZCjNJBTSKONt" }, @@ -595,7 +595,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 12, "metadata": { "id": "wPLSHXrQPfHh" }, @@ -640,13 +640,13 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 13, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "UhqBD3gAYCAg", - "outputId": "b1917de7-e584-4ee6-e795-869e15646765" + "outputId": "9a327b20-158d-4e28-bce0-aaf6248a9cb1" }, "outputs": [ { @@ -655,11 +655,11 @@ "text": [ "Batch: \n" ] } @@ -732,26 +732,26 @@ "base_uri": "https://localhost:8080/" }, "id": "4V7BXb-XfFCY", - "outputId": "2ee58656-eb62-4f31-9e3f-3e5db727e44d" + "outputId": "5649b763-eea5-4c20-883e-4c372c91dddf" }, "id": "4V7BXb-XfFCY", - "execution_count": 51, + "execution_count": 14, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "{'schemaNodeId': 'clci3z94n0n6d073ub87k7k0v', 'featureSchemaId': 'clci3z94n0n6c073ufr1ud763', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'clci3z94n0n6f073u5gz9enfy', 'featureSchemaId': 'clci3z94n0n6e073u5u06aowr', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#7fff00', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'clci3z94n0n6h073ugpe62urq', 'featureSchemaId': 'clci3z94n0n6g073u6n0205k3', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", - "{'schemaNodeId': 'clci3z94n0n6r073u8m7ie885', 'featureSchemaId': 'clci3z94n0n6i073uhcjf6xli', 'required': False, 'name': 'bbox_class', 'tool': 'rectangle', 'color': '#7f00ff', 'archived': 0, 'classifications': [{'schemaNodeId': 'clci3z94n0n6q073u7kerbw3x', 'featureSchemaId': 'clci3z94n0n6j073uh032ajsd', 'archived': 0, 'required': False, 'instructions': 'bbox_radio', 'name': 'bbox_radio', 'type': 'radio', 'options': [{'schemaNodeId': 'clci3z94n0n6l073u3zwsdoav', 'featureSchemaId': 'clci3z94n0n6k073u215fhvbf', 'label': 'bbox_radio_answer_1', 'value': 'bbox_radio_answer_1'}, {'schemaNodeId': 'clci3z94n0n6n073ufsdchpyk', 'featureSchemaId': 'clci3z94n0n6m073uf0odgc96', 'label': 'bbox_radio_answer_2', 'value': 'bbox_radio_answer_2'}, {'schemaNodeId': 'clci3z94n0n6p073ubli8c9f2', 'featureSchemaId': 'clci3z94n0n6o073ua030ampv', 'label': 'bbox_radio_answer_3', 'value': 'bbox_radio_answer_3'}]}]}\n" + "{'schemaNodeId': 'clcj3stvr0pr6073tgie23t2e', 'featureSchemaId': 'clcj3stvr0pr5073t9stn594z', 'required': False, 'name': 'bbox_video', 'tool': 'rectangle', 'color': '#ff0000', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'clcj3stvs0pr8073t2wbm6tgi', 'featureSchemaId': 'clcj3stvs0pr7073te5ig6j2u', 'required': False, 'name': 'point_video', 'tool': 'point', 'color': '#7fff00', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'clcj3stvs0pra073taql7gfn4', 'featureSchemaId': 'clcj3stvs0pr9073t8u3sd8uq', 'required': False, 'name': 'line_video_frame', 'tool': 'line', 'color': '#00ffff', 'archived': 0, 'classifications': []}\n", + "{'schemaNodeId': 'clcj3stvs0prk073tbheyamzl', 'featureSchemaId': 'clcj3stvs0prb073t9yc6elwe', 'required': False, 'name': 'bbox_class', 'tool': 'rectangle', 'color': '#7f00ff', 'archived': 0, 'classifications': [{'schemaNodeId': 'clcj3stvs0prj073t9vnn4r93', 'featureSchemaId': 'clcj3stvs0prc073t736kb4zg', 'archived': 0, 'required': False, 'instructions': 'bbox_radio', 'name': 'bbox_radio', 'type': 'radio', 'options': [{'schemaNodeId': 'clcj3stvs0pre073tbem68m8u', 'featureSchemaId': 'clcj3stvs0prd073tezro16ts', 'label': 'bbox_radio_answer_1', 'value': 'bbox_radio_answer_1'}, {'schemaNodeId': 'clcj3stvs0prg073tdsrkendk', 'featureSchemaId': 'clcj3stvs0prf073tgohycpqf', 'label': 'bbox_radio_answer_2', 'value': 'bbox_radio_answer_2'}, {'schemaNodeId': 'clcj3stvs0pri073tg1gf2mt7', 'featureSchemaId': 'clcj3stvs0prh073tg35ndk83', 'label': 'bbox_radio_answer_3', 'value': 'bbox_radio_answer_3'}]}]}\n" ] } ] }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 15, "metadata": { "id": "qnFTqR6eZ3mE" }, @@ -787,10 +787,10 @@ "base_uri": "https://localhost:8080/" }, "id": "ZNQAjFculCTl", - "outputId": "1e32c870-234b-4b0e-dd9d-ad993a87607a" + "outputId": "40071166-90a0-4f5d-b16e-1f5f02a0f378" }, "id": "ZNQAjFculCTl", - "execution_count": 53, + "execution_count": 16, "outputs": [ { "output_type": "execute_result", @@ -799,8 +799,8 @@ "[{'name': 'point_video',\n", " 'segments': [{'keyframes': [{'frame': 17,\n", " 'point': {'x': 660.134, 'y': 407.926}}]}],\n", - " 'uuid': '0a8ebf1d-abb7-4eb0-b4e5-6fa72e2249e2',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': '4e6ab092-a2cf-4f8d-91cc-16811e3b4d1d',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'bbox_video',\n", " 'segments': [{'keyframes': [{'frame': 13,\n", " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0}},\n", @@ -811,8 +811,8 @@ " 'left': 98.0,\n", " 'height': 382.0,\n", " 'width': 341.0}}]}],\n", - " 'uuid': 'cd992918-7ba4-484e-840e-d00fe043342b',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': '64985f21-5fdc-42f5-9ea1-dbce045eee02',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'line_video_frame',\n", " 'segments': [{'keyframes': [{'frame': 5,\n", " 'line': [{'x': 680, 'y': 100},\n", @@ -829,44 +829,44 @@ " {'keyframes': [{'frame': 24,\n", " 'line': [{'x': 300, 'y': 310}, {'x': 330, 'y': 430}]},\n", " {'frame': 45, 'line': [{'x': 600, 'y': 810}, {'x': 900, 'y': 930}]}]}],\n", - " 'uuid': '6b55c42d-e32d-44ca-944e-32d5173ee8f7',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': '91930c69-5acb-4619-916c-671824e35182',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'checklist_class',\n", " 'answer': [{'name': 'first_checklist_answer',\n", " 'frames': [{'start': 29, 'end': 35}, {'start': 48, 'end': 65}]},\n", " {'name': 'second_checklist_answer',\n", " 'frames': [{'start': 29, 'end': 35}, {'start': 48, 'end': 65}]}],\n", - " 'uuid': 'c7740bbf-c7f9-4c8f-a00b-9dbe21f1ec81',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': '48578bbf-058d-4c3b-9100-260c72e247f3',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'radio_class_global',\n", " 'answer': {'name': 'first_radio_answer'},\n", - " 'uuid': '5603c24f-7567-4af1-9ca8-df289dcef1ea',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': 'b19b3c48-48e3-4c65-b2e0-206db83cc707',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'radio_question_nested',\n", " 'answer': {'name': 'first_radio_question'},\n", " 'classifications': [{'name': 'sub_question_radio',\n", " 'answer': {'name': 'sub_answer'}}],\n", - " 'uuid': 'cb0532c5-5b24-41a6-94bd-1ff619931ddf',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}},\n", + " 'uuid': '96d97f0f-4d6b-4be7-a234-eeb2844e28bb',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}},\n", " {'name': 'bbox_class',\n", " 'segments': [{'keyframes': [{'frame': 10,\n", - " 'bbox': {'top': 1366.0, 'left': 662.0, 'height': 1688.0, 'width': 876.0},\n", - " 'classifications': [{'schemaId': 'clci3z94n0n6j073uh032ajsd',\n", - " 'answer': {'schemaId': 'clci3z94n0n6k073u215fhvbf'}}]},\n", + " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", + " 'classifications': [{'schemaId': 'clcj3stvs0prc073t736kb4zg',\n", + " 'answer': {'schemaId': 'clcj3stvs0prd073tezro16ts'}}]},\n", " {'frame': 11,\n", - " 'bbox': {'top': 1366.0, 'left': 662.0, 'height': 1688.0, 'width': 876.0},\n", - " 'classifications': [{'schemaId': 'clci3z94n0n6j073uh032ajsd',\n", - " 'answer': {'schemaId': 'clci3z94n0n6k073u215fhvbf'}}]},\n", + " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", + " 'classifications': [{'schemaId': 'clcj3stvs0prc073t736kb4zg',\n", + " 'answer': {'schemaId': 'clcj3stvs0prd073tezro16ts'}}]},\n", " {'frame': 13,\n", - " 'bbox': {'top': 1366.0, 'left': 662.0, 'height': 1688.0, 'width': 876.0},\n", - " 'classifications': [{'schemaId': 'clci3z94n0n6j073uh032ajsd',\n", - " 'answer': {'schemaId': 'clci3z94n0n6k073u215fhvbf'}}]}]}],\n", - " 'uuid': '1e6c9151-2934-4c0a-a4d9-7b68da1996db',\n", - " 'dataRow': {'id': 'clci3wcf60nfu070kctyy1n4t'}}]" + " 'bbox': {'top': 146.0, 'left': 98.0, 'height': 382.0, 'width': 341.0},\n", + " 'classifications': [{'schemaId': 'clcj3stvs0prc073t736kb4zg',\n", + " 'answer': {'schemaId': 'clcj3stvs0prd073tezro16ts'}}]}]}],\n", + " 'uuid': 'fae6e47d-bf14-40e0-9c8c-faef45d2a273',\n", + " 'dataRow': {'id': 'clcj3stei2y2c07zx2qxmfa7t'}}]" ] }, "metadata": {}, - "execution_count": 53 + "execution_count": 16 } ] }, @@ -893,13 +893,13 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 17, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "entire-community", - "outputId": "791b9ec6-07c5-437d-fedc-84d4fb990247" + "outputId": "8085948a-2066-47df-8958-929303473c9c" }, "outputs": [ { @@ -937,13 +937,13 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 18, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "si-6kQ4mwUBO", - "outputId": "dd243939-6e73-4308-f72e-2770a0ff3a2d" + "outputId": "046eab4b-4d3b-41c0-e880-68de80052756" }, "outputs": [ { @@ -981,7 +981,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": { "id": "yPZaLM74LFhB" },