Skip to content

Conversation

@giswqs
Copy link
Member

@giswqs giswqs commented Nov 26, 2025

Fix #426

buildings

Copilot AI review requested due to automatic review settings November 26, 2025 16:10
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

@github-actions github-actions bot temporarily deployed to pull request November 26, 2025 16:14 Inactive
Copilot finished reviewing on behalf of giswqs November 26, 2025 16:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for Segment Anything Model 3 (SAM3) to the segment-geospatial package by introducing a new SamGeo3 class and related utilities. The implementation follows a similar pattern to the existing SAM2 support but adapts it for SAM3's architecture and API.

Key Changes:

  • Introduces SamGeo3 class with text-based prompt segmentation capabilities
  • Adds device selection utility (get_device()) to support CUDA, MPS, and CPU
  • Includes visualization utilities with perceptually uniform color generation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 17 comments.

File Description
samgeo/samgeo3.py New module implementing SAM3 integration with methods for image segmentation, mask generation, and visualization
samgeo/common.py Adds get_device() helper function for automatic device selection across different hardware
samgeo/init.py Exports the new samgeo3 module to make SamGeo3 class available
pyproject.toml Adds samgeo3 optional dependency group with sam3 package requirement
Comments suppressed due to low confidence (1)

samgeo/samgeo3.py:6

  • Import of 'sys' is not used.
import sys

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 04:10 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 04:20 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 04:25 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 04:30 Inactive
giswqs and others added 6 commits November 26, 2025 23:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 04:41 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 05:18 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 16:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 27, 2025 21:58 Inactive
@giswqs
Copy link
Member Author

giswqs commented Nov 27, 2025

show_masks()
image

@giswqs
Copy link
Member Author

giswqs commented Nov 28, 2025

generate_masks_by_boxes

image image

@github-actions github-actions bot temporarily deployed to pull request November 28, 2025 03:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 28, 2025 05:10 Inactive
@giswqs giswqs added the Feature request New feature or request label Nov 28, 2025
@giswqs giswqs self-assigned this Nov 28, 2025
@github-actions github-actions bot temporarily deployed to pull request November 29, 2025 19:46 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 29, 2025 21:46 Inactive
@giswqs giswqs merged commit 658bb6f into main Nov 29, 2025
10 checks passed
@giswqs giswqs deleted the sam3 branch November 29, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SAM3

2 participants