Exercise: Prepare Training Sample Data For Object Detection
Exercise: Prepare Training Sample Data For Object Detection
Exercise
Prepare training sample data for
object detection
Section 5 Exercise 1
03/2020
Spatial Data Science MOOC
Time to complete
45 minutes
Introduction
Deep learning is a type of machine learning. It relies on multiple layers of nonlinear
processing for feature identification and pattern recognition. ArcGIS uses deep learning
frameworks to accomplish various deep learning analyses, including object detection. Training
a model to detect one, or multiple objects, saves the time and expense of digitizing and
collecting data. It also allows you to expand your analysis by using the model with different
datasets and in different locations.
Exercise scenario
Tax assessors at local government agencies often rely on surveys to estimate property value
and calculate property taxes. These surveys are infrequent, which means that there can be
some inaccuracy in the assessment records. Swimming pools are an important part of these
assessments because they impact the value of the property. You will use ArcGIS deep learning
tools to detect all swimming pools in a defined area. Tax assessors can use this information to
identify newly constructed pools that were not recorded in the assessment records. This
information will help tax assessors identify more appropriate property values and taxes, which
can lead to additional revenue for the community.
c Extract the files to a folder on your local computer, saving them in a location that you will
remember.
Your ArcGIS Pro project includes an imagery file that shows a false-color image of an area in
Southern California. This false-color image uses an infrared band to visualize vegetation in
red. Although you can use a true-color image for this analysis, the false-color image better
distinguishes pools from other objects.
In this step, you will follow the process of creating training samples using the Label Objects
For Deep Learning tool.
b From the Imagery tab, in the Image Classification group, click Classification Tools and
choose Label Objects For Deep Learning.
The Image Classification pane provides tools for you to trace, or digitize, the features that you
will use as your training samples.
e On the map, click the four corners of the pool to create a rectangular outline.
i Click OK.
Note: The color and pixel percentage of your Pool polygons may differ.
In the Image Classification pane, under Labeled Objects, the next pool is automatically added
and labeled as Pool.
After creating your training samples, you would use the pane's Export Training Data tab to
export these training samples into a format that you can use to train your model. Because the
creation of training samples can be a time-consuming process, you will proceed with a layer of
pre-created training samples.
This analysis will detect one class: pools. As such, there is only one class value: 0.
Image chips use the training sample locations to cut, or chip, the source imagery into defined
sub images that will contain a training sample. These image chips will be used to train the
object detection deep learning model.
a In the Geoprocessing pane, search for and open the Export Training Data For Deep
Learning (Image Analyst Tools) tool.
You will use this tool to define the properties of the image chips.
c For Buffer Radius, point to the parameter name and pause your pointer on the
Geoprocessing Input Information icon .
The Geoprocessing Input Information icon provides an explanation of how the parameter
is used in the tool. Because you are using point data, you can use this parameter to add a
buffer around each point, creating circular polygon training samples that will better represent
the shape of the pools.
This parameter delineates the area where image chips will be created. You want to create
image chips for all training samples, so you will leave this parameter empty.
The Meta Data Format defines the format for the image chip labels. The PASCAL Visual
Object Classes is a standardized image dataset format for object class detection.
l Click Run.
A message appears at the bottom of the Geoprocessing pane to confirm that the tool is
complete.
b Browse to ..\ObjectDetection\ImageChips.
The tool creates a folder for the image chips that includes the images, label definitions for the
images, image statistics, and a model definition file. The model definition file references this
image chip information. You will use the model definition file to train the model.
This image chip is an example of one of the image chips that will be used to train the model.
f If you are continuing to the next exercise, leave ArcGIS Pro open; otherwise, exit ArcGIS
Pro.