Esri / raster-deep-learning

ArcGIS built-in python raster functions for deep learning to get you started fast.
Apache License 2.0
186 stars 87 forks source link

Model working under pro but not on image server #34

Open Syn-crow opened 3 years ago

Syn-crow commented 3 years ago

When using deep learning services on my arcgis image server, I receive this as a response for a QueryDeepLearningModelInfo job

{
 "jobId": "jf07709889e9d4c158427b37e549a6a58",
 "jobStatus": "esriJobFailed",
 "messages": [
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Submitted."
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Executing..."
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Start Time: 25 August 2020 10:21:28"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Raster Analytics helper service: https://polaris-analysis.phedre.fr:6443/arcgis"
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Running on ArcGIS Image Server."
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "'7fdf83ecd5974655b27d5f4bba80c7fa' is not a valid model definition."
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "Unable to initialize python raster function with scalar arguments. [Z:\\data\\product\\arcgis\\server\\usr\\directories\\arcgissystem\\resources\\models\\raster\\7fdf83ecd5974655b27d5f4bba80c7fa\\ArcGISImageClassifier.py]"
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "Unable to initialize python raster function with scalar arguments."
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "Unable to read deep learning model definition."
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "Failed to execute (QueryDeepLearningModelInfo)."
  },
  {
   "type": "esriJobMessageTypeInformative",
   "description": "Failed at 25 August 2020 10:21:45 (Elapsed Time: 16.94 seconds)"
  },
  {
   "type": "esriJobMessageTypeError",
   "description": "Failed."
  }
 ]
}

the message below prove that it did find my model where it was installed on the server.

{
   "type": "esriJobMessageTypeError",
   "description": "Unable to initialize python raster function with scalar arguments. [Z:\\data\\product\\arcgis\\server\\usr\\directories\\arcgissystem\\resources\\models\\raster\\7fdf83ecd5974655b27d5f4bba80c7fa\\ArcGISImageClassifier.py]"
  }

but it also tells me my model isn't defined correctly but when I download the files (.emd, ArcGISImageClassifier.py and .pth) and run them using ArcGIS pro "Classify Pixels Using Deep Learning" tool it works flawlessly.

{
   "type": "esriJobMessageTypeError",
   "description": "'7fdf83ecd5974655b27d5f4bba80c7fa' is not a valid model definition."
  } 

I'm using an Arcgis Image Server 10.8.1 on CentOS without CPU (but did install tensorflow-mkl). I followed this guide to install the required libraries.

joined you can find my model that I tested under Arcgis Pro and the result of conda list

wine_conda_list.txt

model-20.txt

ArcGISImageClassifier.txt