Showing results for 
Search instead for 
Do you mean 

Mapping Oil Palms using Deep Learning Object Detection

by Technical Evangelist ‎04-16-2020 01:03 PM - edited ‎04-29-2020 11:00 AM (2,902 Views)

Download models and sample data (297 MB)


Deep Learning-based Object Detection using ERDAS IMAGINE can streamline the process of identifying and mapping features such as oil palm growth locations from aerial and satellite imagery. Object detection is the process of recognizing the location of an object or attribute, such as an Oil Palm, or a vehicle, or storage tanks, or solar panels, etc. Basically any type of object which has a reasonably standardized spatial structure in the imagery it occurs in.


Counting Palm Trees


Rather than going into a lot of background on the reason for these spatial models please review this short Blog:

...and then the short "how to" video I made:

The general Object Detection workflow is also documented in the Help provided with ERDAS IMAGINE and Spatial Modeler, or that is available online here:



The spatial models provided here will detect and generate bounding boxes of Palm Trees from an image using CNN based Deep Learning. But the basic principles can be applied to any type of object detection. The generation of object detection bounding boxes is performed in a three-step process.

  1.  Collect Training samples

    In order to train a classifier you must first have sample image chips depicting the type of object(s) you wish to find in other imagery. The spectral and spatial resolution of the training imagery should be consistent with the type of imagery you wish to eventually run the detection on. 

    Collecting training sample footprints

    The easiest method of collecting suitable training chips using ERDAS IMAGINE is to use the tools available in the Machine Learning Layout. Select File > Layout > Machine Learning Layout to switch to this mode, then follow the instructions in the video on how to collect training samples.

    To review the training samples provided in the Downloads above you can follow these steps:

    - In the Machine Learning Layout activate the Train tab
    - Use Explorer to drag and drop one of the palm_tile*.img images from the Training directory into the 2D View to display that chip
    - In the Collect Training Data group's Type pull down select "Object Footprints Only" and the footprints that were created for this image chip should be displayed

    Once you've collected your training (and hundreds, if not thousands, of footprints may be required for good training) you can swap back to the standard layout.

  2. Initializing a Machine Intellect:

    A machine intellect to be used for the detection is first initialized (trained) using known bounding boxes of Palm trees from several image chips. Once we get a trained machine intellect that has a good learning and validation accuracy, we can use it for the detection phase.  Care has to be taken not to over fit the machine intellect to the training data. Overfit happens when you have very good learning accuracy but low validation accuracy, which points that that model is good at identifying the trees in the training data but not so much when given an independent data.

    Train a Machine Intellect to Detect Palm Trees.gmdx

    To this end the provided model is a little more complex than the one shown in the video. A sub-model has been added to the end of the process which generates a report capturing information about the run of the model, including the Learning and Validation accuracies achieved with the training data and number of Steps applied. This way you are ensured to have the information even if you ran the process overnight (training a Deep Learning object detector can be a lengthy process, even when using a GPU-accelerated CUDA graphics card). The report is created alongside the output Machine Intellect (.miz) file and has the same root name, but with a .txt extension.

    Summary Report sub-model

  3. Detecting Palm Trees:

    The trained machine intellect can then be used to identify and generate bounding boxes of Palm trees in other images.

    If using the provided data you can attempt to identify Palm Trees in the .\Detect\palm_trees_tile2_2.img image.

    Detect Palm trees from images using DL.gmdx

    Again the provided spatial model is a little more complex that the basic one shown in the video. In this instance a simple post-process has been applied to the detection bounding boxes to show how this can enhance the detection process. Since the results from the Detect Objects using Deep Learning operator is a stream of Features (consisting of the bounding box area geometries encompassing detected Palm trees) all the feature processing operators can be brought to bear. You could collapse the boxes to point labels, or calculate the area of the boxes to help estimate the age and productivity of each tree. In this example I used a Filter by Attributes operator to remove detections that had a probability of being Palm Tress of less than 0.95 before writing out the final results as a shapefile. 


Example data:

Open source data provided in the Download was provided by OpenAerialMap

When unzipped the following directories should be provided from the Download


Detect – Directory containing the sample image palm_trees_tile2_2.img on which the detection can be run to map the location of palm trees

Machine Intellect  – Directory containg a pre-built Machine Intellect palmtrees_mi_25000.miz generated using the Initialization spatial model. This can be used to classify Palm Trees without spending the time to collect training or to initialise an Object Detection neural network.

Output  Directory containing the shapefile detected_palm_trees_tile_2_2_2020_25000.shp generated by running the detection model on palm_trees_tile2_2.img 

Spatial Models  Directory containing the two pre-built Spatial Models mentioned above

Training  Directory containing image chips and corresponding XML footprint files denoting examples of Palm trees. This exisitng training can be used as an input to the Initialization model if you dont wish to collect your own training samples.


on ‎04-16-2020 05:15 PM

Excelent Material! Congrats Team!!!

on ‎09-14-2020 06:32 PM

@ian.anderson Hi Ian, could you please provide the link of downloading raw data on ? Appreciate it!