- URL:
- https://<rasteranalysistools-url>/PublishDeepLearningModel
- Methods:
GET
- Version Introduced:
- 10.8.1
Description
The Publish
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 |
---|---|
(Required) | The datastore location of the deep learning model that needs to be uploaded to the portal. The Syntax: A string describing the path of the model location. Example:
|
(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
|
| The response format. The default response format is Values: |
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 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>/PublishDeepLearningModel/jobs/<jobId>
Parameter | Details |
---|---|
(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:
|