|
39 | 39 | "metadata": {}, |
40 | 40 | "outputs": [], |
41 | 41 | "source": [ |
42 | | - "import os\n", |
43 | 42 | "import leafmap\n", |
44 | | - "from samgeo import SamGeo, tms_to_geotiff\n", |
| 43 | + "from samgeo import tms_to_geotiff\n", |
45 | 44 | "from samgeo.text_sam import LangSAM" |
46 | 45 | ] |
47 | 46 | }, |
|
201 | 200 | "outputs": [], |
202 | 201 | "source": [ |
203 | 202 | "sam.show_anns(\n", |
204 | | - " cmap='Greens', \n", |
205 | | - " box_color='red', \n", |
206 | | - " title='Automatic Segmentation of Trees', \n", |
| 203 | + " cmap='Greens',\n", |
| 204 | + " box_color='red',\n", |
| 205 | + " title='Automatic Segmentation of Trees',\n", |
207 | 206 | " blend=True,\n", |
208 | 207 | ")" |
209 | 208 | ] |
|
229 | 228 | "outputs": [], |
230 | 229 | "source": [ |
231 | 230 | "sam.show_anns(\n", |
232 | | - " cmap='Greens', \n", |
| 231 | + " cmap='Greens',\n", |
233 | 232 | " add_boxes=False,\n", |
234 | 233 | " alpha=0.5,\n", |
235 | | - " title='Automatic Segmentation of Trees', \n", |
| 234 | + " title='Automatic Segmentation of Trees',\n", |
236 | 235 | ")" |
237 | 236 | ] |
238 | 237 | }, |
|
257 | 256 | "outputs": [], |
258 | 257 | "source": [ |
259 | 258 | "sam.show_anns(\n", |
260 | | - " cmap='Greys_r', \n", |
| 259 | + " cmap='Greys_r',\n", |
261 | 260 | " add_boxes=False,\n", |
262 | 261 | " alpha=1,\n", |
263 | | - " title='Automatic Segmentation of Trees', \n", |
| 262 | + " title='Automatic Segmentation of Trees',\n", |
264 | 263 | " blend=False,\n", |
265 | | - " output='trees.tif'\n", |
| 264 | + " output='trees.tif',\n", |
266 | 265 | ")" |
267 | 266 | ] |
268 | 267 | }, |
|
312 | 311 | "m.add_vector(\"trees.shp\", layer_name=\"Vector\", style=style)\n", |
313 | 312 | "m" |
314 | 313 | ] |
| 314 | + }, |
| 315 | + { |
| 316 | + "cell_type": "markdown", |
| 317 | + "metadata": {}, |
| 318 | + "source": [ |
| 319 | + "## Interactive segmentation" |
| 320 | + ] |
| 321 | + }, |
| 322 | + { |
| 323 | + "cell_type": "code", |
| 324 | + "execution_count": null, |
| 325 | + "metadata": {}, |
| 326 | + "outputs": [], |
| 327 | + "source": [ |
| 328 | + "sam.show_map()" |
| 329 | + ] |
| 330 | + }, |
| 331 | + { |
| 332 | + "cell_type": "markdown", |
| 333 | + "metadata": {}, |
| 334 | + "source": [ |
| 335 | + "" |
| 336 | + ] |
315 | 337 | } |
316 | 338 | ], |
317 | 339 | "metadata": { |
|
0 commit comments