FINETUNE_CUSTOM_MODEL
The FINETUNE_CUSTOM_MODEL command allows users to adjust any of the built-in Deep Learning models based on their own data.
The following parameters are supported by the command:
- EXPERIMENT_NAME - Specifies the name of the output custom model. Must not be the name of an existing model for the same type.
- INPUT_FILES - Specifies the input training data. This requires a pair of files: one with imagery, and one with ground truth data. For example, when fine tuning a building detection model, there should be an image followed by a file with vector features representing the buildings in that image. Such as, INPUT_FILES="bellingham1.tif,bellingham1.shp".
-
MODEL_TYPE - Specifies what kind of model to use by its numeric ID, such as MODEL_TYPE="1". Available models and their IDs are:
ID Model 1 Building Extraction - Aerial 2 Land Cover Classification (4 Bands) - NAIP 3 Land Cover Classification (3 Bands) - NAIP 4 Land Cover Classification (4 Bands) - NAIP Desert 5 Land Cover Classification (3 Bands) - NAIP Desert 6 Land Cover Classification (4 Bands) - NAIP Chaparral 7 Land Cover Classification (3 Bands) - NAIP Chaparral 8 Vehicle Detection (3 Bands)
- DEVICE - Specifies whether to use CUDA-enabled GPU or only CPU. If this parameter is not specified, the setting from Deep Learning Modules Configuration will be used. Valid values are DEVICE="CPU" and DEVICE="CUDA".
- ITERATIONS - Specifies the number of iterations through the training data. This must be a positive integer, and defaults to 10.
- BATCH_SIZE - Specifies how many examples the model processes simultaneously. If not specified, this will default to the maximum batch size supported by the user's hardware.
- LEARNING_RATE - This affects how much the model adjusts its predictions with each batch of training data. Accepted values are between 1e-8 and 1.0, and can be formatted with either decimal or scientific notation.
- EARLY_STOP_PATIENCE - Specifies the number of iterations with no improvement after which training will be stopped. A value of 0 will disable early stopping.
- ALLOW_FULL_TRAINING - If set to YES, a model will be fully retrained rather than just fine-tuned. If set to NO, an existing model will be fine-tuned.
- TARGET_LCC_CLASSES_FILE - This parameter is only valid for land cover classification, and can be created by beginning the process of performing a full training in the interface. Specify the entire filepath to the .gmlcc, as in TARGET_LCC_CLASSES_FILE="C:\MyProjects\Finetuning_Training\LCC\3band\mod3_classes.GMLCC".
-
Specify Bounding Box for Operation
See also Specify Bounds for Operation
- GLOBAL_BOUNDS - specifies the combine bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, maximum x, maximum y.
- GLOBAL_BOUNDS_SIZE - specifies the combine bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, width in x, width in y.
- LAT_LON_BOUNDS - specifies the combine bounds in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of west-most longitude, southern-most latitude, eastern-most longitude, northern-most latitude.
- LAYER_BOUNDS - specifies that the operation should use the bounds of the loaded layer(s) with the given filename. For example, to export to the bounds of the file "c:\test.tif", you would use LAYER_BOUNDS="c:\test.tif". Keep in mind that the file must be currently loaded.
- LAYER_BOUNDS_EXPAND - specifies that the operation should expand the used LAYER_BOUNDS bounding box by some amount. The amount to expand the bounding rectangle by should be specified in the current global projection. For example, if you have a UTM/meters projection active and want to expand the bounds retrieved from the LAYER_BOUNDS parameter by 100 meters on the left and right, and 50 meters on the top and bottom, you could use LAYER_BOUNDS_EXPAND="100.0,50.0". You can also specify a single value to apply to all 4 sides, or supply 4 separate values in the order left,top,right,bottom.
- SNAP_BOUNDS_TO_MULTIPLE - specifies that the top-left corner of the bounding box for the operation should be snapped to a multiple of the given value. For example, using SNAP_BOUNDS_TO_MULTIPLE=1 will snap the top-left corner to the nearest whole number. The values will always go smaller for X/easting/longitude and larger to Y/northing/latitude so you always get at least what is requested.
- SNAP_BOUNDS_TO_SPACING - specifies that the top-left corner of the bounding box for the operation should be snapped to a multiple of the resolution of the operation. For example, if you are exporting at 5 meter spacing, the top left corner will be snapped to the nearest multiple of 5. Use SNAP_BOUNDS_TO_SPACING=YES to enable or SNAP_BOUNDS_TO_SPACING=NO to disable. If not provided, the global setting for snapping exports to the nearest sample spacing boundary from the Advanced section of the General tab of the Configuration dialog will be used.
- USE_EXACT_BOUNDS - specifies that the exact bounds that were defined in the command should be used. Generally, when the bounds specified in a command are not the same as the data bounds, the command uses the intersection between the two. When USE_EXACT_BOUNDS=YES is specified, the command will use the bounds as specified, instead of the intersection.
SAMPLE
// Perform a full training of land cover classification model for 3-band NAIP imagery. IMPORT FILENAME="C:\MyProjects\Finetuning_Training\LCC\3band\ny_1m_m4207422_se_sub1_3band.tif" IMPORT FILENAME="C:\MyProjects\Finetuning_Training\LCC\3band\ny_1m_m4207422_se_sub1_lcc_prediction_colorpalette_mod3.tif" IMPORT FILENAME="C:\MyProjects\Finetuning_Training\LCC\3band\ny_1m_m4207422_se_sub2_3band.tif" IMPORT FILENAME="C:\MyProjects\Finetuning_Training\LCC\3band\ny_1m_m4207422_se_sub2_lcc_prediction_colorpalette_mod3.tif" FINETUNE_CUSTOM_MODEL EXPERIMENT_NAME="first" \ INPUT_FILES="ny_1m_m4207422_se_sub1_3band.tif,ny_1m_m4207422_se_sub1_lcc_prediction_colorpalette_mod3.tif" \ INPUT_FILES="ny_1m_m4207422_se_sub2_3band.tif,ny_1m_m4207422_se_sub2_lcc_prediction_colorpalette_mod3.tif" \ MODEL_TYPE="3" ITERATIONS=1 BATCH_SIZE=4 LEARNING_RATE=0.00001 EARLY_STOP_PATIENCE=11 \ ALLOW_FULL_TRAINING="YES" TARGET_LCC_CLASSES_FILE="C:\MyProjects\Finetuning_Training\LCC\3band\mod3_classes.GMLCC"
Comments
0 comments
Please sign in to leave a comment.