Skip To Content

Use the model

The Agricultural Field Delineation model can be used through the Detect Objects Using Deep Learning tool available in the Image Analyst toolbox in ArcGIS Pro. Ensure that the input imagery meets the supported configuration and follow the steps below to extract land parcels from it.

Recommended imagery configuration

The recommended imagery configuration is as follows:

You can use the Agricultural Field Delineation model with multispectral Sentinel-2 L2A imagery in the form of a raster product, mosaic dataset, or image service.

When using a raster product, ensure that you choose the BOA Reflectance product while adding the imagery to your map. When using a mosaic dataset, ensure that you choose the Sentinel-2 raster type and BOA Reflectance processing template while creating the mosaic. This mosaic dataset can also be published as an image service and used as an input.

Ensure that the bit depth of the input is 16 Bit Unsigned, and that the processing template is set to None. You can automate creation, configuration, and population of your mosaic datasets using Mosaic Dataset Configuration Script (MDCS).

Detect Agricultural parcels

Use the following steps to detect Agricultural parcels from the imagery:

    Data preparation
  1. Prepare data according to the following product type:
    • Raster Product
    1. Browse to the folder with the Sentinel-2 L2A data. Expand the folder and locate the raster product.
    2. Expand the raster product provided as an MTD_MSIL2A.xml file and select the BOA Reflectance derived raster dataset.
      Select Surface Reflectance of L2A imagery.
    • Mosaic Dataset
    1. Create a mosaic dataset using Create Mosaic Dataset geoprocessing tool. Set the variables on the Parameters tab as follows:
      • Output Location—Select a geodatabase.
      • Mosaic Dataset Name—Set the mosaic dataset name.
      • Coordinate System—Select a coordinate system for output mosaic dataset.
      • Product Definition—Select None.
      Create Mosaic Dataset pane
    2. To add raster data to the mosaic dataset, open Add Rasters to Mosaic Dataset geoprocessing tool. Set the variables on the Parameters tab as follows:
      • Mosaic Dataset—Select the input mosaic dataset.
      • Raster Type—Select Sentinel-2 from the drop-down list.
      • Processing Templates—Select BOA Reflectance from the drop-down list.
      • Input Data—Select Folder from the drop-down list and browse to and add the .SAFE files.
      Creating Mosaic dataset
    3. Click Run.
  2. Data processing:
  3. To process the data, make sure you have downloaded the Agricultural Field Delineation model and added the imagery layer to ArcGIS Pro.
  4. Zoom to an area of interest or use the entire tile of Sentinel-2 L2A 12 bands imagery.
    Zoomed in to the area of interest
  5. Browse to Tools on the Analysis tab.
    Tools on the Analysis tab
  6. Click the Toolboxes tab in the Geoprocessing pane, select Image Analyst Tools, and browse to the Detect Objects Using Deep Learning tool under Deep Learning.
    Detect Objects Using Deep Learning tool
  7. Set the variables on the Parameters tab as follows:
    1. Input Raster—Select the imagery as discussed above.
    2. Output Detected Objects—Set the output feature class that will contain the detected objects.
    3. Model Definition—Select the pretrained or fine-tuned model .dlpk file. Use the Agricultural Field Delineation model downloaded previously.
    4. Arguments (optional)—Change the values of the arguments if required.
      • padding—Number of pixels at the border of image tiles from which predictions are blended for adjacent tiles. Increase its value to smooth the output while reducing edge artifacts. The maximum value of the padding can be half of the tile size value.
      • batch_size—Number of image tiles processed in each step of the model inference. This depends on the memory of your graphic card.
      • return_bboxes—If set to True, the tool will return a bounding box around the detected feature.
      • merge policy—Policy for merging predictions (mean or nms). Applicable when test_time_augmentation is True.
      • tile_size—The width and height of image tiles into which the imagery is split for prediction.
      • radiometric_offset_correction—Corrects radiometric offset of -1000 in imagery sensed after January 25, 2022 in Sentinel 2 L2A imagery. So for prior to January 2022 data, keep it as False. For post-January 2022 data, first verify if your data provider has already applied the offset; for example, for AWS data, it is already radiometric offset corrected and doesn't require correction again, so you would keep the parameter as False. However, for post-January 2022 data from sources like Microsoft Azure and Copernicus, both require radiometric offset correction, so you would set the parameter to True. But as an exception for post-January 2022 data, for darker areas, offset correction false is preferred.
      • threshold—The detections that have confidence scores higher than this threshold are included in the result. The allowed values range from 0 to 1.0. A lower threshold or different threshold values could be used for irregular shapes or different geographic.
      • test_time_augmentation—Performs test time augmentation while predicting. If true, predictions of flipped and rotated variants of the input image will be merged into the final output.
    5. Non-Maximum Suppression(optional)—Check or uncheck the check box as needed. If checked, optionally, do the following:
      • Set Confidence Score Field.
      • Set Class Value Field.
      • Set Maximum Overlap Ratio.
    Detect Objects Using Deep Learning tool Parameters tab
  8. Set the variables on the Environments tab as follows:
    1. Processing Extent—Select Current Display Extent or any other option from the drop-down menu.
    2. Cell Size (required)—Use the default.

      The expected raster resolution is 10 meters.

    3. Processor Type—Select CPU or GPU.

      It is recommended that you select GPU, if available, and set GPU ID to specify the GPU to be used.

    Detect Objects Using Deep Learning tool Environments tab
  9. Data visualization:
  10. Click Run.

    As soon as processing finishes, the output layer with field delineations is added to the map.

    Detected parcels as result

