geoai-py 0.27.0__tar.gz → 0.28.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 (90) hide show
  1. {geoai_py-0.27.0 → geoai_py-0.28.0}/.gitignore +1 -0
  2. {geoai_py-0.27.0 → geoai_py-0.28.0}/PKG-INFO +6 -4
  3. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/__init__.py +15 -1
  4. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/extract.py +6 -6
  5. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/hf.py +3 -3
  6. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/moondream.py +2 -2
  7. geoai_py-0.28.0/geoai/onnx.py +1155 -0
  8. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/prithvi.py +1 -1
  9. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/train.py +1 -1
  10. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/utils.py +547 -0
  11. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/PKG-INFO +6 -4
  12. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/SOURCES.txt +3 -0
  13. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/requires.txt +7 -3
  14. {geoai_py-0.27.0 → geoai_py-0.28.0}/mkdocs.yml +4 -0
  15. {geoai_py-0.27.0 → geoai_py-0.28.0}/pyproject.toml +4 -2
  16. geoai_py-0.28.0/qgis_plugin/geoai_plugin/dialogs/deepforest_panel.py +1737 -0
  17. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/geoai_plugin.py +119 -0
  18. geoai_py-0.28.0/qgis_plugin/geoai_plugin/icons/deepforest.svg +8 -0
  19. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/metadata.txt +4 -1
  20. {geoai_py-0.27.0 → geoai_py-0.28.0}/requirements.txt +0 -3
  21. {geoai_py-0.27.0 → geoai_py-0.28.0}/.dockerignore +0 -0
  22. {geoai_py-0.27.0 → geoai_py-0.28.0}/.editorconfig +0 -0
  23. {geoai_py-0.27.0 → geoai_py-0.28.0}/.pre-commit-config.yaml +0 -0
  24. {geoai_py-0.27.0 → geoai_py-0.28.0}/CITATION.cff +0 -0
  25. {geoai_py-0.27.0 → geoai_py-0.28.0}/Dockerfile +0 -0
  26. {geoai_py-0.27.0 → geoai_py-0.28.0}/LICENSE +0 -0
  27. {geoai_py-0.27.0 → geoai_py-0.28.0}/MANIFEST.in +0 -0
  28. {geoai_py-0.27.0 → geoai_py-0.28.0}/README.md +0 -0
  29. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/__init__.py +0 -0
  30. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/catalog_models.py +0 -0
  31. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/catalog_tools.py +0 -0
  32. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/geo_agents.py +0 -0
  33. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/map_tools.py +0 -0
  34. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/stac_models.py +0 -0
  35. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/agents/stac_tools.py +0 -0
  36. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/auto.py +0 -0
  37. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/change_detection.py +0 -0
  38. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/classify.py +0 -0
  39. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/detectron2.py +0 -0
  40. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/dinov3.py +0 -0
  41. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/download.py +0 -0
  42. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/geoai.py +0 -0
  43. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/landcover_train.py +0 -0
  44. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/landcover_utils.py +0 -0
  45. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/map_widgets.py +0 -0
  46. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/sam.py +0 -0
  47. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/segment.py +0 -0
  48. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/segmentation.py +0 -0
  49. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/timm_regress.py +0 -0
  50. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/timm_segment.py +0 -0
  51. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/timm_train.py +0 -0
  52. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/tools/__init__.py +0 -0
  53. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/tools/cloudmask.py +0 -0
  54. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/tools/multiclean.py +0 -0
  55. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai/tools/sr.py +0 -0
  56. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/dependency_links.txt +0 -0
  57. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/entry_points.txt +0 -0
  58. {geoai_py-0.27.0 → geoai_py-0.28.0}/geoai_py.egg-info/top_level.txt +0 -0
  59. {geoai_py-0.27.0 → geoai_py-0.28.0}/pytest.ini +0 -0
  60. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/README.md +0 -0
  61. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/LICENSE +0 -0
  62. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/__init__.py +0 -0
  63. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/_geoai_lib.py +0 -0
  64. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/__init__.py +0 -0
  65. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/map_tools.py +0 -0
  66. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/moondream.py +0 -0
  67. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/samgeo.py +0 -0
  68. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/segmentation.py +0 -0
  69. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/dialogs/update_checker.py +0 -0
  70. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/about.svg +0 -0
  71. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/gpu.svg +0 -0
  72. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/icon.png +0 -0
  73. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/moondream.svg +0 -0
  74. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/samgeo.png +0 -0
  75. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/geoai_plugin/icons/segment.svg +0 -0
  76. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/install.py +0 -0
  77. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/install.sh +0 -0
  78. {geoai_py-0.27.0 → geoai_py-0.28.0}/qgis_plugin/package_plugin.py +0 -0
  79. {geoai_py-0.27.0 → geoai_py-0.28.0}/requirements_docs.txt +0 -0
  80. {geoai_py-0.27.0 → geoai_py-0.28.0}/setup.cfg +0 -0
  81. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/__init__.py +0 -0
  82. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/create_test_data.py +0 -0
  83. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_classify.py +0 -0
  84. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_download.py +0 -0
  85. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_extract.py +0 -0
  86. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_fixtures.py +0 -0
  87. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_geoai.py +0 -0
  88. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_moondream.py +0 -0
  89. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_segment.py +0 -0
  90. {geoai_py-0.27.0 → geoai_py-0.28.0}/tests/test_utils.py +0 -0
