Meta's Segment Anything Model (SAM) for segmenting objects in any imagery. A brief summary of the item is not available. Add a brief summary about the item.
Deep learning package
by
Item created: Apr 17, 2023 Item updated: Jan 9, 2025 Number of downloads: 214,383
Description
Segmentation models perform a pixel-wise classification by classifying the pixels into different classes. The classified pixels correspond to different objects or regions in the image. These models have a wide variety of use cases across multiple domains. When used with satellite and aerial imagery, these models can help to identify features such as building footprints, roads, water bodies, crop fields, etc.
Generally, every segmentation model needs to be trained from scratch using a dataset labeled with the objects of interest. This can be an arduous and time-consuming task. Meta's Segment Anything Model (SAM) is aimed at creating a foundational model that can be used to segment (as the name suggests) anything using zero-shot learning and generalize across domains without additional training.
SAM is trained on the Segment Anything 1-Billion mask dataset (SA-1B) which comprises a diverse set of 11 million images and over 1 billion masks. This makes the model highly robust in identifying object boundaries and differentiating between various objects across domains, even though it might have never seen them before. Use this model to extract masks of various objects in any image.
Using the model
Fine-tuning the model
This model can be fine-tuned using SamLoRA architecture in ArcGIS. Follow the guide and refer to this sample notebook to fine-tune this model.
Input
8-bit, 3-band imagery.
Output
Feature class containing masks of various objects in the image.
Applicable geographies
The model is expected to work globally.
Model architecture
This model is based on the open-source Segment Anything Model (SAM) by Meta.
Training data
This model has been trained on the Segment Anything 1-Billion mask dataset (SA-1B) which comprises a diverse set of 11 million images and over 1 billion masks.
Sample results
Here are a few results from the model.
An in-depth description of the item is not available.
Layers
Tools
Tables
Basemap
Project Contents:
Solution Contents
Contents
Layers
Screenshots
Terms of Use
No special restrictions or limitations on using the item's content have been provided.
Details
Dashboard views: Desktop
Source:
Creating data in:
Published as:
Other Views:
Dependent items in the recycle bin
Applicable: 2d
Size: 2,465.04 MB
ID: 9b67b441f29f4ce6810979f5f0667ebe
Image Count: 0
Image Properties
Layer Drawing
Using tiles from a cache
Dynamically from data
Share
Owner
Folder
Categories
This item has not been categorized.
Credits (Attribution)
No acknowledgements.Esri, Meta
Comments (25)
I'm unable to use this DL package with ArcGIS Pro version 3.4. I see that you just updated the package on 8-Jan-2025, but I have compared the package with one I downloaded in June 2024, and find that both have exactly the same file size (2,524,201 KB), which suggests that the file uploaded on 8 Jan. 2025 is actually the same file as the earlier version. The June 2024 version gives me the same error, which is Error 003569: Invalid deep learning model type. If I test other models like the Landsat-8 based land cover classification model (LandCoverClassification.dlpk), I do not get the error. I have also downloaded the SAM.dlpk on a separate machine that I have an Image Analyst license on, and I get the same error.
Thank you for your message. I recently tested the SAM pretrained model under the "Detect Objects Using Deep Learning" tool in ArcGIS Pro 3.4 with the Deep Learning Libraries installer, and the model generated results correctly. It seems there might be an issue specific to your setup. Could you please share the full error trace so we can further investigate the issue?
This is great! I saw the post this model can extract feature crop field or padding from raster. However, I try for extracted crop field from raster that input required 3 bands and 8 bit, the result is not good as expected. Is there anyone share the input could be possible to using this model or how the methodology for extract the crop field.
@pattaraphon.s What is your input cell size? Please reach out to me at ptuteja@esri.com if you need any assistance.
Hi running on an nvidia A10G - 32GB video card, with 32GB ram. On a small image - 15mb it doesnt seem to be using the graphics card and the process is running really slowly, i.e. 3 hours to run. Any idea what I am doing wrong? Thank you
Hi, we have points_per_batch parameter that controls the GPU memory usage during processing. If you wish to allocate more GPU memory, you can increase points_per_batch accordingly. This should speed up the process. However, please be aware that if the available GPU memory is insufficient, it may result in an 'out of memory' error.
This is how I turned GPU to work, as an example: Detect objects using deep learning -> Environments ->processor type -> GPU Geotiff 10 x 8 km 9 min :30 seg GPU:rtx 3070 8gb Ram
I was using the latest ArcPro version. Best to report the error you are getting, in anycase, it is very slow for me.
Hello, can you share the version you are using? I have been unable to load successfully in the process of trying, I do not know whether it is the version of the problem. If it is convenient, please reply and give me some help. Thanks.
I have it running on an older desktop - works fine - albeit slowly! But installed on a faster/better processor laptop - and error reported below appears. Any progress in finding out what the problem is? I have reported this to ESRI Support.
Hi, can you please share the pro version and also the arcgis python api version.
Please add the ability to specify input prompts to SAM as points or polygons (boxes). Thank you.