segment-geospatial 1.3.1__tar.gz → 1.3.2__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.
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/PKG-INFO +1 -1
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/pyproject.toml +2 -2
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/__init__.py +1 -1
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/samgeo3.py +81 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/PKG-INFO +1 -1
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.editorconfig +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/FUNDING.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/dependabot.yaml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/docker-image.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/docker-publish.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/docs-build.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/docs.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/draft-pdf.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/macos.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/pypi.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/ubuntu.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/workflows/windows.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.gitignore +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.pre-commit-config.yaml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/CITATION.cff +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/CODE_OF_CONDUCT.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/Dockerfile +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/LICENSE +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/MANIFEST.in +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/README.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/CNAME +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/api.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/assets/README.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/assets/favicon.png +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/assets/logo.png +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/assets/logo_rect.png +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/caption.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/changelog.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/changelog_update.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/common.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/contributing.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/detectree2.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/arcgis.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/automatic_mask_generator.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/automatic_mask_generator_hq.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/box_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/data/tree_boxes.geojson +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/detectree2.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/fast_sam.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/image_captioning.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/input_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/input_prompts_hq.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/maxar_open_data.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_automatic.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_box_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_point_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_predictor.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_text_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_video.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_automated_segmentation.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_batch_segmentation.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_box_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_image_segmentation.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_image_segmentation_jpg.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_interactive.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_object_tracking.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_point_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_point_prompts_batch.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_tiled_segmentation.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_video_masks.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_video_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_video_segmentation.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/satellite-predictor.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/satellite.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/text_prompts.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/text_prompts_batch.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/text_swimming_pools.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/tree_mapping.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/faq.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/fast_sam.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/hq_sam.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/index.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/installation.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/overrides/main.html +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/samgeo.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/samgeo2.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/samgeo3.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/text_sam.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/usage.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/workshops/AIforGood_2025.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/workshops/IPPN_2024.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/workshops/cn_workshop.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/workshops/jupytext.toml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/workshops/purdue.ipynb +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/mkdocs.yml +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/paper/10.21105.joss.05663.pdf +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/paper/paper.bib +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/paper/paper.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/LICENSE +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/README.md +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/__init__.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/icons/icon.png +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/install_plugin.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/install_plugin.sh +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/map_tools.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/metadata.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/resources.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/samgeo_plugin.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/qgis-samgeo-plugin/test_plugin.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/requirements.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/requirements_dev.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/requirements_docs.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/api.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/caption.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/common.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/detectree2.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/fast_sam.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/fer.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/hq_sam.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/samgeo.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/samgeo2.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/text_sam.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/samgeo/utmconv.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/SOURCES.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/dependency_links.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/entry_points.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/requires.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/top_level.txt +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/setup.cfg +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/tests/__init__.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/tests/test_api.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/tests/test_common.py +0 -0
- {segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/tests/test_samgeo.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "segment-geospatial"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.2"
|
|
8
8
|
dynamic = [
|
|
9
9
|
"dependencies",
|
|
10
10
|
]
|
|
@@ -117,7 +117,7 @@ dependencies = {file = ["requirements.txt"]}
|
|
|
117
117
|
universal = true
|
|
118
118
|
|
|
119
119
|
[tool.bumpversion]
|
|
120
|
-
current_version = "1.3.
|
|
120
|
+
current_version = "1.3.2"
|
|
121
121
|
commit = true
|
|
122
122
|
tag = true
|
|
123
123
|
|
|
@@ -344,6 +344,10 @@ class SamGeo3:
|
|
|
344
344
|
"Input image must be either a path, numpy array, or PIL Image."
|
|
345
345
|
)
|
|
346
346
|
|
|
347
|
+
# Ensure the image is C-contiguous for OpenCV compatibility
|
|
348
|
+
if not self.image.flags["C_CONTIGUOUS"]:
|
|
349
|
+
self.image = np.ascontiguousarray(self.image)
|
|
350
|
+
|
|
347
351
|
self.image_height, self.image_width = self.image.shape[:2]
|
|
348
352
|
|
|
349
353
|
# Reset batch processing attributes so that subsequent calls to
|
|
@@ -2674,6 +2678,12 @@ class SamGeo3:
|
|
|
2674
2678
|
blend: bool = True,
|
|
2675
2679
|
alpha: float = 0.5,
|
|
2676
2680
|
font_scale: float = 0.8,
|
|
2681
|
+
show_points: bool = False,
|
|
2682
|
+
point_coords: Optional[List[List[float]]] = None,
|
|
2683
|
+
point_labels: Optional[List[int]] = None,
|
|
2684
|
+
foreground_color: Tuple[int, int, int] = (0, 128, 0),
|
|
2685
|
+
background_color: Tuple[int, int, int] = (255, 0, 0),
|
|
2686
|
+
point_size: int = 15,
|
|
2677
2687
|
**kwargs: Any,
|
|
2678
2688
|
) -> None:
|
|
2679
2689
|
"""Show the annotations (objects with random color) on the input image.
|
|
@@ -2692,6 +2702,20 @@ class SamGeo3:
|
|
|
2692
2702
|
only annotations will be shown on a white background.
|
|
2693
2703
|
alpha (float): The alpha value for the annotations.
|
|
2694
2704
|
font_scale (float): The font scale for labels. Defaults to 0.8.
|
|
2705
|
+
show_points (bool): Whether to show point prompts on the image.
|
|
2706
|
+
If True, uses stored point_coords/point_labels from predict_inst()
|
|
2707
|
+
or the explicitly provided ones. Defaults to False.
|
|
2708
|
+
point_coords (List[List[float]], optional): Point coordinates to
|
|
2709
|
+
display. If None and show_points is True, uses the stored
|
|
2710
|
+
point_coords from the last predict_inst() or show_canvas() call.
|
|
2711
|
+
point_labels (List[int], optional): Labels for the points (1 for
|
|
2712
|
+
foreground, 0 for background). If None and show_points is True,
|
|
2713
|
+
uses the stored point_labels.
|
|
2714
|
+
foreground_color (Tuple[int, int, int]): RGB color for foreground
|
|
2715
|
+
points (label=1). Defaults to dark green (0, 128, 0).
|
|
2716
|
+
background_color (Tuple[int, int, int]): RGB color for background
|
|
2717
|
+
points (label=0). Defaults to red (255, 0, 0).
|
|
2718
|
+
point_size (int): Size of star markers in pixels. Defaults to 15.
|
|
2695
2719
|
**kwargs: Additional keyword arguments (kept for backward compatibility).
|
|
2696
2720
|
"""
|
|
2697
2721
|
|
|
@@ -2711,6 +2735,45 @@ class SamGeo3:
|
|
|
2711
2735
|
font_scale=font_scale,
|
|
2712
2736
|
)
|
|
2713
2737
|
|
|
2738
|
+
# Overlay point prompts if requested
|
|
2739
|
+
if show_points:
|
|
2740
|
+
coords = point_coords
|
|
2741
|
+
labels = point_labels
|
|
2742
|
+
if coords is None and hasattr(self, "point_coords"):
|
|
2743
|
+
coords = self.point_coords
|
|
2744
|
+
if labels is None and hasattr(self, "point_labels"):
|
|
2745
|
+
labels = self.point_labels
|
|
2746
|
+
|
|
2747
|
+
if coords is not None:
|
|
2748
|
+
coords_arr = np.array(coords)
|
|
2749
|
+
if labels is None:
|
|
2750
|
+
labels = [1] * len(coords_arr)
|
|
2751
|
+
labels_arr = np.array(labels)
|
|
2752
|
+
|
|
2753
|
+
for pt, lbl in zip(coords_arr, labels_arr):
|
|
2754
|
+
x, y = int(pt[0]), int(pt[1])
|
|
2755
|
+
color = foreground_color if lbl == 1 else background_color
|
|
2756
|
+
|
|
2757
|
+
# Build a 5-pointed star polygon
|
|
2758
|
+
def _star_pts(cx, cy, r_outer, r_inner, n=5):
|
|
2759
|
+
pts = []
|
|
2760
|
+
for i in range(2 * n):
|
|
2761
|
+
r = r_outer if i % 2 == 0 else r_inner
|
|
2762
|
+
angle = np.pi / 2 + i * np.pi / n
|
|
2763
|
+
pts.append(
|
|
2764
|
+
[
|
|
2765
|
+
int(cx + r * np.cos(angle)),
|
|
2766
|
+
int(cy - r * np.sin(angle)),
|
|
2767
|
+
]
|
|
2768
|
+
)
|
|
2769
|
+
return np.array(pts, dtype=np.int32)
|
|
2770
|
+
|
|
2771
|
+
star_pts = _star_pts(x, y, point_size, point_size * 0.4)
|
|
2772
|
+
# Filled color star
|
|
2773
|
+
cv2.fillPoly(blended, [star_pts], color)
|
|
2774
|
+
# White edge outline
|
|
2775
|
+
cv2.polylines(blended, [star_pts], True, (255, 255, 255), 2)
|
|
2776
|
+
|
|
2714
2777
|
if output is not None:
|
|
2715
2778
|
# Save directly using OpenCV
|
|
2716
2779
|
cv2.imwrite(output, cv2.cvtColor(blended, cv2.COLOR_RGB2BGR))
|
|
@@ -2821,6 +2884,7 @@ class SamGeo3:
|
|
|
2821
2884
|
mask_3d = mask_combined[:, :, np.newaxis]
|
|
2822
2885
|
blended = frame_np * (1 - mask_3d * alpha) + overlay * (mask_3d * alpha)
|
|
2823
2886
|
blended = np.clip(blended, 0, 255).astype(np.uint8)
|
|
2887
|
+
blended = blended.copy()
|
|
2824
2888
|
|
|
2825
2889
|
# Draw bounding boxes and labels using OpenCV
|
|
2826
2890
|
for box, text, color in labels_to_draw:
|
|
@@ -3222,6 +3286,22 @@ class SamGeo3:
|
|
|
3222
3286
|
self.scores = list(scores) if isinstance(scores, np.ndarray) else [scores]
|
|
3223
3287
|
self.logits = logits
|
|
3224
3288
|
|
|
3289
|
+
# Store point prompts for visualization
|
|
3290
|
+
if point_coords is not None:
|
|
3291
|
+
self.point_coords = (
|
|
3292
|
+
point_coords.tolist()
|
|
3293
|
+
if isinstance(point_coords, np.ndarray)
|
|
3294
|
+
else point_coords
|
|
3295
|
+
)
|
|
3296
|
+
self.point_labels = (
|
|
3297
|
+
point_labels.tolist()
|
|
3298
|
+
if isinstance(point_labels, np.ndarray)
|
|
3299
|
+
else point_labels
|
|
3300
|
+
)
|
|
3301
|
+
else:
|
|
3302
|
+
self.point_coords = None
|
|
3303
|
+
self.point_labels = None
|
|
3304
|
+
|
|
3225
3305
|
return masks, scores, logits
|
|
3226
3306
|
|
|
3227
3307
|
def predict_inst_batch(
|
|
@@ -4950,6 +5030,7 @@ class SamGeo3Video:
|
|
|
4950
5030
|
mask_3d = mask_combined[:, :, np.newaxis]
|
|
4951
5031
|
blended = frame_np * (1 - mask_3d * alpha) + overlay * (mask_3d * alpha)
|
|
4952
5032
|
blended = np.clip(blended, 0, 255).astype(np.uint8)
|
|
5033
|
+
blended = np.ascontiguousarray(blended)
|
|
4953
5034
|
|
|
4954
5035
|
# Draw labels using OpenCV
|
|
4955
5036
|
for cx, cy, label, color in labels_to_draw:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/.github/ISSUE_TEMPLATE/feature_request.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/automatic_mask_generator.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam2_point_prompts.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_batch_segmentation.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_image_segmentation.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_object_tracking.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_point_prompts.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_point_prompts_batch.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_tiled_segmentation.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_video_prompts.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/sam3_video_segmentation.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/satellite-predictor.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/text_prompts_batch.ipynb
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/docs/examples/text_swimming_pools.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/requires.txt
RENAMED
|
File without changes
|
{segment_geospatial-1.3.1 → segment_geospatial-1.3.2}/segment_geospatial.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|