geoai-py 0.23.0__tar.gz → 0.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {geoai_py-0.23.0 → geoai_py-0.24.0}/PKG-INFO +1 -1
  2. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/__init__.py +1 -1
  3. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/PKG-INFO +1 -1
  4. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/SOURCES.txt +1 -0
  5. {geoai_py-0.23.0 → geoai_py-0.24.0}/mkdocs.yml +1 -0
  6. {geoai_py-0.23.0 → geoai_py-0.24.0}/pyproject.toml +2 -2
  7. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/README.md +129 -180
  8. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/samgeo.py +163 -5
  9. geoai_py-0.24.0/qgis_plugin/package_plugin.py +296 -0
  10. {geoai_py-0.23.0 → geoai_py-0.24.0}/.dockerignore +0 -0
  11. {geoai_py-0.23.0 → geoai_py-0.24.0}/.editorconfig +0 -0
  12. {geoai_py-0.23.0 → geoai_py-0.24.0}/.gitignore +0 -0
  13. {geoai_py-0.23.0 → geoai_py-0.24.0}/.pre-commit-config.yaml +0 -0
  14. {geoai_py-0.23.0 → geoai_py-0.24.0}/CITATION.cff +0 -0
  15. {geoai_py-0.23.0 → geoai_py-0.24.0}/Dockerfile +0 -0
  16. {geoai_py-0.23.0 → geoai_py-0.24.0}/LICENSE +0 -0
  17. {geoai_py-0.23.0 → geoai_py-0.24.0}/MANIFEST.in +0 -0
  18. {geoai_py-0.23.0 → geoai_py-0.24.0}/README.md +0 -0
  19. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/__init__.py +0 -0
  20. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/catalog_models.py +0 -0
  21. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/catalog_tools.py +0 -0
  22. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/geo_agents.py +0 -0
  23. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/map_tools.py +0 -0
  24. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/stac_models.py +0 -0
  25. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/agents/stac_tools.py +0 -0
  26. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/auto.py +0 -0
  27. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/change_detection.py +0 -0
  28. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/classify.py +0 -0
  29. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/detectron2.py +0 -0
  30. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/dinov3.py +0 -0
  31. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/download.py +0 -0
  32. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/extract.py +0 -0
  33. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/geoai.py +0 -0
  34. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/hf.py +0 -0
  35. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/landcover_train.py +0 -0
  36. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/landcover_utils.py +0 -0
  37. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/map_widgets.py +0 -0
  38. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/moondream.py +0 -0
  39. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/sam.py +0 -0
  40. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/segment.py +0 -0
  41. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/segmentation.py +0 -0
  42. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/timm_segment.py +0 -0
  43. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/timm_train.py +0 -0
  44. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/tools/__init__.py +0 -0
  45. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/tools/cloudmask.py +0 -0
  46. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/tools/multiclean.py +0 -0
  47. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/tools/sr.py +0 -0
  48. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/train.py +0 -0
  49. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai/utils.py +0 -0
  50. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/dependency_links.txt +0 -0
  51. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/entry_points.txt +0 -0
  52. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/requires.txt +0 -0
  53. {geoai_py-0.23.0 → geoai_py-0.24.0}/geoai_py.egg-info/top_level.txt +0 -0
  54. {geoai_py-0.23.0 → geoai_py-0.24.0}/pytest.ini +0 -0
  55. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/LICENSE +0 -0
  56. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/__init__.py +0 -0
  57. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/_geoai_lib.py +0 -0
  58. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/__init__.py +0 -0
  59. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/map_tools.py +0 -0
  60. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/moondream.py +0 -0
  61. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/segmentation.py +0 -0
  62. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/dialogs/update_checker.py +0 -0
  63. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/geoai_plugin.py +0 -0
  64. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/about.svg +0 -0
  65. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/gpu.svg +0 -0
  66. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/icon.png +0 -0
  67. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/moondream.svg +0 -0
  68. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/samgeo.png +0 -0
  69. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/icons/segment.svg +0 -0
  70. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/geoai_plugin/metadata.txt +0 -0
  71. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/install.py +0 -0
  72. {geoai_py-0.23.0 → geoai_py-0.24.0}/qgis_plugin/install.sh +0 -0
  73. {geoai_py-0.23.0 → geoai_py-0.24.0}/requirements.txt +0 -0
  74. {geoai_py-0.23.0 → geoai_py-0.24.0}/requirements_docs.txt +0 -0
  75. {geoai_py-0.23.0 → geoai_py-0.24.0}/setup.cfg +0 -0
  76. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/__init__.py +0 -0
  77. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/create_test_data.py +0 -0
  78. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_classify.py +0 -0
  79. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_download.py +0 -0
  80. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_extract.py +0 -0
  81. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_fixtures.py +0 -0
  82. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_geoai.py +0 -0
  83. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_segment.py +0 -0
  84. {geoai_py-0.23.0 → geoai_py-0.24.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoai-py
3
- Version: 0.23.0
3
+ Version: 0.24.0
4
4
  Summary: A Python package for using Artificial Intelligence (AI) with geospatial data
5
5
  Author-email: Qiusheng Wu <giswqs@gmail.com>
6
6
  License: MIT License
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = """Qiusheng Wu"""
4
4
  __email__ = "giswqs@gmail.com"
5
- __version__ = "0.23.0"
5
+ __version__ = "0.24.0"
6
6
 
7
7
 
8
8
  import os
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoai-py
3
- Version: 0.23.0
3
+ Version: 0.24.0
4
4
  Summary: A Python package for using Artificial Intelligence (AI) with geospatial data
5
5
  Author-email: Qiusheng Wu <giswqs@gmail.com>
6
6
  License: MIT License
@@ -53,6 +53,7 @@ geoai_py.egg-info/top_level.txt
53
53
  qgis_plugin/README.md
54
54
  qgis_plugin/install.py
55
55
  qgis_plugin/install.sh
56
+ qgis_plugin/package_plugin.py
56
57
  qgis_plugin/geoai_plugin/LICENSE
57
58
  qgis_plugin/geoai_plugin/__init__.py
58
59
  qgis_plugin/geoai_plugin/_geoai_lib.py
@@ -136,6 +136,7 @@ nav:
136
136
  - examples/water_dynamics.ipynb
137
137
  - examples/wetland_mapping.ipynb
138
138
  - examples/wetland_dynamics.ipynb
139
+ - examples/wetland_sam3.ipynb
139
140
  - examples/regularization.ipynb
140
141
  - examples/globe_projection.ipynb
141
142
  - examples/samgeo.ipynb
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "geoai-py"
3
- version = "0.23.0"
3
+ version = "0.24.0"
4
4
  dynamic = [
5
5
  "dependencies",
6
6
  ]
@@ -45,7 +45,7 @@ universal = true
45
45
 
46
46
 
47
47
  [tool.bumpversion]
48
- current_version = "0.23.0"
48
+ current_version = "0.24.0"
49
49
  commit = true
50
50
  tag = true
51
51
 
@@ -4,21 +4,32 @@ A QGIS plugin that brings the [geoai](https://github.com/opengeos/geoai) models
4
4
 
5
5
  ## Quick Start
6
6
 
7
- - Create a fresh conda env (`conda create -n geo python=3.12`) and install QGIS + deps (see below).
8
- - Install the plugin (`python install.py`) from this repo.
9
- - Restart QGIS `Plugins` `Manage and Install Plugins...` → enable `GeoAI`.
7
+ - Create a Pixi project and install the dependencies.
8
+ - Install the QGIS plugin from the QGIS Plugin Manager.
9
+ - Enable the GeoAI plugin in QGIS.
10
+ - Restart QGIS.
10
11
  - Open a GeoAI toolbar panel and try the sample datasets below.
11
12
 
12
13
  ## Video Tutorials
13
14
 
15
+ ### Installation Tutorial
16
+
17
+ You can follow this [video tutorial](https://youtu.be/TJmZQXJK-IU) to install the GeoAI QGIS Plugin on Linux/Windows:
18
+
19
+ [![installation](https://github.com/user-attachments/assets/6fa17c97-2ff5-40d6-be16-c6dcfe03f806)](https://youtu.be/TJmZQXJK-IU)
20
+
21
+ ### Usage Tutorial
22
+
14
23
  Check out this [short video demo](https://youtu.be/Esr_e6_P1is) and [full video tutorial](https://youtu.be/8-OhlqeoyiY) on how to use the GeoAI plugin in QGIS.
15
24
 
16
25
  [![demo](https://github.com/user-attachments/assets/5aabc3d3-efd1-4011-ab31-2b3f11aab3ed)](https://youtu.be/8-OhlqeoyiY)
17
26
 
27
+
28
+
18
29
  ## Requirements
19
30
 
20
31
  - QGIS 3.28 or later
21
- - Python 3.10+ (conda recommended)
32
+ - Python 3.10+ (Pixi recommended)
22
33
  - PyTorch (CUDA if you want GPU acceleration)
23
34
  - `geoai` and `samgeo` packages
24
35
 
@@ -53,251 +64,190 @@ Each tool lives inside a dockable panel that can be attached to either side of t
53
64
 
54
65
  ## Installation
55
66
 
56
- ### 1) Set up the environment
57
-
58
- #### Installation on Linux/macOS
67
+ ### 1. Set up the environment
59
68
 
60
- Use a clean conda env dedicated to QGIS—mixing with an existing QGIS install often breaks dependencies.
69
+ Installing the GeoAI QGIS plugin on can be challenging due to the complicated pytorch/cuda dependencies. Conda or mamba might take a while to resolve the dependencies, while pip might fail to install the dependencies properly. It is recommended to use [pixi](https://pixi.prefix.dev/latest) to install the dependencies to avoid these issues.
61
70
 
62
- ```bash
63
- conda create -n geo python=3.12
64
- conda activate geo
65
- ```
71
+ #### 1) Install Pixi
66
72
 
67
- Install core geospatial deps first:
73
+ #### Linux/macOS (bash/zsh)
68
74
 
69
75
  ```bash
70
- conda install -c conda-forge --strict-channel-priority gdal rasterio libnetcdf netcdf4
71
- python -c "import rasterio; print('rasterio import successful')"
76
+ curl -fsSL https://pixi.sh/install.sh | sh
72
77
  ```
73
78
 
74
- Install GeoAI:
79
+ Close and re-open your terminal (or reload your shell) so `pixi` is on your `PATH`. Then confirm:
75
80
 
76
81
  ```bash
77
- conda install -c conda-forge geoai
78
- python -c "import geoai; print('geoai import successful')"
82
+ pixi --version
79
83
  ```
80
84
 
81
- Install QGIS:
85
+ #### Windows (PowerShell)
82
86
 
83
- ```bash
84
- conda install -c conda-forge qgis
85
- ```
86
-
87
- Install SamGeo extras (PyPI is required for some parts):
87
+ Open **PowerShell** (preferably as a normal user, Admin not required), then run:
88
88
 
89
- ```bash
90
- pip install -U "segment-geospatial[samgeo3]" sam3
91
- python -c "import samgeo; print('samgeo import successful')"
89
+ ```powershell
90
+ powershell -ExecutionPolicy Bypass -c "irm -useb https://pixi.sh/install.ps1 | iex"
92
91
  ```
93
92
 
94
- #### Installation on Windows
95
-
96
- Windows installation requires some additional steps compared to Linux/macOS. Choose the appropriate section based on whether you have an NVIDIA GPU or want CPU-only installation.
97
-
98
- **Prerequisites (Required for all Windows users):**
99
-
100
- 1. Install [Miniconda](https://docs.conda.io/en/latest/miniconda.html) or [Anaconda](https://www.anaconda.com/download) if you haven't already.
101
- 2. Open **Anaconda Prompt** (not PowerShell or CMD) for all installation commands.
102
- 3. For GPU users: Ensure you have the latest [NVIDIA GPU drivers](https://www.nvidia.com/Download/index.aspx) installed.
103
-
104
- ##### Option A: Windows with NVIDIA GPU (CUDA)
105
-
106
- This option provides the best performance using your NVIDIA GPU for model inference and training.
93
+ Close and re-open PowerShell, then confirm:
107
94
 
108
- **Step 1: Create and activate the conda environment**
109
-
110
- ```bash
111
- conda create -n geo python=3.12 -y
112
- conda activate geo
95
+ ```powershell
96
+ pixi --version
113
97
  ```
114
98
 
115
- **Step 2: Install PyTorch with CUDA support**
116
-
117
- First, check your NVIDIA driver version to determine the compatible CUDA version:
99
+ ---
118
100
 
119
- ```bash
120
- nvidia-smi
121
- ```
101
+ #### 2) Create a Pixi project
122
102
 
123
- Look for the "CUDA Version" in the output. Then install the appropriate PyTorch version:
103
+ Navigate to a directory where you want to create the project and run:
124
104
 
125
- For CUDA 12.4 (recommended for newer drivers):
126
-
127
- ```bash
128
- conda install pytorch torchvision pytorch-cuda=12.4 -c pytorch -c nvidia -y
105
+ ```powershell
106
+ pixi init geo
107
+ cd geo
129
108
  ```
130
109
 
131
- For CUDA 12.1 (for older drivers):
132
-
133
- ```bash
134
- conda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia -y
135
- ```
110
+ ---
136
111
 
137
- **Step 3: Verify PyTorch GPU installation**
112
+ #### 3) Configure `pixi.toml`
138
113
 
139
- ```bash
140
- python -c "import torch; print(f'PyTorch: {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}'); print(f'GPU: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else \"None\"}')"
141
- ```
114
+ Open `pixi.toml` in the `geo` directory and replace its contents with the following depending on your system.
142
115
 
143
- You should see `CUDA available: True` and your GPU name. If not, see the troubleshooting section below.
116
+ If you have a NVIDIA GPU with CUDA, run `nvidia-smi` to check the CUDA version.
144
117
 
145
- **Step 4: Install QGIS and core dependencies**
118
+ - For GPU with CUDA 12.x:
146
119
 
147
- ```bash
148
- conda install -c conda-forge qgis -y
149
- ```
120
+ ```toml
121
+ [workspace]
122
+ channels = ["https://prefix.dev/conda-forge"]
123
+ name = "geo"
124
+ platforms = ["linux-64", "win-64"]
150
125
 
151
- **Step 5: Install GeoAI**
126
+ [system-requirements]
127
+ cuda = "12.0"
152
128
 
153
- ```bash
154
- conda install -c conda-forge geoai -y
155
- python -c "import geoai; print('geoai import successful')"
129
+ [dependencies]
130
+ python = "3.12.*"
131
+ pytorch-gpu = ">=2.9.1,<3"
132
+ qgis = ">=3.44.5"
133
+ geoai = ">=0.23.0"
134
+ segment-geospatial = ">=0.10.8"
135
+ sam3 = ">=0.1.0.20251211"
136
+ libopenblas = ">=0.3.30"
156
137
  ```
157
138
 
158
- **Step 6: Install SamGeo with SAM3 support**
159
-
160
- ```bash
161
- pip install -U triton-windows
162
- pip install -U "segment-geospatial[samgeo3]"
163
- pip install -U sam3
164
- python -c "import samgeo; print('samgeo import successful')"
139
+ - For GPU with CUDA 13.x:
140
+
141
+ ```toml
142
+ [workspace]
143
+ channels = ["https://prefix.dev/conda-forge"]
144
+ name = "geo"
145
+ platforms = ["linux-64", "win-64"]
146
+
147
+ [system-requirements]
148
+ cuda = "13.0"
149
+
150
+ [dependencies]
151
+ python = "3.12.*"
152
+ pytorch-gpu = ">=2.9.1,<3"
153
+ qgis = ">=3.44.5"
154
+ geoai = ">=0.23.0"
155
+ segment-geospatial = ">=0.10.8"
156
+ sam3 = ">=0.1.0.20251211"
157
+ libopenblas = ">=0.3.30"
165
158
  ```
166
159
 
167
- ##### Option B: Windows CPU-Only (No GPU)
168
-
169
- Use this option if you don't have an NVIDIA GPU or want a simpler installation.
170
-
171
- **Step 1: Create and activate the conda environment**
172
-
173
- ```bash
174
- conda create -n geo python=3.12 -y
175
- conda activate geo
160
+ - For CPU:
161
+
162
+ ```toml
163
+ [workspace]
164
+ channels = ["https://prefix.dev/conda-forge"]
165
+ name = "geo"
166
+ platforms = ["linux-64", "win-64"]
167
+
168
+ [dependencies]
169
+ python = "3.12.*"
170
+ pytorch-cpu = ">=2.9.1,<3"
171
+ qgis = ">=3.44.5"
172
+ geoai = ">=0.23.0"
173
+ segment-geospatial = ">=0.10.8"
174
+ sam3 = ">=0.1.0.20251211"
175
+ libopenblas = ">=0.3.30"
176
176
  ```
177
177
 
178
- **Step 2: Install PyTorch (CPU version)**
178
+ ---
179
179
 
180
- ```bash
181
- conda install pytorch torchvision cpuonly -c pytorch -y
182
- ```
180
+ #### 4) Install the environment
183
181
 
184
- **Step 3: Verify PyTorch installation**
182
+ From the `geo` folder:
185
183
 
186
- ```bash
187
- python -c "import torch; print(f'PyTorch: {torch.__version__}'); print('PyTorch CPU installation successful')"
184
+ ```powershell
185
+ pixi install
188
186
  ```
189
187
 
190
- **Step 4: Install QGIS and core dependencies**
191
-
192
- ```bash
193
- conda install -c conda-forge qgis -y
194
- ```
188
+ This step may take several minutes on first install depending on your internet connection and system.
195
189
 
196
- **Step 5: Install GeoAI**
190
+ ---
197
191
 
198
- ```bash
199
- conda install -c conda-forge geoai -y
200
- python -c "import geoai; print('geoai import successful')"
201
- ```
192
+ #### 5) Upgrade `segment-geospatial` via pip
202
193
 
203
- **Step 6: Install SamGeo (without SAM3)**
194
+ Install the latest `segment-geospatial` release on top of the resolved environment:
204
195
 
205
- ```bash
206
- pip install segment-geospatial
207
- python -c "import samgeo; print('samgeo import successful')"
196
+ ```powershell
197
+ pixi run pip install -U segment-geospatial
208
198
  ```
209
199
 
210
- ##### Windows Troubleshooting
200
+ ---
211
201
 
212
- **Common Issue 1: CUDA not detected after PyTorch installation**
202
+ #### 6) Verify PyTorch + CUDA
213
203
 
214
- If `torch.cuda.is_available()` returns `False`:
204
+ If you have a NVIDIA GPU with CUDA, run the following command to verify the PyTorch + CUDA installation:
215
205
 
216
- 1. Verify NVIDIA drivers are installed: Run `nvidia-smi` in command prompt
217
- 2. Ensure you installed the CUDA-enabled PyTorch (not CPU version)
218
- 3. Try reinstalling PyTorch:
219
-
220
- ```bash
221
- conda uninstall pytorch torchvision -y
222
- conda install pytorch torchvision pytorch-cuda=12.4 -c pytorch -c nvidia -y
206
+ ```powershell
207
+ pixi run python -c "import torch; print('PyTorch:', torch.__version__); print('CUDA available:', torch.cuda.is_available()); print('GPU:', (torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None'))"
223
208
  ```
224
209
 
225
- **Common Issue 2: DLL load failed or missing dependencies**
210
+ Expected output should be like this:
226
211
 
227
- If you see errors like `DLL load failed` or `ImportError`:
212
+ - `PyTorch: 2.9.1`
213
+ - `CUDA available: True`
214
+ - `GPU: NVIDIA RTX 4090`
228
215
 
229
- 1. Install Microsoft Visual C++ Redistributable:
230
- - Download and install [VC++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe)
231
- 2. Restart your computer after installation
216
+ If CUDA is `False`, check:
232
217
 
233
- **Common Issue 3: Triton installation fails**
218
+ - `nvidia-smi` works in PowerShell
219
+ - NVIDIA driver is up to date
234
220
 
235
- Triton is required for SAM3 on Windows. If `pip install triton-windows` fails:
236
-
237
- 1. Ensure you're using Python 3.12 (not 3.13+)
238
- 2. Try installing from conda-forge:
239
-
240
- ```bash
241
- pip install triton-windows --no-cache-dir
242
- ```
221
+ ---
243
222
 
244
- If Triton still doesn't work, you can skip SAM3 and use SAM1/SAM2 instead.
245
223
 
246
- **Common Issue 4: Permission errors during installation**
224
+ #### Request access to SAM 3
247
225
 
248
- Run Anaconda Prompt as Administrator, or try:
226
+ To use SAM 3, you will need to request access by filling out this form on Hugging Face at <https://huggingface.co/facebook/sam3>. Once your request has been approved, run the following command in the terminal to authenticate:
249
227
 
250
228
  ```bash
251
- pip install --user <package-name>
229
+ pixi run hf auth login
252
230
  ```
253
231
 
254
- **Common Issue 5: QGIS fails to start or shows import errors**
255
-
256
- Make sure you launch QGIS from the activated conda environment:
232
+ After authentication, you can download the SAM 3 model from Hugging Face:
257
233
 
258
234
  ```bash
259
- conda activate geo
260
- qgis
235
+ pixi run hf download facebook/sam3
261
236
  ```
262
237
 
263
- Do NOT use the QGIS shortcut from the Start Menu—it won't have access to the conda packages.
264
-
265
- **Common Issue 6: Out of memory errors**
266
-
267
- If you run out of GPU memory:
238
+ **Important Note**: SAM 3 currently requires a NVIDIA GPU with CUDA support. You won't be able to use SAM 3 if you have a CPU only system ([source](https://github.com/facebookresearch/sam3/issues/164)). You will get an error message like this: `Failed to load model: Torch not compiled with CUDA enabled`.
268
239
 
269
- 1. Use the **GPU** button in the GeoAI toolbar to clear memory
270
- 2. Close other GPU-intensive applications
271
- 3. Use smaller batch sizes in training/inference settings
272
- 4. Switch to CPU mode in the plugin settings for smaller tasks
273
-
274
- ##### Video Tutorial
275
-
276
- You can follow this [video tutorial](https://youtu.be/a-Ns9peiuu8) to install the GeoAI QGIS Plugin on Windows:
277
-
278
- [![windows](https://github.com/user-attachments/assets/8d89d535-1d66-45d2-a6c0-171416c259c9)](https://youtu.be/a-Ns9peiuu8)
279
-
280
- #### Request access to SAM 3
281
-
282
- To use SAM 3, you will need to request access by filling out this form on Hugging Face at <https://huggingface.co/facebook/sam3>. Once your request has been approved, run the following command in the terminal to authenticate:
283
-
284
- ```bash
285
- hf auth login
286
- ```
287
-
288
- ### 2) Install the QGIS plugin
240
+ ### 2. Install the QGIS plugin
289
241
 
290
242
  Option A — use QGIS Plugin Manager (recommended):
291
243
 
292
- GeoAI is available as an experimental plugin in the official [QGIS plugin repository](https://plugins.qgis.org/plugins/geoai). To install:
293
-
294
- 1. Launch QGIS: `conda run qgis`
295
- 2. Go to `Plugins` → `Manage and Install Plugins...` → `Settings` tab → check `Show also Experimental Plugins` → Click on `Reload all Repositories` button.
296
- 3. Switch to the `All` tab, search for `GeoAI`, select it, and click `Install Experimental Plugin`.
244
+ GeoAI is available as a QGIS plugin in the official [QGIS plugin repository](https://plugins.qgis.org/plugins/geoai). To install:
297
245
 
298
- ![](https://github.com/user-attachments/assets/c15c4b7e-1e8c-45de-9127-671c7c2c85a9)
246
+ 1. Launch QGIS: `pixi run qgis`
247
+ 2. Go to `Plugins` → `Manage and Install Plugins...`
248
+ 3. Switch to the `All` tab, search for `GeoAI`, select it, and click `Install Plugin`
299
249
 
300
- ![](https://github.com/user-attachments/assets/ea101a82-5df7-4947-99b8-d4a83a1598ed)
250
+ ![](https://github.com/user-attachments/assets/b31d1d13-27ff-420a-84ab-9cc82ade9a8e)
301
251
 
302
252
  Option B — use the helper script:
303
253
 
@@ -320,9 +270,9 @@ Option C — manual copy:
320
270
  - Windows: `C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\`
321
271
  - macOS: `~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/`
322
272
 
323
- ### 3) Enable in QGIS
273
+ ### 3. Enable in QGIS
324
274
 
325
- Launch QGIS: `conda run qgis`
275
+ Launch QGIS: `pixi run qgis`
326
276
 
327
277
  QGIS → `Plugins` → `Manage and Install Plugins...` → enable `GeoAI`. After updates, toggle the plugin off/on or restart QGIS to reload.
328
278
 
@@ -359,7 +309,7 @@ Sample datasets:
359
309
 
360
310
  Steps:
361
311
 
362
- 1. Download the sample datasets (links above) or prepare your own imagery/vector labels. Store them in a folder that is accessible to the conda environment.
312
+ 1. Download the sample datasets (links above) or prepare your own imagery/vector labels. Store them in a folder that is accessible to pixi project.
363
313
  2. Click the **Segmentation** button in the GeoAI toolbar (or `GeoAI` menu → `Segmentation`)
364
314
  3. Use the tabs at the top of the panel to switch between:
365
315
 
@@ -467,7 +417,6 @@ The QGIS plugin supports any models supported by [Pytorch Segmentation Models](h
467
417
  ## Troubleshooting
468
418
 
469
419
  - Plugin missing after install: confirm the plugin folder exists in your QGIS profile path and that you restarted QGIS.
470
- - GDAL/rasterio errors: verify you launched QGIS from the conda env (`conda activate geo` then `qgis`) so it picks up the same Python libs.
471
420
  - CUDA OOM: use the **GPU** button to clear cache, lower batch sizes, or switch to CPU for smaller runs.
472
421
  - Model download failures: check network/firewall, then retry loading models from the panel.
473
422