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.
After activating the Geo-SAM plugin, you will find the Geo-SAM tools under the Plugins menu,
You will also see a new toolbar with four icons:
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.
Click the Geo-SAM Settings icon in the toolbar.
Go to the Dependencies tab.
Click Install Missing and wait for the installation to finish.
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.
Open Geo-SAM Settings and go to the Model Management tab.
Select a model (e.g., SAM2.1 Base for a good balance of speed and accuracy).
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#
5-minute quickstart: Quick Start (5 Minutes)
Full user guide: Usage of Geo-SAM Tools