You can fine-tune the Prithvi - Flood Segmentation model to suit your geographic area, imagery, or features of interest. Fine-tuning a model requires less training data, computational resources, and time compared to training a new model.
Fine-tuning the model is recommended if you do not get satisfactory results from the available ArcGIS pretrained deep learning models. This can happen when your area of interest falls outside the applicable geographies for the models or if your imagery properties such as resolution, scale, and seasonality are different.
You can use the Export Training Data For Deep Learning tool to prepare training data. Next, you can fine-tune this model on your data using the Train Deep Learning Model tool in ArcGIS Pro. Follow the steps below to fine-tune the model.
Prepare training data
This model is trained on the six bands composite of either Harmonized Landsat 8 (HLSL30) or Harmonized Sentinel 2 (HLSS30) and flood labels. Use the Export Training Data For Deep Learning tool to prepare training data for fine-tuning the model.
- Browse to Tools under the Analysis tab.

- Click the Toolboxes tab in the Geoprocessing pane, select Image Analyst Tools, and browse to the Export Training Data For Deep Learning tool in the Deep Learning toolset.

- Set the variables under the Parameters tab as follows:
- Input Raster—Select the six-band imagery. For more details regarding input raster, refer to Recommended imagery configuration.
- Output Folder—Select a directory on your machine.
- Input Feature Class Or Classified Raster Or Table (optional)—Select the labeled feature class or classified raster representing water.
The feature class should also have a text field named ClassName with value set to Water.
- Class Value Field— If a feature class is used in the preceding step, set the ClassValue field to 1.
- Image Format—Select TIFF format.
- Tile Size X—Use a tile size that is appropriate for your specific use case and
aligns with the model's context requirements.
In this case, 224 will be used.
- Tile Size Y—Use a tile size that is appropriate for your specific use case and
aligns with the model's context requirements.
In this case, 224 will be used.
- Stride X—Type 0.
- Stride Y—Type 0.
- Metadata Format—Select Classified Tiles.

- Set the variables under the Environments tab.
- Processing Extent—Select Current Display Extent or any other option from the drop-down menu as needed.
- Cell Size—Set the value to the desired cell size.

- Click Run.
Once processing is complete, the exported training data is saved in the specified directory.
Fine-tune the Prithvi - Flood Segmentation model
Complete the following steps to fine-tune the model using learn module of ArcGIS API for Python:
- Browse to Tools under the Analysis tab.

- In the Geoprocessing pane, click the Toolboxes tab and expand Image Analyst Tools. Select the Train Deep Learning Model tool under Deep Learning.

- Set the variables under the Parameters tab as follows:
- Input Training Data—Use the path to your exported training data from the previous step.
- Output Folder—Select a directory on your machine.
- Max Epochs (optional)—Type 20 or the number of iterations you want to fine-tune the model for.
Epoch is the number of iterations the tool will take to go over the data.
- Model Type— Select MMSegmentation (Pixel classification) from the drop down list.
- Model Arguments— Type prithvi100m for model.
- Stop when model stops improving—Check the box.
- Freeze Model—Check the box.

- Set the variables under the Environments tab.
- Processor Type—Select CPU or GPU as needed.
If GPU is available, it is recommended that you select GPU and set GPU ID to the GPU to be used.

- Processor Type—Select CPU or GPU as needed.
- Click Run.
You can now use this model to run inferencing against your imagery.