Regularize Agricultural fields

Complete the following steps to improve the visual appearance of the detected agricultural fields using Regularize Building Footprint (3D Analyst) for polygons and circles as show below:

  1. Browse to Tools on the Analysis tab.
    Tools on the Analysis tab in ArcGIS Pro
  2. Click the Toolboxes tab in the Geoprocessing pane, expand 3D Analyst Tools, and browse to the Regularize Building Footprint tool under Extraction
    Regularize Building Footprint
  3. Set the variables on the Parameters tab as follows:
    1. Input Features—The polygons that represent the agricultural fields to be regularized.
    2. Output Feature Class—The feature class that will be produced.
    3. Method—Specifies the regularization method that will be used in processing the input features.

      • Right Angles—Shapes composed of 90 degree angles between adjoining edges will be constructed.
      • Right Angles and Diagonals—Shapes composed of 45 degree and 90 degree angles between adjoining edges will be constructed.
      • Any Angles—Shapes that form any angles between adjoining edges will be constructed.
      • Circle—The best fitting circle around the input features will be constructed.

    4. Tolerance—For most methods, this value represents the maximum distance that the regularized footprint can deviate from the boundary of its originating feature. The specified value will be based on the linear units of the input feature's coordinate system. When using the Circle method, this option can also be interpreted as a ratio of the difference between the original feature and its regularized result against the area of the regularized result based on the selection that is made in the Tolerance Type parameter.
    5. Densification—The sampling interval that will be used to evaluate whether the regularized feature will be straight or bent. The densification must be equal to or less than the tolerance value. This parameter is only used with methods that support right angle identification.
    6. Precision—The precision of the spatial grid that will be used in the regularization process. Valid values range from 0.05 to 0.25.
    7. Diagonal Penalty—When the Right Angles and Diagonals method is used, this value identifies the likelihood of constructing right angles or diagonal edges between two adjoining segments. When the Any Angles method is used, this value identifies the likelihood of constructing diagonal edges that do not conform to the preferred edges determined by the tool's algorithm. If the penalty value is set to 0, the preferred edges will not be used, resulting in the production of a simplified irregular polygon. Generally, the higher the value, the less likely a diagonal edge will be constructed.
    8. Minimum Radius—The smallest radius allowed for a regularized circle. A value of 0 implies that there is no minimum size limit. This option is only available with the Circle method.
    9. Maximum Radius—The largest radius allowed for a regularized circle. This option is only available with the Circle method.
    10. Alignment Feature(Optional)—The maximum distance threshold that will be used for finding the nearest alignment feature. For example, a value of 20 meters means the nearest line that is within 20 meters will be used to align the regularized polygon.
    11. Tolerance Type(Optional)— Specifies how tolerance will be applied when the Method parameter is set to Circle.
  4. If agricultural fields are rectangular as shown below, select Any Angles as the Method parameter for field boundaries simplification.
    Regularize rectangular agricultural fields
    Regularize rectangular agricultural fields parameter
  5. Click Run.

    As soon as processing finishes, the output layer is added to the map.

    Regularized rectangular agricultural fields
  6. With agricultural fields that are circular in shape, select Circle as the Method parameter for making the generalized circles.
    Regularize circular agricultural fields
    Regularize circular agricultural fields parameter
  7. Click Run.

    As soon as processing finishes, the output layer is added to the map.

    Regularized circular agricultural fields