<?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 Re: &amp;quot;Export training data for deep learning&amp;quot; creates multiband raster in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/1086923#M44182</link>
    <description>&lt;P&gt;Same issue here, at 2.7.1. The labels are mixture of 1 and 2-band-rasters.&lt;/P&gt;</description>
    <pubDate>Sun, 08 Aug 2021 13:47:48 GMT</pubDate>
    <dc:creator>ÁkosHalmai</dc:creator>
    <dc:date>2021-08-08T13:47:48Z</dc:date>
    <item>
      <title>"Export training data for deep learning" creates multiband raster</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/225513#M9824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to export some RCNN-Mask training data using the "export training data for deep learning" tool in ArcGIS 2.5. I pass a 32 bit floating point &lt;STRONG&gt;singleband&lt;/STRONG&gt; raster as input raster and a shape file containing buildings as input feature (+ property of input feature as class value field) to the tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 j-img-centered jive-image" src="https://community.esri.com/legacyfs/online/490299_pastedImage_2.png" style="display: block; margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resulting images in the "Image" directory seems to be fine. The "Label" folder, on the other hand, contains weird a mix of singleband- and multiband (2 and 3 bands also) raster files,&lt;/P&gt;&lt;P&gt;e.g. (all files from same "Label"-subdirectory):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;file 6 is a multiband raster using the bands 1 and 2&lt;/LI&gt;&lt;LI&gt;file 9 is a multiband raster using the bands 1-3&lt;/LI&gt;&lt;LI&gt;file 7 is a singleband raster - each masked feature (buildings with same properties) is mapped to an other value. Shouldn't the result be a true-false masking raster containing the values 0 or 1?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG class="image-2 j-img-centered jive-image" height="277" src="https://community.esri.com/legacyfs/online/490300_pastedImage_1.png" style="display: block; margin-left: auto; margin-right: auto;" width="197" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My workaround so far is a python script, iterating all bands of a given file, checking if a cell is occupied using map algebra. If that cell is occupied the new value is 1.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;bands &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; band &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetRasterProperties_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;img&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'BANDCOUNT'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getOutput&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    bands&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sa&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Raster&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; img&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Band_{}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;band&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
res &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; bands&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;bands&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    res &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; res &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bands&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
res &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; res &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point i have singleband raster files only. Before training a model with the ArcGIS "train deep learning model" tool i have to copy the statistical files generated by the "generate training data for deep learning" tool into the directory of my updated raster files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i try to use my trained model using the "detect objects using deep learning" tool i get the error:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/490331_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is the result of "creating training data for deep learning" a mixture of single- and multiband rasters, although only singleband rasters were given?&lt;/P&gt;&lt;P&gt;Shouldn't the singleband results be true-false masking rasters containing the values 0 or 1?&lt;/P&gt;&lt;P&gt;Is there a wrong approach in my workaround?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:59:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/225513#M9824</guid>
      <dc:creator>MoritzWollen</dc:creator>
      <dc:date>2021-12-11T10:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: "Export training data for deep learning" creates multiband raster</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/1040266#M38943</link>
      <description>&lt;P&gt;Hello! Did you ever find a solution to this issue? I am having the same problem.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 16:41:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/1040266#M38943</guid>
      <dc:creator>LorenaAbad</dc:creator>
      <dc:date>2021-03-24T16:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: "Export training data for deep learning" creates multiband raster</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/1086923#M44182</link>
      <description>&lt;P&gt;Same issue here, at 2.7.1. The labels are mixture of 1 and 2-band-rasters.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 13:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/quot-export-training-data-for-deep-learning-quot/m-p/1086923#M44182</guid>
      <dc:creator>ÁkosHalmai</dc:creator>
      <dc:date>2021-08-08T13:47:48Z</dc:date>
    </item>
  </channel>
</rss>

