From 7542dc84a8dcdcb0282d3e6e14acf15b4ad670d5 Mon Sep 17 00:00:00 2001 From: Joseph Xu Date: Mon, 13 Jan 2025 12:13:53 -0800 Subject: [PATCH] Fix colab bug. PiperOrigin-RevId: 715062074 --- src/colab/skai_assessment_notebook.ipynb | 55 ++++++++++++------------ src/colab/skai_assessment_notebook.py | 1 + 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/colab/skai_assessment_notebook.ipynb b/src/colab/skai_assessment_notebook.ipynb index ddb8f5c..51a3ead 100644 --- a/src/colab/skai_assessment_notebook.ipynb +++ b/src/colab/skai_assessment_notebook.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eae43051", + "id": "a5f479e8", "metadata": { "cellView": "form" }, @@ -53,7 +53,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04a304e2", + "id": "80c320c5", "metadata": { "cellView": "form" }, @@ -107,6 +107,7 @@ "AFTER_IMAGE_9 = '' # @param {type:\"string\"}\n", "\n", "# Constants\n", + "SKAI_CODE_DIR = '/content/skai_src'\n", "OPEN_BUILDINGS_FEATURE_COLLECTION = 'GOOGLE/Research/open-buildings/v3/polygons'\n", "OSM_OVERPASS_URL = 'https://lz4.overpass-api.de/api/interpreter'\n", "TRAIN_TFRECORD_NAME = 'labeled_examples_train.tfrecord'\n", @@ -173,7 +174,7 @@ }, { "cell_type": "markdown", - "id": "ac665ca1", + "id": "00df6704", "metadata": {}, "source": [ "#Initialization" @@ -182,7 +183,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8db9f358", + "id": "c60a2894", "metadata": { "cellView": "form" }, @@ -200,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4e48e166", + "id": "987dd30f", "metadata": { "cellView": "form" }, @@ -474,7 +475,7 @@ }, { "cell_type": "markdown", - "id": "d6c3d749", + "id": "0ced742d", "metadata": {}, "source": [ "# Check Assessment Status\n", @@ -486,7 +487,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c560e8c", + "id": "809a9ceb", "metadata": { "cellView": "form" }, @@ -546,7 +547,7 @@ }, { "cell_type": "markdown", - "id": "dc765bfa", + "id": "a94d0d52", "metadata": {}, "source": [ "# Example Generation" @@ -555,7 +556,7 @@ { "cell_type": "code", "execution_count": null, - "id": "72d3d0c9", + "id": "01b1e1cb", "metadata": { "cellView": "form" }, @@ -593,7 +594,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e835a795", + "id": "10025135", "metadata": { "cellView": "form" }, @@ -721,7 +722,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04e89c2a", + "id": "e531219c", "metadata": { "cellView": "form" }, @@ -775,7 +776,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78721d9c", + "id": "41ee7b89", "metadata": { "cellView": "form" }, @@ -809,7 +810,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c3c9ce0a", + "id": "c0992527", "metadata": { "cellView": "form" }, @@ -835,7 +836,7 @@ { "cell_type": "code", "execution_count": null, - "id": "555f2a5f", + "id": "2e455b57", "metadata": { "cellView": "form" }, @@ -870,7 +871,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57f8ce7e", + "id": "18340d2e", "metadata": { "cellView": "form" }, @@ -891,7 +892,7 @@ }, { "cell_type": "markdown", - "id": "3d73947f", + "id": "16f73da4", "metadata": {}, "source": [ "# Labeling" @@ -900,7 +901,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cc44a3be", + "id": "54f1b197", "metadata": { "cellView": "form" }, @@ -1002,7 +1003,7 @@ }, { "cell_type": "markdown", - "id": "4b371fa1", + "id": "6f5d7c9e", "metadata": {}, "source": [ "When the labeling project is complete, download the CSV from the labeling tool\n", @@ -1015,7 +1016,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d706fbff", + "id": "e9cbf014", "metadata": { "cellView": "form" }, @@ -1050,7 +1051,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25e51ffc", + "id": "f0b04858", "metadata": { "cellView": "form" }, @@ -1114,7 +1115,7 @@ { "cell_type": "code", "execution_count": null, - "id": "14bcc064", + "id": "a5c6cc7d", "metadata": { "cellView": "form" }, @@ -1220,7 +1221,7 @@ }, { "cell_type": "markdown", - "id": "933ba4fc", + "id": "8625973e", "metadata": {}, "source": [ "# Fine Tuning" @@ -1229,7 +1230,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c5442ad5", + "id": "9d63c26d", "metadata": { "cellView": "form" }, @@ -1321,7 +1322,7 @@ { "cell_type": "code", "execution_count": null, - "id": "520e5852", + "id": "1a233d82", "metadata": { "cellView": "form", "lines_to_next_cell": 1 @@ -1370,7 +1371,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94699857", + "id": "d6474602", "metadata": { "cellView": "form" }, @@ -1629,7 +1630,7 @@ { "cell_type": "code", "execution_count": null, - "id": "905a140b", + "id": "189eeb11", "metadata": { "cellView": "form" }, @@ -1746,7 +1747,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f1c7b44", + "id": "03e4cae8", "metadata": { "cellView": "form" }, diff --git a/src/colab/skai_assessment_notebook.py b/src/colab/skai_assessment_notebook.py index 9be6198..213d9d9 100644 --- a/src/colab/skai_assessment_notebook.py +++ b/src/colab/skai_assessment_notebook.py @@ -102,6 +102,7 @@ def install_requirements(): AFTER_IMAGE_9 = '' # @param {type:"string"} # Constants +SKAI_CODE_DIR = '/content/skai_src' OPEN_BUILDINGS_FEATURE_COLLECTION = 'GOOGLE/Research/open-buildings/v3/polygons' OSM_OVERPASS_URL = 'https://lz4.overpass-api.de/api/interpreter' TRAIN_TFRECORD_NAME = 'labeled_examples_train.tfrecord'