- URL:
- https://<rasteranalysistools-url>/DetectObjectsUsingDeepLearning
- Methods:
GET
- Version Introduced:
- 10.7
Description
The Detect
operation can be used to detect objects from the imagery data using the designated deep learning model and generate a feature service for the detected objects.
Request parameters
Parameter | Details |
---|---|
(Required) | The input image used to detect objects. This can be specified as the portal item ID, image service URL, cloud raster dataset, shared raster dataset, a feature service with image attachments, or a 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 provided, the Syntax: A JSON object describes the input raster. Example:
|
(Required) | The output hosted feature service properties. If there is an existing hosted feature service, you can provide the portal item ID or service URL and the output path of the generated feature class will be used to update the existing service definition. The service tool can also generate a new hosted feature service with the service properties provided. The output hosted feature service is stored and shared on the hosting server. Syntax: A JSON object describes the output feature service. Example:
|
(Required) | The deep learning model to use to detect objects. This can be specified as the deep learning model portal item IS, an Syntax: A JSON object describes the model. Example:
JSON object example
|
| 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:
|
| Specifies whether to perform nonmaximum suppression in which duplicate detected objects are identified and the duplicate with a lower confidence value is removed. When this parameter is set to Values: |
| The name of the field in the feature service that contains the confidence scores as output by the object detection method. This parameter is required when Example
|
| The name of the class value field in the output feature service. If no value is specified, the tool will use the standard class value fields Example
|
| The maximum overlap ratio for two overlapping objects, which is defined as the ratio of intersection area over union area. The default is 0. Example
|
| Specifies how raster items in an image service will be processed. When this parameter is set to Values: |
| Contains additional settings that affect task execution. This task has the following settings:
|
|
The response format. The default response format is html. Values: |
Example usage
The following is a sample request URL for Detect
:
https://machine.domain.com/webadaptor/rest/services/System/RasterAnalysisTools/GPServer/DetectObjectsUsingDeepLearning?
inputRaster="url":"https://<server name>/arcgis/ArcGIS/rest/services/World_Imagery/MapServer"&outputFeatureClass={"serviceProperties":{"name":"DetectedTrees"}}&model={"itemId": "d8d3902b41854529a907ad9f42af5a06"}&modelArguments={"padding": "0", "batch_size": "16"}&classLabelField=ClassLabel&processAllRasterItems=false&context={"extent": {"xmin": -13160539.4563053,"ymin": 3998752.62631951,"xmax": -13160427.5538234,"ymax": 3998824.51069532,"spatialReference": {"wkid": 3857}},"processorType": "CPU","parallelProcessingFactor": 2}}&f=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 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>/DetectObjectsUsingDeepLearning/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>/DetectObjectsUsingDeepLearning/jobs/<jobId>/results/outObjects
JSON Response example
The response returns the out
output parameter, which has properties for parameter name, data type, and value. The content of the value is always the output feature layer itemId and the image service URL.
{
"paramName": "outObjects",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}