Classify Pixels Using Deep Learning
- URL:https://<rasteranalysistools-url>/ClassifyPixelsUsingDeepLearning
- Related Resources:Add Image, Calculate Density, Calculate Distance, Calculate Travel Cost,Classify, Convert Feature to Raster, Convert Raster to Feature, Copy Raster, Create Image Collection, Create Viewshed, Delete Image, Delete Image Collection, Detect Objects Using Deep Learning, Determine Optimum Travel Cost Network, Determine Travel Cost Paths to Destinations, Determine Travel Cost Path as Polyline, Export Training Data for Deep Learning, Fill, Flow Accumulation, Flow Direction, Flow Distance, Generate Raster, Install Deep Learning Model, Interpolate Points, List Deep Learning Model Info, Nibble, Query Deep Learning Model Info, Segment, Stream Link, Summarize Raster Within, Train Classifier, Uninstall Deep Learning Model, Watershed
- Version Introduced:10.7
Description
The ClassifyPixelsUsingDeepLearning operation can be used to classify pixels in the imagery data using the designated deep learning model and generate an image service for the classified raster.
Request parameters
Parameter | Details |
---|---|
inputRaster (Required) | The image that will be classified. This can be specified as the portal item Id, image service URL, cloud raster dataset, shared raster dataset, or raster dataset or image collection in the data store. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemId takes priority. Syntax: A JSON object describes the input raster. Example:
|
outputClassifedRaster (Required) | The output hosted image service properties. If the hosted image service is already created, the portal item Id or service URL can be given to the service tool. The output path of the raster dataset generated in the raster store will be used to update the existing service definition. The service tool can also generate a new hosted image service with the given service properties. The output hosted image service is stored in the raster store and shared on either the raster analysis image server or image hosting image server, depending on the Enterprise configuration. If the inputRaster is an image collection in the data store or a mosaic dataset, and processAllRasterItems is set to true, the output hosted image service is created from all classified rasters. Syntax: A JSON object describes the output image service. Example
|
model (Required) | The deep learning model to use to classify objects. This can be specified as the deep learning model portal item ID, as an .emd or .dlpk file, or as the entire JSON string of the model definition. Syntax: A JSON object describes the model. Example:
Example for JSON:
|
modelArguments | The name value pairs of arguments and their values that can be customized by the clients. Syntax: A JSON object describes the value pairs of arguments. Example:
|
processAllRasterItems | Specifies how all raster items in an image service will be processed. If set to true, all raster items in the image service will be processed as separate images. If set to false, all raster items in the image service will be mosaicked together and processed. This is the default. Values: true | false |
context | Contains additional settings that affect task execution. This task has the following settings:
|
f | The response format. The default response format is html. Values: html | json |
Response
When you submit a request, the task assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/ClassifyPixelsUsingDeepLearning/jobs/<jobId>
When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:
https://<raster analysis url>/ClassifyPixelsUsingDeepLearning/jobs/<jobId>/results/outRaster
Example usage
Below is a sample request URL for ClassifyPixelsUsingDeepLearning.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/ClassifyPixelsUsingDeepLearning
JSON Response example
The response returns the outRaster output parameter, which has properties for parameter name, data type, and value. The content of the value is always the output raster dataset and image service URL.
{
"paramName": "outRaster",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}