geoai-py 0.14.0__py2.py3-none-any.whl → 0.16.0__py2.py3-none-any.whl

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.
geoai/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  __author__ = """Qiusheng Wu"""
4
4
  __email__ = "giswqs@gmail.com"
5
- __version__ = "0.14.0"
5
+ __version__ = "0.16.0"
6
6
 
7
7
 
8
8
  import os
@@ -101,3 +101,23 @@ def set_proj_lib_path(verbose=False):
101
101
 
102
102
  from .dinov3 import DINOv3GeoProcessor, analyze_image_patches, create_similarity_map
103
103
  from .geoai import *
104
+
105
+ from .timm_train import (
106
+ get_timm_model,
107
+ modify_first_conv_for_channels,
108
+ TimmClassifier,
109
+ RemoteSensingDataset,
110
+ train_timm_classifier,
111
+ predict_with_timm,
112
+ list_timm_models,
113
+ )
114
+
115
+ from .timm_segment import (
116
+ TimmSegmentationModel,
117
+ SegmentationDataset,
118
+ train_timm_segmentation,
119
+ predict_segmentation,
120
+ train_timm_segmentation_model,
121
+ timm_semantic_segmentation,
122
+ push_timm_model_to_hub,
123
+ )
geoai/change_detection.py CHANGED
@@ -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",
geoai/geoai.py CHANGED
@@ -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,