opengeos / segment-geospatial

A Python package for segmenting geospatial data with the Segment Anything Model (SAM)
https://samgeo.gishub.org
MIT License
3.05k stars 313 forks source link

Dockerfile #17

Closed austinmw closed 1 year ago

austinmw commented 1 year ago

Description

Since this project requires GDAL so the requirements are fairly complex to install, it would be very helpful to include a Dockerfile

giswqs commented 1 year ago

Good suggestion. It is on my to-do-list. We can build upon the pytorch Dockerfile.

https://github.com/anibali/docker-pytorch/tree/master

or https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#gpu-accelerated-notebooks

https://github.com/iot-salzburg/gpu-jupyter

austinmw commented 1 year ago

Thanks. Quick question, was this fine tuned on geospatial data, or does it use the pretrained weights from meta as-is?

giswqs commented 1 year ago

It uses the pre-trained model as it is. No fine-tuning yet.

austinmw commented 1 year ago

Thanks for your fast response! I tried very small pedestrian and vehicle segmentation on the SAM demo site and the performance did not seem great for me, so fine tuning would be awesome in the future 🚀

giswqs commented 1 year ago

Yes, that would be a great feature to add. I will see you if I can implement it. Contributions are always welcome.

swdmike commented 1 year ago

Yes, a dockerfile is really necessary. Thanks.

p-vdp commented 1 year ago

I can confirm the installation steps necessary to run the example Jupyter notebooks aren't very clear. A dockerfile of your demo environment would be very appreciated! Or at least add detail to the instructions on how you set it up from one of the docker-stacks.

In my case I have your example notebooks running in jupyter/datascience-notebook after installing segment-geospatial with mamba. However the TIF format rasters don't appear as layers in the leafmaps. I'm sure I'm missing a dependency but I don't know what it is.

giswqs commented 1 year ago

@p-vdp The file extension problem has been fixed in https://github.com/opengeos/segment-geospatial/pull/43. Try changing the file extension from .tiff to .tif.

Do you have a Dockerfile that you can share?

p-vdp commented 1 year ago

Amazingly quick response and fix! Thank you!!