Skip to main content

Detect Objects In 3D Space (GeoAI Tools)

Summary

Applies a trained deep learning model to oriented imagery to detect and extract objects in 3D space.

This tool uses a model definition file, either an Esri model definition file (.emd) or a deep learning model package (.dlpk), to detect objects within the imagery. By leveraging depth maps either provided directly or generated via input 3D layer the tool maps detected 2D features to real-world 3D coordinates, enabling accurate object detection in 3D space.

Usage

  • You must install the proper deep learning framework Python API (such as PyTorch or Keras) in the ArcGIS Pro Python environment; otherwise, an error will occur when you add the Esri model definition file to the tool. Obtain the appropriate framework information from the creator of the Esri model definition file.

    To set up your machine to use deep learning frameworks in ArcGIS Pro, see Install deep learning frameworks for ArcGIS.

  • This tool calls a third-party deep learning Python API (such as PyTorch or Keras) and uses the specified Python raster function to process each object.

  • The Model Definition parameter value can be an Esri model definition JSON file (.emd), a JSON string, or a deep learning model package (.dlpk). A JSON string is useful when this tool is run on the server, and you can use the JSON string rather than upload the .emd file. The .dlpk file must be stored locally.

  • The input oriented imagery dataset or layer may include depth images for further processing. If depth maps are not available in the dataset, a 3D layer must be provided to generate them. For accurate detection, the input oriented imagery dataset and input 3D layer should use the same spatial reference.

  • Supported formats for the 3D layer used to compute the depth maps are 3D Tiles Layer, Scene Layer, and Gaussian Splat Layer.

  • For oriented imagery layers, the processing will always occur in pixel space. When pixel space is used for processing, the pixel space detections are preserved in the output table in the IShape field.

  • Increasing the batch size can improve tool performance; however, as the batch size increases, more memory is used. If an out of memory error occurs, use a smaller batch size. The batch_size value can be adjusted using the Arguments parameter.

  • Batch sizes are square numbers, such as 1, 4, 9, 16, 25, 64 and so on. If the input value is not a perfect square, the highest possible square value is used. For example, if a value of 6 is specified, the batch size is set to 4.

  • Use the Suppress Duplicate Detections parameter to identify and remove overlapping duplicate features generated during object detection.

  • To run this tool, a GPU-equipped machine is required. If you have more than one GPU, specify the GPU ID to specify the GPU to be used. The GPU ID is supported only for the Input Model Definition File parameter and is not supported during the depth rendering process.

  • For information about requirements for running this tool and issues you may encounter, see Deep Learning frequently asked questions.

  • For more information about deep learning, see Deep learning using the ArcGIS Image Analyst extension.

Parameters

Label Explanation Data type

Input Oriented Imagery Dataset

An oriented imagery dataset used as input for object detection.

The dataset must contain Shape, ImagePath, Matrix, FocalLength, NRows, and NColumns attribute fields. Depth maps can be provided through the DepthImage field. If depth maps are not available in the dataset, the Input 3D Layer parameter must be specified to generate them. If lens distortion is present, the radial distortion fields K1, K2, and K3; tangential distortion fields P1 and P2; and principal point fields PrincipalX and PrincipalY must be populated. By default, PixelSize is set to 1. To use a different value, provide the PixelSize field in the oriented imagery dataset and specify the corresponding value. For more information on these fields, see Oriented imagery attribute table and Cameras table schema.

Oriented Imagery Layer

Output Detected Objects

The output feature class that will contain multipatch geometries detecting the objects in the input images. If the feature class already exists, the results will be appended to the existing feature class.

Feature Class

Input Model Definition File

An Esri model definition JSON file (.emd), a JSON string, or a deep learning model package (.dlpk). A JSON string is useful when this tool is used on the server so you can paste the JSON string rather than upload the .emd file. The .dlpk file must be stored locally.

File; String

Arguments

(Optional)

The information from the Input Model Definition File parameter that will be used to set the default values for this parameter. These arguments will vary, depending on the model architecture. The following are supported model arguments for models trained in ArcGIS. ArcGIS pretrained models and custom deep learning models may have additional arguments that the tool supports.

  • Padding—The number of pixels at the border of image tiles from which predictions will be blended for adjacent tiles. To smooth the output while reducing artifacts, increase the value. The maximum value of the padding can be half the tile size value. The argument is available for all model architectures.

  • Confidence Threshold—The detections that have a confidence score higher than this threshold will be included in the result. The allowed values range from 0 to 1.0. The argument is available for all model architectures.

  • Batch Size—The number of image tiles that will be processed in each step of the model inference. This depends on the memory of your graphics card. The argument is available for all model architectures.

  • NMS Overlap—The maximum overlap ratio for two overlapping features, which is defined as the ratio of intersection area over union area. The default is 0.1. The argument is available for all model architectures.

  • Exclude Padding Detections—If true, potentially truncated detections near the edges that are in the padded region of image chips will be filtered. The argument is available for SSD, RetinaNet, YOLOv3, DETReg, MMDetection, and Faster RCNN only.

  • TTA Scales—Performs test time augmentation using different scales. Each scale means the pixel block will be processed with the scales provided. The default scale is 1, which means no scaling occurs. The different scales are separated by commas, for example, 0.9,1,1.1. In this case, the pixel block will be processed three times, first at the scale of 0.9, then with no scale change, and then with a scale of 1.1.

  • Test Time Augmentation—Performs test time augmentation while predicting. If true, predictions of flipped and rotated orientations of the input image will be merged into the final output and their confidence values will be averaged. This may cause the confidence values to fall below the threshold for objects that are only detected in a few orientations (of the image). The argument is available for all model architectures.

  • Tile Size—The width and height of image tiles into which the imagery will be split for prediction. The argument is only available for MaskRCNN.

  • Merge Policy—The policy for merging augmented predictions. Available options are mean, max, and min. This is only applicable when test time augmentation is used. The argument is only available for MaskRCNN.

Value table columns:

  • Name—The name of the function argument.

  • Value—The value of the function argument.

Value Table

Objects of Interest

(Optional)

Specifies the objects that will be detected by the tool. The available options will be based on the Input Model Definition File parameter value. This parameter is only active when the model detects more than one type of object.

String

Input 3D Layer

(Optional)

The 3D layer that will be used to compute the depth maps.

3D Tiles Layer; Scene Layer; Gaussian Splat Layer; File

Output Depth Image Folder

(Optional)

An existing folder where the generated depth maps will be saved.

Folder

Update Oriented Imagery Dataset With Depth Maps

(Optional)

Specifies whether the path of the generated depth maps will be added to the input oriented imagery dataset.

  • Checked—A DepthImage field will be added to the input oriented imagery dataset and populated with the file paths of the generated depth maps.

  • Unchecked—The input-oriented imagery dataset will not be modified. This is the default.

Boolean

Suppress Duplicate Detections

(Optional)

Specifies whether duplicate detections will be suppressed.

  • Checked—Duplicate detections will be suppressed. In the output detected-object layer, duplicate features will be removed.

  • Unchecked—All detections will be retained without filtering duplicates. This is the default.

Boolean

Environments

GPU ID

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires Image Analyst