{ "cells": [ { "cell_type": "markdown", "id": "f30c9a31", "metadata": {}, "source": [ "# Assess wildfire damage with Amazon SageMaker geospatial capabilities" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "This notebook's CI test result for us-west-2 is as follows. CI test results in other regions can be found at the end of the notebook. \n", "\n", "![This us-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-2/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "---" ] }, { "cell_type": "markdown", "id": "91a37ab9", "metadata": {}, "source": [ "This notebook demonstrates how to use Amazon SageMaker geospatial capabilities to assess wildfire damages using multi-temporal Sentinel-2 satellite data.\n", "\n", "The area of interest for this example is located in Northern California, from a region which was affected by the [Dixie Wildfire](https://en.wikipedia.org/wiki/Dixie_Fire) in 2021.\n", "\n", "The workflow is as follows:\n", "\n", "- Step 1: [Import SageMaker geospatial capabilities SDK](#Import-SageMaker-geospatial-capabilities-SDK)\n", "- Step 2: [Inspect the area of interest](#Inspect-the-area-of-interest)\n", "- Step 3: [Create an Earth Observation Job (EOJ) to perform landcover segmentation](#Create-an-Earth-Observation-Job-to-perform-landcover-segmentation)\n", "- Step 4: [Visualize EOJ results in Amazon SageMaker geospatial Map SDK](#Visualize-EOJ-results-in-Amazon-SageMaker-geospatial-Map-SDK)\n", "- Step 5: [Export EOJ output to S3](#Export-EOJ-output-to-S3)\n", "- Step 6: [Quantify loss of vegetation and wildfire impact area](#Quantify-loss-of-vegetation-and-wildfire-impact-area)" ] }, { "cell_type": "markdown", "id": "f1b0474d", "metadata": {}, "source": [ "## Prerequisites\n", "\n", "This notebook runs with Kernel Geospatial 1.0. Note that the following policies need to be attached to the execution role that you used to run this notebook:\n", "\n", "- AmazonSageMakerFullAccess\n", "- AmazonSageMakerGeospatialFullAccess\n", "\n", "You can see the policies attached to the role in the IAM console under the permissions tab. If required, add the roles using the 'Add Permissions' button.\n", "\n", "In addition to these policies, ensure that the execution role's trust policy allows the SageMaker-GeoSpatial service to assume the role. This can be done by adding the following trust policy using the 'Trust relationships' tab:\n", "\n", "```\n", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Effect\": \"Allow\",\n", " \"Principal\": {\n", " \"Service\": [\n", " \"sagemaker.amazonaws.com\",\n", " \"sagemaker-geospatial.amazonaws.com\"\n", " ]\n", " },\n", " \"Action\": \"sts:AssumeRole\"\n", " }\n", " ]\n", "}\n", "```" ] }, { "cell_type": "markdown", "id": "90bc64a2", "metadata": {}, "source": [ "## Import SageMaker geospatial capabilities SDK" ] }, { "cell_type": "code", "execution_count": null, "id": "3a5c02eb-bc38-4240-9b2b-95c899558d59", "metadata": { "tags": [] }, "outputs": [], "source": [ "import boto3\n", "import sagemaker\n", "import sagemaker_geospatial_map\n", "\n", "session = boto3.Session()\n", "execution_role = sagemaker.get_execution_role()\n", "geospatial_client = session.client(service_name=\"sagemaker-geospatial\")" ] }, { "cell_type": "markdown", "id": "6bbfbd54", "metadata": {}, "source": [ "## Inspect the area of interest\n", "\n", "The raster data collection is queried with coordinates of the area impacted by the wildfire, and returns a list of satellite imagery matching the selected filters.\n", "\n", "The data in cloud optimized GeoTIFF (COG) format allows a visual inspection of the impacted area before and after the wildfire." ] }, { "cell_type": "code", "execution_count": null, "id": "0890ca24", "metadata": { "tags": [] }, "outputs": [], "source": [ "search_params = {\n", " \"Arn\": \"arn:aws:sagemaker-geospatial:us-west-2:378778860802:raster-data-collection/public/nmqj48dcu3g7ayw8\", # Sentinel-2 L2A data\n", " \"RasterDataCollectionQuery\": {\n", " \"AreaOfInterest\": {\n", " \"AreaOfInterestGeometry\": {\n", " \"PolygonGeometry\": {\n", " \"Coordinates\": [\n", " [\n", " [-121.32559295351282, 40.386534879495315],\n", " [-121.32559295351282, 40.09770246706907],\n", " [-120.86738632168885, 40.09770246706907],\n", " [-120.86738632168885, 40.386534879495315],\n", " [-121.32559295351282, 40.386534879495315],\n", " ]\n", " ]\n", " }\n", " }\n", " },\n", " \"TimeRangeFilter\": {\n", " \"StartTime\": \"2021-06-01T00:00:00Z\",\n", " \"EndTime\": \"2021-09-30T23:59:59Z\",\n", " },\n", " \"PropertyFilters\": {\n", " \"Properties\": [{\"Property\": {\"EoCloudCover\": {\"LowerBound\": 0, \"UpperBound\": 0.1}}}],\n", " \"LogicalOperator\": \"AND\",\n", " },\n", " \"BandFilter\": [\"visual\"],\n", " },\n", "}\n", "\n", "cog_urls = []\n", "next_token = True\n", "while next_token:\n", " search_result = geospatial_client.search_raster_data_collection(**search_params)\n", " for item in search_result[\"Items\"]:\n", " asset_url = item[\"Assets\"][\"visual\"][\"Href\"]\n", " cog_urls.append(asset_url)\n", " next_token = search_result.get(\"NextToken\")\n", " search_params[\"NextToken\"] = next_token" ] }, { "cell_type": "code", "execution_count": null, "id": "c1a7e501", "metadata": { "tags": [] }, "outputs": [], "source": [ "import rasterio\n", "from rasterio.plot import show\n", "import matplotlib.pyplot as plt\n", "\n", "cog_urls.sort(key=lambda x: x.split(\"TFK_\")[1])\n", "\n", "src_pre = rasterio.open(cog_urls[0])\n", "src_post = rasterio.open(cog_urls[-1])\n", "\n", "fig, (ax_before, ax_after) = plt.subplots(1, 2, figsize=(14, 7))\n", "subplot = show(src_pre, ax=ax_before)\n", "subplot.axis(\"off\")\n", "subplot.set_title(\"Pre-wildfire ({})\".format(cog_urls[0].split(\"TFK_\")[1]))\n", "subplot = show(src_post, ax=ax_after)\n", "subplot.axis(\"off\")\n", "subplot.set_title(\"Post-wildfire ({})\".format(cog_urls[-1].split(\"TFK_\")[1]))\n", "plt.show()" ] }, { "cell_type": "markdown", "id": "6dd0236b", "metadata": {}, "source": [ "## Create an Earth Observation Job to perform landcover segmentation\n", "\n", "The following cell shows how to launch an Earth Observation Job (EOJ). In this example, a pre-trained machine learning model for land cover segmentation is used. Depending on your use case, you can choose from a variety of operations and models when running an EOJ.\n", "\n", "In addition to the type of operation, you can also select the area of interest, choose the data providers, and set time-range based and cloud coverage percentage filters." ] }, { "cell_type": "code", "execution_count": null, "id": "98634ab9-9ce1-43e8-9c59-2ac3c1f0be08", "metadata": { "tags": [] }, "outputs": [], "source": [ "eoj_input_config = {\n", " \"RasterDataCollectionQuery\": {\n", " \"RasterDataCollectionArn\": \"arn:aws:sagemaker-geospatial:us-west-2:378778860802:raster-data-collection/public/nmqj48dcu3g7ayw8\",\n", " \"AreaOfInterest\": {\n", " \"AreaOfInterestGeometry\": {\n", " \"PolygonGeometry\": {\n", " \"Coordinates\": [\n", " [\n", " [-121.32559295351282, 40.386534879495315],\n", " [-121.32559295351282, 40.09770246706907],\n", " [-120.86738632168885, 40.09770246706907],\n", " [-120.86738632168885, 40.386534879495315],\n", " [-121.32559295351282, 40.386534879495315],\n", " ]\n", " ]\n", " }\n", " }\n", " },\n", " \"TimeRangeFilter\": {\n", " \"StartTime\": \"2021-06-01T00:00:00Z\",\n", " \"EndTime\": \"2021-09-30T23:59:59Z\",\n", " },\n", " \"PropertyFilters\": {\n", " \"Properties\": [{\"Property\": {\"EoCloudCover\": {\"LowerBound\": 0, \"UpperBound\": 0.1}}}],\n", " \"LogicalOperator\": \"AND\",\n", " },\n", " }\n", "}\n", "\n", "eoj_config = {\"LandCoverSegmentationConfig\": {}}\n", "\n", "response = geospatial_client.start_earth_observation_job(\n", " Name=\"dixie-wildfire-landcover-2021\",\n", " InputConfig=eoj_input_config,\n", " JobConfig=eoj_config,\n", " ExecutionRoleArn=execution_role,\n", ")\n", "eoj_arn = response[\"Arn\"]\n", "eoj_arn" ] }, { "cell_type": "code", "execution_count": null, "id": "88418f1b-c267-4a9a-9e2e-41e23301dd55", "metadata": { "tags": [] }, "outputs": [], "source": [ "import time\n", "import datetime\n", "\n", "# check status of created Earth Observation Job and wait until it is completed\n", "eoj_completed = False\n", "while not eoj_completed:\n", " response = geospatial_client.get_earth_observation_job(Arn=eoj_arn)\n", " print(\n", " \"Earth Observation Job status: {} (Last update: {})\".format(\n", " response[\"Status\"], datetime.datetime.now()\n", " ),\n", " end=\"\\r\",\n", " )\n", " eoj_completed = True if response[\"Status\"] == \"COMPLETED\" else False\n", " if not eoj_completed:\n", " time.sleep(30)" ] }, { "cell_type": "markdown", "id": "dbd0efc9", "metadata": {}, "source": [ "## Visualize EOJ results in Amazon SageMaker geospatial Map SDK\n", "\n", "The following cells show how to create a embedded map instance with the geospatial Map SDK and visualize input and output of the Earth Observation Job in the map." ] }, { "cell_type": "code", "execution_count": null, "id": "3e2d5003-bbeb-42a6-b479-8adfa29ad0e3", "metadata": { "tags": [] }, "outputs": [], "source": [ "Map = sagemaker_geospatial_map.create_map({\"is_raster\": True})\n", "Map.set_sagemaker_geospatial_client(geospatial_client)\n", "\n", "# Render the map\n", "Map.render()" ] }, { "cell_type": "code", "execution_count": null, "id": "fa40dd7c", "metadata": { "tags": [] }, "outputs": [], "source": [ "time_range_filter = {\n", " \"start_date\": \"2021-06-01T00:00:00Z\",\n", " \"end_date\": \"2021-09-30T23:59:59Z\",\n", "}\n", "\n", "# Visualize input\n", "config = {\"label\": \"Input\"}\n", "input_layer = Map.visualize_eoj_input(\n", " Arn=eoj_arn, config=config, time_range_filter=time_range_filter\n", ")\n", "\n", "# Visualize output\n", "config = {\"preset\": \"singleBand\", \"band_name\": \"mask\"}\n", "output_layer = Map.visualize_eoj_output(\n", " Arn=eoj_arn, config=config, time_range_filter=time_range_filter\n", ")" ] }, { "cell_type": "markdown", "id": "3946e0b4-763d-451a-a9fc-9f1aeeb8da92", "metadata": { "tags": [] }, "source": [ "#### Land Cover Segmentation Visualization Legend\n", "\n", "![Legend for Land Cover Segmentation](https://docs.aws.amazon.com/images/sagemaker/latest/dg/images/geo_landcover_ss.png)\n" ] }, { "cell_type": "markdown", "id": "6e14a3d7", "metadata": {}, "source": [ "## Export EOJ output to S3" ] }, { "cell_type": "code", "execution_count": null, "id": "48daad55-34bd-44b0-98d8-e41c6de26909", "metadata": { "tags": [] }, "outputs": [], "source": [ "sagemaker_session = sagemaker.Session()\n", "export_bucket = (\n", " sagemaker_session.default_bucket()\n", ") # Alternatively you can use your custom bucket here.\n", "bucket_prefix = \"eoj_dixie_wildfire_landcover\"\n", "\n", "response = geospatial_client.export_earth_observation_job(\n", " Arn=eoj_arn,\n", " ExecutionRoleArn=execution_role,\n", " OutputConfig={\"S3Data\": {\"S3Uri\": f\"s3://{export_bucket}/{bucket_prefix}/\", \"KmsKeyId\": \"\"}},\n", ")\n", "\n", "# Wait until EOJ has been exported to S3\n", "while not response[\"ExportStatus\"] == \"SUCCEEDED\":\n", " response = geospatial_client.get_earth_observation_job(Arn=eoj_arn)\n", " print(\n", " \"Export of Earth Observation Job status: {} (Last update: {})\".format(\n", " response[\"ExportStatus\"], datetime.datetime.now()\n", " ),\n", " end=\"\\r\",\n", " )\n", " if not response[\"ExportStatus\"] == \"SUCCEEDED\":\n", " time.sleep(30)" ] }, { "cell_type": "markdown", "id": "ccb7b1b4", "metadata": {}, "source": [ "## Quantify loss of vegetation and wildfire impact area\n", "\n", "The following cells show how the exported EOJ data can be processed further to quantify the vegetation loss caused by the wildfire and visualize the area which has been impacted." ] }, { "cell_type": "code", "execution_count": null, "id": "01f4daa0-6b42-40a5-a9d1-d58053f4d0a1", "metadata": { "tags": [] }, "outputs": [], "source": [ "import os\n", "from glob import glob\n", "\n", "s3_bucket = session.resource(\"s3\").Bucket(export_bucket)\n", "\n", "# download land cover masks from S3 bucket\n", "mask_dir = \"./dixie-wildfire-landcover/masks\"\n", "os.makedirs(mask_dir, exist_ok=True)\n", "for s3_object in s3_bucket.objects.filter(Prefix=bucket_prefix).all():\n", " path, filename = os.path.split(s3_object.key)\n", " if \"output\" in path:\n", " mask_local_path = mask_dir + \"/\" + filename\n", " s3_bucket.download_file(s3_object.key, mask_local_path)\n", " print(\"Downloaded mask: \" + mask_local_path)\n", "\n", "mask_files = glob(os.path.join(mask_dir, \"*.tif\"))\n", "mask_files.sort(key=lambda x: x.split(\"TFK_\")[1])" ] }, { "cell_type": "code", "execution_count": null, "id": "45d0d636-b961-4ad9-83a6-a243610c83ef", "metadata": { "tags": [] }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import matplotlib.colors\n", "import matplotlib.patches as mpatches\n", "import numpy as np\n", "import tifffile\n", "\n", "landcover_simple_colors = {\n", " \"not vegetated\": \"khaki\",\n", " \"vegetated\": \"olivedrab\",\n", " \"water\": \"lightsteelblue\",\n", "}\n", "\n", "\n", "def extract_masks(date_str):\n", " mask_file = list(filter(lambda x: date_str in x, mask_files))[0]\n", " mask = tifffile.imread(mask_file)\n", " focus_area_mask = mask[400:1100, 600:1350]\n", "\n", " vegetation_mask = np.isin(focus_area_mask, [4]).astype(np.uint8)\n", " water_mask = np.isin(focus_area_mask, [6]).astype(np.uint8)\n", " water_mask[water_mask > 0] = 2\n", " additive_mask = np.add(vegetation_mask, water_mask).astype(np.uint8)\n", "\n", " return (focus_area_mask, vegetation_mask, additive_mask)\n", "\n", "\n", "masks_20210603 = extract_masks(\"20210603\")\n", "masks_20210926 = extract_masks(\"20210926\")" ] }, { "cell_type": "markdown", "id": "e3b12612", "metadata": {}, "source": [ "### Visualize difference in vegetation before and after the wildfire" ] }, { "cell_type": "code", "execution_count": null, "id": "d0866ca6-56ae-4a8d-9094-f764a00ea6ac", "metadata": { "tags": [] }, "outputs": [], "source": [ "fig = plt.figure(figsize=(14, 7))\n", "\n", "fig.add_subplot(1, 2, 1)\n", "plt.imshow(\n", " masks_20210603[2],\n", " cmap=matplotlib.colors.ListedColormap(list(landcover_simple_colors.values()), N=None),\n", ")\n", "plt.title(\"Pre-wildfire\")\n", "plt.axis(\"off\")\n", "ax = fig.add_subplot(1, 2, 2)\n", "hs = plt.imshow(\n", " masks_20210926[2],\n", " cmap=matplotlib.colors.ListedColormap(list(landcover_simple_colors.values()), N=None),\n", ")\n", "plt.title(\"Post-wildfire\")\n", "plt.axis(\"off\")\n", "patches = [mpatches.Patch(color=i[1], label=i[0]) for i in landcover_simple_colors.items()]\n", "plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0)\n", "plt.show()" ] }, { "cell_type": "markdown", "id": "727e0f26", "metadata": {}, "source": [ "### Quantify of loss in vegetation caused by wildfire" ] }, { "cell_type": "code", "execution_count": null, "id": "01768907-f465-4690-9046-441d9f28e4a6", "metadata": { "tags": [] }, "outputs": [], "source": [ "vegetation_loss = round((1 - (masks_20210926[1].sum() / masks_20210603[1].sum())) * 100, 2)\n", "diff_mask = np.add(masks_20210603[1], masks_20210926[1])\n", "plt.figure(figsize=(6, 6))\n", "plt.title(\"Loss in vegetation ({}%)\".format(vegetation_loss))\n", "plt.imshow(diff_mask, cmap=matplotlib.colors.ListedColormap([\"black\", \"crimson\", \"silver\"], N=None))\n", "plt.axis(\"off\")\n", "patches = [mpatches.Patch(color=\"crimson\", label=\"vegetation lost\")]\n", "plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0)\n", "plt.show()" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Notebook CI Test Results\n", "\n", "This notebook was tested in multiple regions. The test results are as follows, except for us-west-2 which is shown at the top of the notebook.\n", "\n", "![This us-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This us-east-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-east-2/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This us-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/us-west-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ca-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ca-central-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This sa-east-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/sa-east-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This eu-west-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This eu-west-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-2/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This eu-west-3 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-west-3/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This eu-central-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-central-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This eu-north-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/eu-north-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ap-southeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ap-southeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-southeast-2/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ap-northeast-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ap-northeast-2 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-northeast-2/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n", "\n", "![This ap-south-1 badge failed to load. Check your device's internet connectivity, otherwise the service is currently unavailable](https://h75twx4l60.execute-api.us-west-2.amazonaws.com/sagemaker-nb/ap-south-1/sagemaker-geospatial|dixie-wildfire-damage-assessment|dixie-wildfire-damage-assessment.ipynb)\n" ] } ], "metadata": { "availableInstances": [ { "_defaultOrder": 0, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 4, "name": "ml.t3.medium", "vcpuNum": 2 }, { "_defaultOrder": 1, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.t3.large", "vcpuNum": 2 }, { "_defaultOrder": 2, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.t3.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 3, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.t3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 4, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5.large", "vcpuNum": 2 }, { "_defaultOrder": 5, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 6, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 7, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 8, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 9, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 10, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 11, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 12, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5d.large", "vcpuNum": 2 }, { "_defaultOrder": 13, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5d.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 14, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5d.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 15, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5d.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 16, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5d.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 17, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5d.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 18, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5d.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 19, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 20, "_isFastLaunch": true, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 4, "name": "ml.c5.large", "vcpuNum": 2 }, { "_defaultOrder": 21, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 8, "name": "ml.c5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 22, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.c5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 23, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.c5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 24, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 72, "name": "ml.c5.9xlarge", "vcpuNum": 36 }, { "_defaultOrder": 25, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 96, "name": "ml.c5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 26, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 144, "name": "ml.c5.18xlarge", "vcpuNum": 72 }, { "_defaultOrder": 27, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 192, "name": "ml.c5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 28, "_isFastLaunch": true, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g4dn.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 29, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g4dn.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 30, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g4dn.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 31, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g4dn.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 32, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g4dn.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 33, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g4dn.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 34, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 61, "name": "ml.p3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 35, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 244, "name": "ml.p3.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 36, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 488, "name": "ml.p3.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 37, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.p3dn.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 38, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.r5.large", "vcpuNum": 2 }, { "_defaultOrder": 39, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.r5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 40, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 64, "name": "ml.r5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 41, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 128, "name": "ml.r5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 42, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 256, "name": "ml.r5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 43, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 384, "name": "ml.r5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 44, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 512, "name": "ml.r5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 45, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 768, "name": "ml.r5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 46, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 47, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 48, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 49, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 50, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 51, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 52, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 384, "name": "ml.g5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 53, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.g5.48xlarge", "vcpuNum": 192 } ], "instance_type": "ml.m5.4xlarge", "kernelspec": { "display_name": "Python 3 (Geospatial 1.0)", "language": "python", "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-west-2:081189585635:image/sagemaker-geospatial-v1-0" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.4" }, "vscode": { "interpreter": { "hash": "e045d3f6603b4a5305841bb6d80ca774517c7fbcc1ed53357fddcd6dcb717823" } } }, "nbformat": 4, "nbformat_minor": 5 }