<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export training data sample codes in python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/export-training-data-sample-codes-in-python/m-p/1221507#M61011</link>
    <description>&lt;P&gt;I'm using ArcGIS Jupyter Notebook interface for the first time in ArcGIS Pro version 2.9.&amp;nbsp; I can't find specific guidelines on how to run the &lt;STRONG&gt;Export Training Data for Deep Learning&lt;/STRONG&gt; tool in &lt;STRONG&gt;arcgis.learn&lt;/STRONG&gt; when you're using local data.&amp;nbsp; Here's what I'm trying to do in Notebook:&lt;/P&gt;&lt;P&gt;Sample code from&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/samples/land-cover-classification-using-unet/#load-model-architecture" target="_blank"&gt;Land Cover Classification using Satellite Imagery and Deep Learning | ArcGIS API for Python&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;import arcgis&lt;BR /&gt;from arcgis import learn&lt;BR /&gt;arcgis.env.verbose = True&lt;/P&gt;&lt;P&gt;export = learn.export_training_data(input_raster = world_imagery_layer,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;output_location = samplefolder,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;input_class_data = label_layer.url,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;chip_format = "PNG",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;tile_size = {"x":400,"y":400},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;stride_size = {"x":0,"y":0},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;metadata_format = "Classified_Tiles",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;context = {"startIndex": 0, "exportAllTiles": False, "cellSize": 2},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;context = context,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;gis = ent_gis)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; For input raster, my data is located on a file geodatabase.&amp;nbsp; How do I code the path to the geodatabase?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Output location:&amp;nbsp; what is the format for path to the destination folder?&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Input class data:&amp;nbsp; my class data is again on a file geodatabase on my computer.&amp;nbsp; How do I code the path?&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; On context parameter:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Why does the cell size = 2?&amp;nbsp; My data has 1-meter resolution.&amp;nbsp; What's the appropriate cell size I should specify?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - What does "exportAllTiles" mean?&lt;/P&gt;&lt;P&gt;5.&amp;nbsp; On "gis = ent_gis":&amp;nbsp; What does this line mean?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 13:44:17 GMT</pubDate>
    <dc:creator>JadedEarth</dc:creator>
    <dc:date>2022-10-13T13:44:17Z</dc:date>
    <item>
      <title>Export training data sample codes in python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-training-data-sample-codes-in-python/m-p/1221507#M61011</link>
      <description>&lt;P&gt;I'm using ArcGIS Jupyter Notebook interface for the first time in ArcGIS Pro version 2.9.&amp;nbsp; I can't find specific guidelines on how to run the &lt;STRONG&gt;Export Training Data for Deep Learning&lt;/STRONG&gt; tool in &lt;STRONG&gt;arcgis.learn&lt;/STRONG&gt; when you're using local data.&amp;nbsp; Here's what I'm trying to do in Notebook:&lt;/P&gt;&lt;P&gt;Sample code from&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/samples/land-cover-classification-using-unet/#load-model-architecture" target="_blank"&gt;Land Cover Classification using Satellite Imagery and Deep Learning | ArcGIS API for Python&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;import arcgis&lt;BR /&gt;from arcgis import learn&lt;BR /&gt;arcgis.env.verbose = True&lt;/P&gt;&lt;P&gt;export = learn.export_training_data(input_raster = world_imagery_layer,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;output_location = samplefolder,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;input_class_data = label_layer.url,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;chip_format = "PNG",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;tile_size = {"x":400,"y":400},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;stride_size = {"x":0,"y":0},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;metadata_format = "Classified_Tiles",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;context = {"startIndex": 0, "exportAllTiles": False, "cellSize": 2},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;context = context,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;gis = ent_gis)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; For input raster, my data is located on a file geodatabase.&amp;nbsp; How do I code the path to the geodatabase?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Output location:&amp;nbsp; what is the format for path to the destination folder?&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Input class data:&amp;nbsp; my class data is again on a file geodatabase on my computer.&amp;nbsp; How do I code the path?&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; On context parameter:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Why does the cell size = 2?&amp;nbsp; My data has 1-meter resolution.&amp;nbsp; What's the appropriate cell size I should specify?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - What does "exportAllTiles" mean?&lt;/P&gt;&lt;P&gt;5.&amp;nbsp; On "gis = ent_gis":&amp;nbsp; What does this line mean?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-training-data-sample-codes-in-python/m-p/1221507#M61011</guid>
      <dc:creator>JadedEarth</dc:creator>
      <dc:date>2022-10-13T13:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export training data sample codes in python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/export-training-data-sample-codes-in-python/m-p/1221993#M61082</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Never mind.&amp;nbsp; Found the answers:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; On paths:&amp;nbsp; Just use double backslash to format them.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; On cell size:&amp;nbsp; Use the input raster's cell size (in my case was 0.6)&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; "exportAllTiles":&amp;nbsp; Set the value to False so it would only create data that matches the classes.&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; "gis = ent_gis":&amp;nbsp; I think this is for ArcGIS Online; not needed if your data are local.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/export-training-data-sample-codes-in-python/m-p/1221993#M61082</guid>
      <dc:creator>JadedEarth</dc:creator>
      <dc:date>2022-10-14T12:57:09Z</dc:date>
    </item>
  </channel>
</rss>

