segment-geospatial
segment-geospatial copied to clipboard
A Python package for segmenting geospatial data with the Segment Anything Model (SAM)
For now, segment-geospatial segments the entire image. It would be great to add support for input prompts such as points or boxes. This will be useful for extracting specific features...
It would be great to use bounding boxes generated from other deep learning models as input to refine the SAM results. Source: [LinkedIn post](https://www.linkedin.com/posts/lucas-osco_segmentanything-geospatial-deeplearning-activity-7062114216261955584-7u2O?utm_source=share&utm_medium=member_desktop) and [notebook](https://github.com/LucasOsco/RemoteSensingAI) by Lucas Prado Osco...
This PR adds support for input prompts, such as points and bbox. Work in progress. ![mask1](https://user-images.githubusercontent.com/5016453/236729747-7488609f-e797-47a2-9943-1dda02e7c786.png) ![mask2](https://user-images.githubusercontent.com/5016453/236729843-cfab04b2-ab8d-435e-aab5-c51d7b44daf4.png) ![mask3](https://user-images.githubusercontent.com/5016453/236729850-cc7a3546-c08b-41be-bb9d-ded30140fcc9.png)
### Description I know this is a big feature request, but the addition of fine-tuning support would be nice as a component of this package. TorchGeo could probably be used...
SEEM is an alternative to SAM. It would be great to add SEEM support for segmenting satellite imagery. https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once ![](https://raw.githubusercontent.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once/main/assets/compare.jpg)
### Description The geo_box parameter of the SamGeoPredictor.predict function seems to be hard coded to EPSG:4326 [here](https://github.com/opengeos/segment-geospatial/blob/c0ce7822b08f63e25feb4ea1aada6d6ffa528ff0/samgeo/samgeo.py#L448). It would be useful to allow for different projections. In addition, this also...
### Description Since this project requires GDAL so the requirements are fairly complex to install, it would be very helpful to include a Dockerfile
Please add script models for fine tunning like: optimizer = torch.optim.Adam(sam_model.mask_decoder.parameters()) loss_fn = torch.nn.MSELoss() with torch.no_grad(): image_embedding = sam_model.image_encoder(input_image) low_res_masks, iou_predictions = sam_model.mask_decoder( image_embeddings=image_embedding, image_pe=sam_model.prompt_encoder.get_dense_pe(), sparse_prompt_embeddings=sparse_embeddings, dense_prompt_embeddings=dense_embeddings, multimask_output=False, )
Thank you for your speedy work on this. Impressive. I'm posting to check whether there is a known issue with the point input feature. I have tried to run the...
I only run the code from the link: https://samgeo.gishub.org/examples/satellite/ and this code cell did not work: ``` style = { "color": "#3388ff", "weight": 2, "fillColor": "#7c4185", "fillOpacity": 0.5, } m.add_vector(vector,...