↵
Prompt for Segmentation
Instructions for Use
The Prompt for Segmentation function enables fine-grained segmentation of high-resolution images using vector prompt data. Simultaneously, thanks to the zero-shot generalization capability of the SAM model, the Prompt for Segmentation function can quickly accomplish various remote sensing segmentation tasks, better meeting business application needs.
Parameter Description
- Source Dataset: Select the file-based image data (such as *.tif, *.img, etc.) or image dataset that requires Prompt for Segmentation, supporting only 8-bit unsigned true color images.
- Prompt Type: Supports three types: "rectangular box prompt", "polygon prompt", and "no prompt data", with no prompt as the default.
- Prompt Dataset: Supports vector surface dataset, and prompt data can also not be input.
- Model Magnitude: Ranges from 1 to 4, representing the parameter quantity from small to large (vit-t, vit-b, vit-l, vit-h), with 4 as the default. The larger the parameter quantity, the more complex the model, and generally the higher the accuracy of the segmentation result.
- Sampling Method: Supports equidistant sampling and local similarity sampling. When the prompt data type is "no prompt", equidistant sampling is default; when the prompt data type is "polygon prompt", local similarity sampling is default; when the prompt data type is "rectangular box prompt", this parameter is not selectable.
- The Size of Tiles: The tile size for block-wise inference of larger images, with a default value of 1024.
- Tile Overlap (Pixels): The default value is 0, and it can be set to one-eighth to one-quarter of the tile size. For example, if the tile size is set to 1024, this parameter can be set to 128-256. The larger the tile overlap in pixels, the longer the time required to infer the entire image.
- Batch Size: Due to the large volume of remote sensing image data, under the limitations of computer performance, the model cannot be loaded at once, so a block-wise reading and processing method is adopted during inference. Batch size refers to the number of slices inferred simultaneously. Appropriately increasing the batch size can improve interpretation efficiency, but it is limited by the video memory (for GPU inference) or memory (for CPU inference) size of the inference device.
- Processor Type: You can use the computer's Central Processing Unit (CPU) or Graphics Processing Unit (GPU) to process data.
- GPU ID: Specify the GPU ID for data processing. Default is 0. If "Processor Type" selects CPU, this value is fixed at -1. If using GPU, you need to query the GPU ID via the "nvidia-smi" command in the system command line, and the GPU ID is based on the query result. If there are multiple GPUs, you can specify the GPU identifier for data processing. If multiple GPUs need to be used, please separate them with English commas ",", such as "0,2,3", indicating the use of GPUs with IDs 0, 2, and 3.
- Result Data: The result region dataset of Prompt for Segmentation, set the data source and save name for the result dataset.
Related Topics
Classification of Ground Objects