geoai-py 0.15.0__tar.gz → 0.16.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 (51) hide show
  1. {geoai_py-0.15.0 → geoai_py-0.16.0}/.pre-commit-config.yaml +1 -1
  2. {geoai_py-0.15.0 → geoai_py-0.16.0}/PKG-INFO +2 -1
  3. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/__init__.py +1 -1
  4. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/change_detection.py +16 -6
  5. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/geoai.py +3 -0
  6. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/train.py +573 -31
  7. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/utils.py +752 -208
  8. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/PKG-INFO +2 -1
  9. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/requires.txt +1 -0
  10. {geoai_py-0.15.0 → geoai_py-0.16.0}/mkdocs.yml +1 -0
  11. {geoai_py-0.15.0 → geoai_py-0.16.0}/pyproject.toml +4 -4
  12. {geoai_py-0.15.0 → geoai_py-0.16.0}/requirements_docs.txt +1 -1
  13. {geoai_py-0.15.0 → geoai_py-0.16.0}/.dockerignore +0 -0
  14. {geoai_py-0.15.0 → geoai_py-0.16.0}/.editorconfig +0 -0
  15. {geoai_py-0.15.0 → geoai_py-0.16.0}/.gitignore +0 -0
  16. {geoai_py-0.15.0 → geoai_py-0.16.0}/CITATION.cff +0 -0
  17. {geoai_py-0.15.0 → geoai_py-0.16.0}/Dockerfile +0 -0
  18. {geoai_py-0.15.0 → geoai_py-0.16.0}/LICENSE +0 -0
  19. {geoai_py-0.15.0 → geoai_py-0.16.0}/MANIFEST.in +0 -0
  20. {geoai_py-0.15.0 → geoai_py-0.16.0}/README.md +0 -0
  21. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/agents/__init__.py +0 -0
  22. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/agents/geo_agents.py +0 -0
  23. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/agents/map_tools.py +0 -0
  24. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/classify.py +0 -0
  25. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/detectron2.py +0 -0
  26. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/dinov3.py +0 -0
  27. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/download.py +0 -0
  28. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/extract.py +0 -0
  29. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/hf.py +0 -0
  30. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/map_widgets.py +0 -0
  31. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/sam.py +0 -0
  32. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/segment.py +0 -0
  33. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/segmentation.py +0 -0
  34. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/timm_segment.py +0 -0
  35. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai/timm_train.py +0 -0
  36. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/SOURCES.txt +0 -0
  37. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/dependency_links.txt +0 -0
  38. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/entry_points.txt +0 -0
  39. {geoai_py-0.15.0 → geoai_py-0.16.0}/geoai_py.egg-info/top_level.txt +0 -0
  40. {geoai_py-0.15.0 → geoai_py-0.16.0}/pytest.ini +0 -0
  41. {geoai_py-0.15.0 → geoai_py-0.16.0}/requirements.txt +0 -0
  42. {geoai_py-0.15.0 → geoai_py-0.16.0}/setup.cfg +0 -0
  43. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/__init__.py +0 -0
  44. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/create_test_data.py +0 -0
  45. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_classify.py +0 -0
  46. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_download.py +0 -0
  47. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_extract.py +0 -0
  48. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_fixtures.py +0 -0
  49. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_geoai.py +0 -0
  50. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_segment.py +0 -0
  51. {geoai_py-0.15.0 → geoai_py-0.16.0}/tests/test_utils.py +0 -0
@@ -11,7 +11,7 @@ repos:
11
11
  - id: check-added-large-files
12
12
  args: ["--maxkb=500"]
13
13
 
14
- - repo: https://github.com/psf/black
14
+ - repo: https://github.com/psf/black-pre-commit-mirror
15
15
  rev: 25.9.0
16
16
  hooks:
17
17
  - id: black-jupyter
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoai-py
3
- Version: 0.15.0
3
+ Version: 0.16.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
@@ -47,6 +47,7 @@ Requires-Dist: transformers
47
47
  Provides-Extra: extra
48
48
  Requires-Dist: overturemaps; extra == "extra"
49
49
  Requires-Dist: torchange; extra == "extra"
50
+ Requires-Dist: lightly-train; extra == "extra"
50
51
  Provides-Extra: agents
51
52
  Requires-Dist: strands-agents; extra == "agents"
52
53
  Requires-Dist: strands-agents-tools; extra == "agents"
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = """Qiusheng Wu"""
4
4
  __email__ = "giswqs@gmail.com"
5
- __version__ = "0.15.0"
5
+ __version__ = "0.16.0"
6
6
 
7
7
 
8
8
  import os
@@ -561,7 +561,15 @@ class ChangeDetection:
561
561
 
562
562
  return fig
563
563
 
564
- def visualize_results(self, image1_path, image2_path, binary_path, prob_path):
564
+ def visualize_results(
565
+ self,
566
+ image1_path,
567
+ image2_path,
568
+ binary_path,
569
+ prob_path,
570
+ title1="Earlier Image",
571
+ title2="Later Image",
572
+ ):
565
573
  """Create enhanced visualization with probability analysis."""
566
574
 
567
575
  # Load data
@@ -594,11 +602,11 @@ class ChangeDetection:
594
602
 
595
603
  # Row 1: Original and overlays
596
604
  axes[0, 0].imshow(img1_crop)
597
- axes[0, 0].set_title("2019 Image", fontweight="bold")
605
+ axes[0, 0].set_title(title1, fontweight="bold")
598
606
  axes[0, 0].axis("off")
599
607
 
600
608
  axes[0, 1].imshow(img2_crop)
601
- axes[0, 1].set_title("2022 Image", fontweight="bold")
609
+ axes[0, 1].set_title(title2, fontweight="bold")
602
610
  axes[0, 1].axis("off")
603
611
 
604
612
  # Binary overlay
@@ -708,6 +716,8 @@ class ChangeDetection:
708
716
  image2_path,
709
717
  binary_path,
710
718
  prob_path,
719
+ title1="Earlier Image",
720
+ title2="Later Image",
711
721
  output_path="split_comparison.png",
712
722
  ):
713
723
  """Create a split comparison visualization showing before/after with change overlay."""
@@ -742,7 +752,7 @@ class ChangeDetection:
742
752
  # Create split comparison
743
753
  fig, ax = plt.subplots(1, 1, figsize=(15, 10))
744
754
 
745
- # Create combined image - left half is 2019, right half is 2022
755
+ # Create combined image - left half is earlier, right half is later
746
756
  combined_img = np.zeros_like(img1)
747
757
  combined_img[:, : w // 2] = img1[:, : w // 2]
748
758
  combined_img[:, w // 2 :] = img2[:, w // 2 :]
@@ -763,7 +773,7 @@ class ChangeDetection:
763
773
  ax.text(
764
774
  w // 4,
765
775
  50,
766
- "2019",
776
+ title1,
767
777
  fontsize=20,
768
778
  color="white",
769
779
  ha="center",
@@ -772,7 +782,7 @@ class ChangeDetection:
772
782
  ax.text(
773
783
  3 * w // 4,
774
784
  50,
775
- "2022",
785
+ title2,
776
786
  fontsize=20,
777
787
  color="white",
778
788
  ha="center",
@@ -32,6 +32,9 @@ from .train import (
32
32
  instance_segmentation,
33
33
  instance_segmentation_batch,
34
34
  instance_segmentation_inference_on_geotiff,
35
+ lightly_embed_images,
36
+ lightly_train_model,
37
+ load_lightly_pretrained_model,
35
38
  object_detection,
36
39
  object_detection_batch,
37
40
  semantic_segmentation,