- URL:
- https://<rasteranalysistools-url>/TrainClassifier
- Methods:
GET
- Version Introduced:
- 10.6.1
Description
The Train
task is a service to train image classifiers in a deep learning model and return an .ecs
file in JSON format. The .ecs
file is used in the Classify
task.
This task can be used to train a classifier using a single multiband raster or a change analysis raster generated by the Analyze
or Analyze
task. When training using a change analysis raster, the output from the Classify
task will be a time series of classified rasters.
Request parameters
Parameter | Details |
---|---|
(Required) | The complete JSON raster function template (URI or by value), the complete XML raster function template (URI or value), portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be used for training. If multiple input types are provided, Syntax: A string describes the input raster Input raster Example:
Raster dataset example
|
(Required) | This is the JSON representation of the training samples. Its format is the same as the JSON converted from a training shapefile that was saved in the ArcGIS Pro Training Samples Manager pane. Syntax: JSON object describes the training samples.
|
(Required) | The classifier algorithm and parameters used in the supervised training. Examples
|
(Optional) | The complete JSON raster function template (URI or by value), the complete XML raster function template (URI or by value), portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be used for training as the segmented raster input. If multiple inputs are provided, Syntax: A string describes the input raster. Example:
Raster dataset example
|
(Required) | The string of segment attributes used in the training (separated by semicolons). It is the permutation of the |
(Optional) | The field from the Syntax: String Example:
|
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 job
to periodically review the status of the job and messages as described in Checking job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/TrainClassifier/jobs/<jobId>
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
https://<raster analysis tools url>/TrainClassifier/jobs/<jobId>/results/output_Classifier_Definition
The ecd
is the value property of the resulting JSON.
Example usage
The following is a sample request URL for Train
:
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/TrainClassifier/submitJob