Installation#

Total steps: 5


Step 1: Install QGIS#

Install the latest version of QGIS. Geo-SAM has been tested on QGIS 3.x/4.x.

Alternative: install QGIS via conda

If you encounter issues with the official installer, you can install QGIS via conda:

conda create -n qgis python qgis -c conda-forge -y
conda activate qgis
qgis 
# or 
# conda run qgis (if multiple qgis installed)

Step 2: Install the Geo-SAM Plugin#

In QGIS, go to the menu Plugins > Manage and Install Plugins. Search for Geo SAM in the search bar, select it, and click Install. After installation, check the checkbox to activate the plugin.

Plugin menu

After activating the Geo-SAM plugin, you will find the Geo-SAM tools under the Plugins menu,

Plugin menu

You will also see a new toolbar with four icons:

Plugin toolbar

Name

Role

Description

Geo-SAM Segmentation

Main Tool

Interactive segmentation with points and bounding boxes

Geo-SAM Image Encoder

Auxiliary Tool

Pre-encode raster images into reusable feature files

Geo-SAM Encoder Copilot

Auxiliary Tool

Preview patch coverage before encoding

Geo-SAM Settings

Settings

Manage dependencies, models, cache, and help

Step 3: Install Dependencies#

Geo-SAM requires several Python packages (PyTorch, geosam, rasterio, etc.) to function. These are managed directly inside the plugin – no manual pip commands are needed.

  1. Click the Geo-SAM Settings icon in the toolbar.

  2. Go to the Dependencies tab.

  3. Click Install Missing and wait for the installation to finish.

  4. Restart QGIS when prompted.

First-time setup

Dependencies are installed into an isolated, plugin-private directory so they do not interfere with your QGIS Python environment.

See Dependencies for details.

Step 4: Download a SAM Model#

A SAM model checkpoint is required for both image encoding and segmentation.

  1. Open Geo-SAM Settings and go to the Model Management tab.

  2. Select a model (e.g., SAM2.1 Base for a good balance of speed and accuracy).

  3. Click Download and wait for the download to complete.

See Model Management for the full list of available models.

Step 5: Start Using Geo-SAM#