Skip To Content
ArcGIS Developers
Dashboard

Compute Accuracy For Object Detection

Description

Compute Accuracy For Object Detection diagram

The ComputeAccuracyForObjectDetection task is used to calculate the accuracy of a deep learning model by comparing the detected objects from the Detect Object Using Deep Learning tool to ground truth data.

Request parameters

ParameterDetails
detectedFeatures

(Required)

The input polygon feature service layer containing the objects detected from the Detect Objects Using Deep Learning tool.

Syntax: A JSON object describing the detectedFeatures feature surface layer. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemId takes priority.

Example

//Feature Service URL example
{"url": "https://myportal.domain.com/server/rest/services/Hosted/detectedFeatures/FeatureServer/0"}

//Shared Data Path example
{"uri": "/fileShares/yourFileShareFolderName/detectedFeatures"}

//Service Properties example
{"serviceProperties":{"name":"testrasteranalysis","serviceUrl":"https://myportal.domain.com/server/rest/services/Hosted/testrasteranalysis/FeatureServer"},"itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId":"sdfwerfbd3ec25584d0d8f4"}}

groundTruthFeatures

(Required)

The polygon feature service layer containing ground truth data.

Syntax: A JSON object describing the groundTruthFeatures feature service layer. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemId takes priority.

Example

//Feature Service URL
{"url": "https://myportal.domain.com/server/rest/services/Hosted/groundTruthFeatures/FeatureServer/0"}

//Shared Data Path
{"uri": "/fileShares/yourFileShareFolderName/groundTruthFeatures"}

//Service Properties
{"serviceProperties":{"name":"testrasteranalysis","serviceUrl":"https://myportal.domain.com/server/rest/services/Hosted/testrasteranalysis/FeatureServer"}, "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId":"sdfwerfbd3ec25584d0d8f4"}}

outAccuracyTableName

(Required)

The name of the output accuracy table.

Syntax: A JSON object describing the output accuracy table.

Example

{"serviceProperties": {"name": "accuracy_table"}}

outAccuracyReportName

The name of the accuracy report that will be added as a portal item in PDF format.

Syntax: A JSON object describing the output accuracy report.

Example:

{"name":"accuracyReport"}

//Shared Data Path
{"uri": "/fileShares/yourFileShareFolderName/accuracyReport"}

detectedClassValueField

The name of the class value field in the detected objects feature service. If not specified, the tool will try to use the standard class value fields Classvalue and Value. If these fields do not exist, all features will be treated as the same object class.

Syntax: String.

Example

detectedClassValueField=ClassName
groundTruthClassValueField

The name of the class value field in the ground truth feature service. If not specified, the tool will try to use the standard class value fields Classvalue and Value. If these fields do not exist, all features will be treated as the same object class.

Syntax: String.

Example

groundTruthClassValueField=Class
minIoU

The Intersection over Union (IoU) ratio to use as a threshold to evaluate the accuracy of the object detection model. The numerator is the area of overlap between the predicted bounding box and the ground truth bounding box. The denominator is the area of union or the area encompassed by both bounding boxes. minIoU values rance from 0 to 1.

Syntax: Double.

Example

minIoU=0.5
maskFeatures

A polygon feature service layer that delineates the area where accuracy will be computed. Only the detected objects and ground truth data that falls completely within the polygons will be assessed for accuracy. If no feature service layer is provided, the full extent of the input feature services will be used.

Syntax

Example:

//Feature Service URL
{"url":"https://myportal.domain.com/server/rest/services/Hosted/AreaOfInterest/FeatureServer/0"}

//Shared Data Path
{"uri": "/fileShares/yourFileShareFolderName/AreaOfInterest"}

//Service Properties
{"serviceProperties":{"name":"AreaOfInterest","serviceUrl":"https://myportal.domain.com/server/rest/services/Hosted/AreaOfInterest/FeatureServer"}, "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId":"sdfwerfbd3ec25584d0d8f4"}}
context

Contains additional settings that affect task execution.

This task has the following setting:

  • Extent (extent)—A bounding box that defines the analysis area.
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 url>/ComputeAccuracyForObjectDetection/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:

//Output Accuracy Table
http://<raster analysis url>/ComputeAccuracyforObjectDetection/jobs/<jobId>/results/outAccuracyTable?token=<your token>&f=json

//Output Accuracy Report
http://<raster analysis url>/ComputeAccuracyforObjectDetection/jobs/<jobId>/results/outAccuracyReport?token=<your token>&f=json

Example usage

Below is a sample request URL for ComputeAccuracyForObjectDetection.

https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/ComputeAccuracyForObjectDetection

JSON Response example

The response returns the outAccuracyTable output parameter, which has properties for parameter name, data type, and value. The content of the value is always the output table item ID and service URL.

{
  "paramName": "outAccuracyTable",
  "dataType": "GPString",
  "value": {
    "itemId": "c267610d0feb4370bf38cc6e2c4ac261", 
    "url": "https://services.myserver.com/arcgis/rest/services/Hosted/<service name>/FeatureServer"
  }
}

If requested, the response returns the outAccuracyReport output parameter, which has properties for parameter name, data type, and value. The content of the value is always the output accuracy report item ID.

{
  "paramName": "outAccuracyReport",
  "dataType": "GPString",
  "value": {
    "itemId": "c267610d0feb4370bf38cc6e2c4ac261", 
  }
}