geoai-py 0.15.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 +1 -1
- geoai/change_detection.py +16 -6
- geoai/geoai.py +3 -0
- geoai/train.py +573 -31
- geoai/utils.py +752 -208
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/METADATA +2 -1
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/RECORD +11 -11
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/WHEEL +0 -0
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/entry_points.txt +0 -0
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/licenses/LICENSE +0 -0
- {geoai_py-0.15.0.dist-info → geoai_py-0.16.0.dist-info}/top_level.txt +0 -0
geoai/__init__.py
CHANGED
geoai/change_detection.py
CHANGED
@@ -561,7 +561,15 @@ class ChangeDetection:
|
|
561
561
|
|
562
562
|
return fig
|
563
563
|
|
564
|
-
def visualize_results(
|
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(
|
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(
|
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
|
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
|
-
|
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
|
-
|
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,
|