The geosam R package brings Meta's Segment Anything Model 3 (SAM3) to R for detecting objects in satellite imagery and photos. Describe what you're looking for in plain text—no training data or model fine-tuning required. The package is inspired by the Python package segment-geospatial by Qiusheng Wu, and aims to bring similar functionality to R users.
Install from R-Universe:
install.packages("geosam", repos = c("https://walkerke.r-universe.dev", "https://cloud.r-project.org"))
Then set up the Python environment:
library(geosam)
geosam_install()
You'll need a HuggingFace account with access to the gated SAM3 model. Run geosam_status() after installation to verify that your token can access the model metadata before downloading weights.
Read through these vignettes to learn how to use the package:
If you find this project useful in your work and would like to ensure continued development of the package, you can provide support in the following ways:
To stay on top of package updates / new features and to get information about trainings, be sure to sign up for the Walker Data mailing list here.