Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"import os\n",
"from datetime import datetime\n",
"from pathlib import Path\n",
"from arcgis.learn import MaskRCNN, prepare_data\n",
"from arcgis.gis import GIS"
"from arcgis.learn import MaskRCNN, prepare_data"
]
},
{
Expand Down Expand Up @@ -617,6 +617,16 @@
"As we can see, with 10 epochs, we are already seeing reasonable results. Further improvments can be achieved through more sophisticated hyperparameter tuning. Let's save the model, so it can be used for inference, or further training subsequently. By default, it will be saved into your data_path that you specified in the very beginning of this notebook, in the `prepare_data` call."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"timestamp = datetime.now().strftime(\"%Y-%m-%d_%H:%M:%S\")\n",
"model_name = \"Building_footprint_10epochs_\" + timestamp"
]
},
{
"cell_type": "code",
"execution_count": 16,
Expand Down Expand Up @@ -677,7 +687,7 @@
}
],
"source": [
"model.save('Building_footprint_10epochs', publish=True)"
"model.save(model_name, publish=True)"
]
},
{
Expand Down Expand Up @@ -752,9 +762,9 @@
"notebookRuntimeVersion": ""
},
"kernelspec": {
"display_name": "Python [conda env:conda-dl] *",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "conda-env-conda-dl-py"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -766,7 +776,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,9 @@
"notebookRuntimeVersion": ""
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "python3"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -840,7 +840,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.13.7"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1719,9 +1719,9 @@
"notebookRuntimeVersion": ""
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "python3"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1733,7 +1733,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,12 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import pandas as pd\n",
"from sklearn.discriminant_analysis import LinearDiscriminantAnalysis\n",
"from sklearn.preprocessing import StandardScaler\n",
"from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, classification_report\n",
"\n",
"from arcgis.gis import GIS\n",
"from arcgis.learn import MLModel, prepare_tabulardata"
]
},
Expand Down Expand Up @@ -97,6 +94,7 @@
"metadata": {},
"outputs": [],
"source": [
"from arcgis.gis import GIS\n",
"gis = GIS(\"home\")"
]
},
Expand Down Expand Up @@ -2178,9 +2176,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "pro3.6_certify2.4.2_24Sep2025 [conda env:conda-pro3.6_certify2.4.2_24Sep2025] *",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "conda-env-conda-pro3.6_certify2.4.2_24Sep2025-pro3.6_certify2.4.2_24sep2025"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,13 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.metrics import r2_score\n",
"import sklearn.metrics as metrics\n",
"\n",
"from arcgis.gis import GIS\n",
"from arcgis.learn import TimeSeriesModel, prepare_tabulardata"
]
},
Expand All @@ -91,6 +87,7 @@
"metadata": {},
"outputs": [],
"source": [
"from arcgis.gis import GIS\n",
"gis = GIS(\"home\")"
]
},
Expand Down Expand Up @@ -1903,9 +1900,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "python3"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1917,7 +1914,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@
"## Export training data"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "ad42be61",
"metadata": {},
"outputs": [],
"source": [
"from arcgis.gis import GIS"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand All @@ -129,6 +119,7 @@
"outputs": [],
"source": [
"# Connect to GIS\n",
"from arcgis.gis import GIS\n",
"gis = GIS('home')"
]
},
Expand Down Expand Up @@ -1134,9 +1125,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "python3"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1148,7 +1139,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"import os\n",
"import zipfile\n",
"from pathlib import Path\n",
"from datetime import datetime\n",
"from arcgis.learn import prepare_data, DETReg"
]
},
Expand Down Expand Up @@ -439,9 +440,7 @@
"cell_type": "code",
"execution_count": 4,
"id": "f41c1a79",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"detreg_model = DETReg(data)"
Expand All @@ -451,9 +450,7 @@
"cell_type": "code",
"execution_count": 6,
"id": "ef1115d7",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1216,9 +1213,7 @@
"cell_type": "code",
"execution_count": 27,
"id": "64810d9b",
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1282,6 +1277,17 @@
"We will use the `save()` method to save the trained model. By default, it will be saved to the 'models' sub-folder within our training data folder."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e5f19663-d37a-44af-8031-1e0ec0f5da52",
"metadata": {},
"outputs": [],
"source": [
"timestamp = datetime.now().strftime(\"%Y-%m-%d_%H:%M:%S\")\n",
"model_name = \"palm_e100_\" + timestamp"
]
},
{
"cell_type": "code",
"execution_count": 24,
Expand All @@ -1308,7 +1314,7 @@
}
],
"source": [
"detreg_model.save('palm_e100', publish=True)"
"detreg_model.save(model_name, publish=True)"
]
},
{
Expand Down Expand Up @@ -1402,9 +1408,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "python3"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1416,7 +1422,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.11"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import numpy as np\n",
Expand All @@ -77,7 +76,6 @@
"from sklearn.metrics import r2_score\n",
"import sklearn.metrics as metrics\n",
"\n",
"from arcgis.gis import GIS\n",
"from arcgis.learn import TimeSeriesModel, prepare_tabulardata\n",
"from arcgis.features import FeatureLayer, FeatureLayerCollection"
]
Expand All @@ -95,6 +93,7 @@
"metadata": {},
"outputs": [],
"source": [
"from arcgis.gis import GIS\n",
"gis = GIS(\"home\")"
]
},
Expand Down Expand Up @@ -4079,9 +4078,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "condapac_18March2024",
"display_name": "Python [conda env:dlenv_30_9] *",
"language": "python",
"name": "condapac_18march2024"
"name": "conda-env-dlenv_30_9-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -4093,7 +4092,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.13.7"
}
},
"nbformat": 4,
Expand Down
Loading