Testing deforestation segmentation models

#1
by Iaanko - opened

Hello!
I am currently trying different models to detect and segment deforestation patches in satellite imagery. My attempts with SAM3 have not been very successful so far and I just found this model. I wonder if it can process big GeoTIFF files through a tiled segmentation, or how does it work and what kind of features it detects. This is the image I want to segment at the moment, there are roads, agricultural clearings and fields, sparse vegetation, some settlements, which to the human eye are very distinguishable from the dense forest. However, using SAM3 I'm not being able to segment these features and vectorize them.

Composite in Drive: https://drive.google.com/file/d/15Q5GJ-OVbcXz-CFyLq6zzElJMjDxHfUC/view?usp=drive_link

I would appreciate any advice or guidance on this matter!

Best,

Ianko

Forest versus clearing is mostly a texture and spectral difference rather than an object boundary, which is why promptable models like SAM often struggle on scenes like this. A couple of things tend to work better. First, process the GeoTIFF in overlapping tiles with rasterio windows, run the segmenter per tile and write the masks back with the same transform, so the result stays georeferenced. Second, start with a spectral baseline before any deep model: if the composite has a NIR band, an NDVI or NBR threshold followed by a morphological opening already separates dense forest from roads, fields and settlements quite well, and the cleaned mask makes good training labels for a small U-Net later. For vectorizing, rasterio.features.shapes on the final mask plus a simplify step in GeoPandas or QGIS is usually enough. segment-geospatial (samgeo) also wraps tiled SAM inference over GeoTIFFs if you want to keep comparing.

Sign up or log in to comment