Skip To Content

Configure ArcGIS Image Server for deep learning raster analytics

ArcGIS Image Server provides a suite of deep learning tools with end-to-end workflows to classify and detect objects in imagery. These tools allow you to generate training sample datasets and export them to a deep learning framework to develop a deep learning model. Then you can perform data inference workflows, such as image classification and object detection.

To take advantage of GPU processing on a multiple-machine raster analytics server site, one GPU must be available on each server node on the site. A GPU card is not required to run the deep learning tools on your raster analytics deployment of ArcGIS Image Server. If the raster analytics server machine does not have a GPU card, the tools can be run on the CPU.

Note:

At 10.7, raster analytics cannot use multiple GPUs simultaneously on one machine. If you run a deep learning raster analytics workflow on a machine with multiple GPUs, only one GPU will be used.

Raster analytics in ArcGIS Image Server can use the TensorFlow, PyTorch, CNTK, and Keras Python modules with GPUs.

Add support for deep learning to a raster analytics deployment

Once you've configured your raster analytics deployment, follow the steps below to install the deep learning Python resources. If you have a multinode ArcGIS Image Server site, repeat these steps on each server node.

Once you've configured your raster analytics deployment, follow the steps below to install the deep learning Python resources. If you have a multinode ArcGIS Image Server site, repeat these steps on each server node.

The OS account you use for these steps must be the same as the account that installed ArcGIS Image Server.

  1. If you'll use GPUs for your deep learning raster analytics workflow, install the appropriate NVIDIA drivers.
  2. Run the following commands in the default Python 3.6 environment provided with your ArcGIS Server setup. This Python setup is in C:\Program Files\ArcGIS\Server\framework\runtimes\ArcGIS\bin\Python by default.
  3. Install each Python module you want to use in your deep learning raster analytics workflows. In substep b below, specify an environment name. The name of the module indicates whether you're using a CPU or GPU-enabled module.
    1. Type PS C:\Program Files\arcgis\server\framework\runtime\ArcGIS\bin\Python\Scripts> .\proenv.bat
    2. Type (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda create --name <specify environment name> --clone arcgispro-py3
    3. Type (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>activate <environment name>
    4. Type (<environment name>) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda install <module name>

    Example TensorFlow for CPU usage installation

    PS C:\Program Files\arcgis\server\framework\runtime\ArcGIS\bin\Python\Scripts> .\proenv.bat
    (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda create --name tf-cpu --clone arcgispro-py3
    (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>activate tf-cpu
    (tf-cpu) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda install tensorflow

    Example TensorFlow for GPU usage installation

    PS C:\Program Files\arcgis\server\framework\runtime\ArcGIS\bin\Python\Scripts> .\proenv.bat
    (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda create --name tf-gpu --clone arcgispro-py3
    (arcgispro-py3) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>activate tf-gpu
    (tf-gpu) C:\Program Files\arcgis\server\framework\runtime\ArcGIS\envs\arcgispro-py3>conda install tensorflow-gpu

  4. Check for and install any Python package dependencies that your deep learning models will require.
  5. Once all the necessary Python modules have been installed, run the proswap batch script to swap the default Python 3.6 environment used by the raster analysis service to the cloned environment by typing PS C:\Program Files\arcgis\server\framework\runtime\ArcGIS\bin\Python\Scripts> .\proswap.bat -n <environment name>

    Note:
    It is recommended that you create a virtual environment for each deep learning framework to avoid dependency conflicts. If two or more frameworks are in the same Python environment, they may depend on different versions of modules that cannot work together.

  6. Repeat steps 1 through 5 on each machine in your ArcGIS Image Server site.

    Only one service instance is allowed to use the GPU on each server node. The maximum number of instances per machine of the RasterProcessingGPU service should always be set to 1, which is the default.

  7. In ArcGIS Server Manager, select Services > Manage Services > RasterProcessingGPU and verify the values for minimum and maximum number of instances.

    Caution:
    Do not increase the maximum number of instances per machine for this service.

  8. Restart your ArcGIS Image Server for Raster Analysis after swapping to the cloned environment with your deep learning python modules installed.

Each request in your deep learning raster analytics workflows includes a processorType environment parameter. Ensure that this parameter correctly specifies whether to use CPU or GPU when making requests. The processorType environment parameter is set in the tool or raster function interface in ArcGIS Pro, Map Viewer, ArcGIS REST API, or ArcGIS API for Python.