ENVITensorFlowObjectModel

This is a reference to an ENVITensorFlowObjectModel object, which specifies the TensorFlow object detection model used for deep learning.

This routine is part of ENVI Deep Learning, which requires a separate license and installation.

Example

Sample data files are available on our ENVI Tutorials web page. Click the "Deep Learning" link in the ENVI Tutorial Data section to download a .zip file containing the data. Extract the contents of the .zip file to a local directory. Files are located in the object_detection directory.

This example uses an object detection model that was trained to find parking spots with handicap signs painted on the pavement; for example:

; Start the application

e = ENVI(/HEADLESS)

 

; Select a trained model.

; Update the following line with the correct path

; to the tutorial data files.

ModelFile = 'C:\MyTutorialFiles\ObjectDetectionModel_HandicapSpots.h5'

Model = ENVITensorFlowObjectModel(ModelFile)

 

; Print the model properties

Print, Model, /IMPLIED_PRINT

Syntax

Result = ENVITensorFlowObjectModel(Input_File [, Properties=value] [, ERROR=value])

Return Value

This routine returns a reference to an ENVITensorFlowObjectModel object.

Arguments

Input_File

Specify a fully qualified filename and path to an ENVITensorFlowObjectModel file in HDF5 format.

Methods

Close

Dehydrate

Hydrate

Properties

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

DESCRIPTION (Get)

A description of the model's capabilities.

EPOCHS (Get, Set)

Specify the number of epochs to run. Training inputs are adjusted at the end of each epoch.

MODEL_TYPE (Get)

A string with the model type; for example:

NAME (Get)

The name of the model.

NBANDS (Get, Set)

The number of bands in the training rasters.

NCLASSES (Get, Set)

The number of classes (minus the background class).

PATCH_SIZE (Get, Set)

Specify the width and height (in pixels) of the patch to use during training. It should be large enough to contain one or more bounding box annotations.

PATCHES_PER_BATCH (Get, Set)

Specify the number of patches to run per batch. A batch comprises one iteration of training; model parameters are adjusted at the end of each iteration. Batches are run in an epoch until the number of patches per epoch is met or exceeded.

STEPS_PER_EPOCH (Get, Set)

Specify how many training steps the model should run with the training dataset before proceeding to the next epoch.

URI (Get)

A string that is a fully qualified raster file path.

VALIDATION_STEPS (Get, Set)

Specify how many validation steps the model should run with the validation dataset before interrupting validation and proceeding to the next epoch.

Keywords

ERROR (optional)

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See the Manage Errors topic in ENVI Help for more information on error handling.

Version History

1.2

Introduced

See Also

TrainTensorFlowObjectModel Task, TensorFlowObjectClassification Task, BuildObjectDetectionRasterFromAnnotation Task, ENVIDeepLearningObjectDetectionRaster