@@ -138,3 +138,4 @@ ENV/
138
138
  .vscode/
139
139
  .DS_Store
140
140
  CLAUDE.md
141
+ lightning_logs/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoai-py
3
- Version: 0.27.0
3
+ Version: 0.28.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
@@ -17,10 +17,8 @@ Requires-Python: >=3.10
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: albumentations
20
- Requires-Dist: buildingregulariser
21
20
  Requires-Dist: contextily
22
21
  Requires-Dist: datasets>=3.0
23
- Requires-Dist: ever-beta
24
22
  Requires-Dist: geopandas
25
23
  Requires-Dist: huggingface_hub
26
24
  Requires-Dist: jupyter-server-proxy
@@ -31,7 +29,6 @@ Requires-Dist: maplibre
31
29
  Requires-Dist: opencv-python-headless
32
30
  Requires-Dist: overturemaps
33
31
  Requires-Dist: planetary-computer
34
- Requires-Dist: psutil
35
32
  Requires-Dist: pyarrow
36
33
  Requires-Dist: pystac-client
37
34
  Requires-Dist: rasterio
@@ -53,12 +50,17 @@ Requires-Dist: lightly-train; extra == "extra"
53
50
  Requires-Dist: multiclean; extra == "extra"
54
51
  Requires-Dist: omnicloudmask; extra == "extra"
55
52
  Requires-Dist: smoothify; extra == "extra"
53
+ Provides-Extra: building
54
+ Requires-Dist: buildingregulariser; extra == "building"
56
55
  Provides-Extra: agents
57
56
  Requires-Dist: strands-agents; extra == "agents"
58
57
  Requires-Dist: strands-agents-tools; extra == "agents"
59
58
  Requires-Dist: strands-agents[ollama]; extra == "agents"
60
59
  Requires-Dist: strands-agents[anthropic]; extra == "agents"
61
60
  Requires-Dist: strands-agents[openai]; extra == "agents"
61
+ Provides-Extra: onnx
62
+ Requires-Dist: onnx; extra == "onnx"
63
+ Requires-Dist: onnxruntime; extra == "onnx"
62
64
  Provides-Extra: sr
63
65
  Requires-Dist: opensr-model; extra == "sr"
64
66
  Dynamic: license-file
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = """Qiusheng Wu"""
4
4
  __email__ = "giswqs@gmail.com"
5
- __version__ = "0.27.0"
5
+ __version__ = "0.28.0"
6
6
 
7
7
 
8
8
  import os
@@ -106,6 +106,8 @@ from .utils import (
106
106
  regularization,
107
107
  hybrid_regularization,
108
108
  adaptive_regularization,
109
+ flipnslide_augmentation,
110
+ export_flipnslide_tiles,
109
111
  )
110
112
 
