- URL:https://<rasteranalysistools-url>/PublishDeepLearningModel
- Version Introduced:10.8.1
Description
The PublishDeepLearningModel operation publishes a model package of a deep learning model (.dlpk) containing the files and data required to run deep learning inferencing tools for object detection or image classification to your portal as a DLPK item.
Deep learning model packages must contain an Esri model definition file (.emd) and a trained model file. The trained model file extension depends on the framework you used to train the model. For example, if you trained your model using TensorFlow, the model file will be a TensorFlow (.pb) file, while a model trained using Keras will generate an Keras (.h5) file. Depending on the model framework and options you used to train your model, you may need to include a Python Raster Function (.py) or additional files.
Request parameters
Parameter | Details |
---|---|
modelLocation (Required) | The datastore location of the deep learning model that needs to be uploaded to the portal. The modelLocation can be the path pointing to the dlpk file or the folder containing the deep learning model files (emd, trained model file and other additional files.) Syntax: A string describing the path of the model location. Example:
|
outputName (Required) | The name of the portal item. If the item already exists, the portal item ID can be given to the service tool. The current path of the .dlpk file will be used to update the existing .dlpk item. Example
|
f | The response format. The default response format is html. Values: html | json | pjson |
Example usage
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 jobId to periodically review the status of the job and messages as described in Checking job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/PublishDeepLearningModel/jobs/<jobId>
Parameter | Details |
---|---|
outItem (Required) | The response returns the .dlpk portal item id. Example: Example
Results in:
|
JSON Response example
An example of a successful JSON response is detailed below:
Details |
---|
Response Example:
Successful response output:
|