<?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 Classify Pixels Using Deep Learning Python Automation in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/classify-pixels-using-deep-learning-python/m-p/1101266#M45926</link>
    <description>&lt;P&gt;I am looking for some help automating the geoprocessing tool "Classify Pixels Using Deep Learning". I am using the per-trained license plate blurring model found here: &lt;A href="https://www.arcgis.com/home/item.html?id=2ae3cf1af09847a48d65c04b9da6a84f" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=2ae3cf1af09847a48d65c04b9da6a84f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: Using python can the tool take in images directly and export images or do all images have to be imported into a GDB, processed with an export into a GDB and then exported as an image file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my testing of the provided python script found on the below page, I cannot get a solution that does not require import and export through a GDB.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/classify-pixels-using-deep-learning.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/classify-pixels-using-deep-learning.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to setup a script that will take an input folder of images and run the license plate and face blurring models on them and export these images to another folder. Ideally, the processed images would be the same size/quality and have the same name as the originals. Any help with an efficient way of doing this would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 14:53:34 GMT</pubDate>
    <dc:creator>TimothyMcKinney</dc:creator>
    <dc:date>2021-09-23T14:53:34Z</dc:date>
    <item>
      <title>Classify Pixels Using Deep Learning Python Automation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/classify-pixels-using-deep-learning-python/m-p/1101266#M45926</link>
      <description>&lt;P&gt;I am looking for some help automating the geoprocessing tool "Classify Pixels Using Deep Learning". I am using the per-trained license plate blurring model found here: &lt;A href="https://www.arcgis.com/home/item.html?id=2ae3cf1af09847a48d65c04b9da6a84f" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=2ae3cf1af09847a48d65c04b9da6a84f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: Using python can the tool take in images directly and export images or do all images have to be imported into a GDB, processed with an export into a GDB and then exported as an image file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my testing of the provided python script found on the below page, I cannot get a solution that does not require import and export through a GDB.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/classify-pixels-using-deep-learning.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/classify-pixels-using-deep-learning.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to setup a script that will take an input folder of images and run the license plate and face blurring models on them and export these images to another folder. Ideally, the processed images would be the same size/quality and have the same name as the originals. Any help with an efficient way of doing this would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 14:53:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/classify-pixels-using-deep-learning-python/m-p/1101266#M45926</guid>
      <dc:creator>TimothyMcKinney</dc:creator>
      <dc:date>2021-09-23T14:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Classify Pixels Using Deep Learning Python Automation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/classify-pixels-using-deep-learning-python/m-p/1101518#M45953</link>
      <description>&lt;P&gt;To automate I have a loop setup and the first file runs but then there is always an unexpected error for the second file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Import system modules
import arcpy
import os
from arcpy.ia import *
from arcpy import env
import time

arcpy.CheckOutExtension("ImageAnalyst")

####File list...

for x in file_list:
    out_classified_raster = arcpy.ia.ClassifyPixelsUsingDeepLearning(raw_path + "\\" + x, model, "score_threshold 0.8", "PROCESS_ITEMS_SEPARATELY", None)
    out_classified_raster.save(export_path + "\\" + os.path.splitext(x)[0] + ".tif")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;ExecuteError&lt;/SPAN&gt;                              Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[78]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;2&lt;/SPAN&gt;:     out_classified_raster = arcpy.ia.ClassifyPixelsUsingDeepLearning(raw_path + &lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;\\&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt; + x, model, &lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;score_threshold 0.8&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;PROCESS_ITEMS_SEPARATELY&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;None&lt;/SPAN&gt;)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;ClassifyPixelsUsingDeepLearning&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1041&lt;/SPAN&gt;:  out_classified_folder)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Utils.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;swapper&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;53&lt;/SPAN&gt;:    result = wrapper(*args, **kwargs)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;Wrapper&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1034&lt;/SPAN&gt;:  out_classified_folder)

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;&amp;lt;lambda&amp;gt;&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;512&lt;/SPAN&gt;:   &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;lambda&lt;/SPAN&gt; *args: val(*gp_fixargs(args, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;))

&lt;SPAN class=""&gt;ExecuteError&lt;/SPAN&gt;: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Unable to read pixels from the python raster function.
Function Read Error [Raster Function Template]
Unable to read pixels from the python raster function.
Python raster function's .updatePixels() method returned nothing.
Unable to read pixels from the python raster function.
Function Read Error [Raster Function Template]
Unable to read pixels from the python raster function.
Python raster function's .updatePixels() method returned nothing.
Unable to read pixels from the python raster function.
Function Read Error [Raster Function Template]
Unable to read pixels from the python raster function.
Python raster function's .updatePixels() method returned nothing.
Failed to execute (ClassifyPixelsUsingDeepLearning).&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 00:39:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/classify-pixels-using-deep-learning-python/m-p/1101518#M45953</guid>
      <dc:creator>TimothyMcKinney</dc:creator>
      <dc:date>2021-09-24T00:39:12Z</dc:date>
    </item>
  </channel>
</rss>

