Classify Pixels Using Deep Learning (Raster Analysis)

Title  Classify Pixels Using Deep Learning (Raster Analysis)

Summary

In a raster analysis deployment, this tool runs a trained deep learning model on an input image to produce a classified raster published as a hosted imagery layer in your portal.


Illustration

Classify Pixels Using Deep Learning tool illustration Classify Pixels Using Deep Learning tool illustration

Usage


Syntax

Parameter Explanation
inputRaster

The input image to classify. It can be an image service URL, a raster layer, an image service, a map server layer, or an Internet tiled layer.

inputModel

The input is a URL of a deep learning package (.dlpk) item. It contains the path to the deep learning binary model file, the path to the Python raster function to be used, and other parameters such as preferred tile size or padding.

outputName

The name of the image service of the classified pixels.

modelArguments (Optional)

The function arguments are defined in the Python raster function class referenced by the input model. This is where you list additional deep learning parameters and arguments for experiments and refinement, such as a confidence threshold for adjusting the sensitivity. The names of the arguments are populated by the tool from reading the Python module on the RA server.

Code Samples

ClassifyPixelsUsingDeepLearning example 1 (Python window)

This example classifies a raster based on a custom pixel classification using deep learning in a raster analysis deployment and publishes the raster as a hosted imagery layer in your portal.


import arcpy

arcpy.ClassifyPixelsUsingDeepLearning_ra(
        "https://myserver/rest/services/landclassification/ImageServer",
        "https://myportal/sharing/rest/content/items/itemId",
"classifiedLand", "padding 0")
                    

ClassifyPixelsUsingDeepLearning example 2 (stand-alone script)

This example classifies a raster based on a custom pixel classification using deep learning in a raster analysis deployment and publishes the raster as a hosted imagery layer in your portal.


#---------------------------------------------------------------------------
# Name: ClassifyPixelsUsingDeepLearning_example02.py
# Requirements: ArcGIS Image Server
# Import system modules
import arcpy
# Set local variables
inImage = "https://myserver/rest/services/ landclassification/ImageServer"
inModel = "https://myportal/sharing/rest/content/items/itemId"
outName = "classifiedLand"
modelArgs = "padding 0"
# Execute Classified Pixels Using raster analysis tool
arcpy.ClassifyPixelsUsingDeepLearning_ra(inImage, inModel, outName, modelArgs)
                    

Tags

Credits

Use limitations