111
113
  from .timm_train import (
@@ -170,6 +172,18 @@ except ImportError:
170
172
  # super_resolution not available (missing dependency)
171
173
  pass
172
174
 
175
+ # ONNX Runtime support
176
+ try:
177
+ from .onnx import (
178
+ ONNXGeoModel,
179
+ export_to_onnx,
180
+ onnx_semantic_segmentation,
181
+ onnx_image_classification,
182
+ )
183
+ except ImportError:
184
+ # ONNX not available (missing dependency)
185
+ pass
186
+
173
187
  # Moondream Vision Language Model
174
188
  try:
175
189
  from .moondream import (
@@ -1717,21 +1717,21 @@ class ObjectDetector:
1717
1717
  confidence = None
1718
1718
  try:
1719
1719
  confidence = row.confidence
1720
- except:
1720
+ except Exception:
1721
1721
  pass
1722
1722
 
1723
1723
  # Method 2: Try dictionary-style access
1724
1724
  if confidence is None:
1725
1725
  try:
1726
1726
  confidence = row["confidence"]
1727
- except:
1727
+ except Exception:
1728
1728
  pass
1729
1729
 
1730
1730
  # Method 3: Try accessing by index from the GeoDataFrame
1731
1731
  if confidence is None:
1732
1732
  try:
1733
1733
  confidence = gdf.iloc[idx]["confidence"]
1734
- except:
1734
+ except Exception:
1735
1735
  pass
1736
1736
 
1737
1737
  if confidence is not None:
@@ -1879,19 +1879,19 @@ class ObjectDetector:
1879
1879
  confidence = None
1880
1880
  try:
1881
1881
  confidence = row.confidence
1882
- except:
1882
+ except Exception:
1883
1883
  pass
1884
1884
 
1885
1885
  if confidence is None:
1886
1886
  try:
1887
1887
  confidence = row["confidence"]
1888
- except:
1888
+ except Exception:
1889
1889
  pass
1890
1890
 
1891
1891
  if confidence is None:
1892
1892
  try:
1893
1893
  confidence = visible_gdf.iloc[idx]["confidence"]
1894
- except:
1894
+ except Exception:
1895
1895
  pass
1896
1896
 
1897
1897
  if confidence is not None:
@@ -343,7 +343,7 @@ def mask_generation(
343
343
  # Try to convert from tensor or other format if needed
344
344
  try:
345
345
  mask_data = np.array(mask_data)
346
- except:
346
+ except Exception:
347
347
  print(f"Could not convert mask at index {i} to numpy array")
348
348
  continue
349
349
 
@@ -395,7 +395,7 @@ def mask_generation(
395
395
  try:
396
396
  mask_data = np.array(mask_result)
397
397
  score = 1.0 # Default score
398
- except:
398
+ except Exception:
399
399
  print(f"Could not process mask at index {i}")
400
400
  continue
401
401
 
@@ -404,7 +404,7 @@ def mask_generation(
404
404
  if not isinstance(mask_data, np.ndarray):
405
405
  try:
406
406
  mask_data = np.array(mask_data)
407
- except:
407
+ except Exception:
408
408
  print(f"Could not convert mask at index {i} to numpy array")
409
409
  continue
410
410
 
@@ -1305,7 +1305,7 @@ class MoondreamGeo:
1305
1305
  try:
1306
1306
  summary_result = self.model.query(question=summary_prompt)
1307
1307
  combined_answer = summary_result.get("answer", "")
1308
- except:
1308
+ except Exception:
1309
1309
  # Fall back to concatenation if summarization fails
1310
1310
  combined_answer = " ".join([ta["answer"] for ta in tile_answers])
1311
1311
  else:
@@ -1411,7 +1411,7 @@ class MoondreamGeo:
1411
1411
  try:
1412
1412
  summary_result = self.model.query(question=summary_prompt)
1413
1413
  combined_caption = summary_result.get("answer", "")
1414
- except:
1414
+ except Exception:
1415
1415
  # Fall back to concatenation if summarization fails
1416
1416
  combined_caption = " ".join([tc["caption"] for tc in tile_captions])
1417
1417
  else: