Skip to content

Commit

Permalink
Add support for box prompts for SamGeo2
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Oct 14, 2024
1 parent d78167a commit 5dc9727
Show file tree
Hide file tree
Showing 5 changed files with 457 additions and 51 deletions.
6 changes: 1 addition & 5 deletions docs/examples/box_prompts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"[![image](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/opengeos/segment-geospatial/blob/main/docs/examples/box_prompts.ipynb)\n",
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/segment-geospatial/blob/main/docs/examples/box_prompts.ipynb)\n",
"\n",
"This notebook shows how to generate object masks from text prompts with the Segment Anything Model (SAM). \n",
"This notebook shows how to generate object masks from box prompts with the Segment Anything Model (SAM). \n",
"\n",
"Make sure you use GPU runtime for this notebook. For Google Colab, go to `Runtime` -> `Change runtime type` and select `GPU` as the hardware accelerator. "
]
Expand Down Expand Up @@ -131,10 +131,6 @@
"source": [
"## Initialize SAM class\n",
"\n",
"The initialization of the LangSAM class might take a few minutes. The initialization downloads the model weights and sets up the model for inference.\n",
"\n",
"Specify the file path to the model checkpoint. If it is not specified, the model will to downloaded to the working directory.\n",
"\n",
"Set `automatic=False` to disable the `SamAutomaticMaskGenerator` and enable the `SamPredictor`."
]
},
Expand Down
Loading

0 comments on commit 5dc9727

Please sign in to comment.