Open Ankit-Vohra opened 1 year ago
Please provide the source code that you used.
import leafmap
from samgeo import tms_to_geotiff, split_raster
from samgeo.text_sam import LangSAM
image = "ortho.tif"
split_raster(image, out_dir="tiles", tile_size=(1024, 1024), overlap=100)
sam = LangSAM()
text_prompt = "tree"
sam.predict_batch(
images='tiles',
out_dir='masks_25',
text_prompt=text_prompt,
box_threshold=0.25,
text_threshold=0.24,
mask_multiplier=255,
dtype='uint8',
merge=True,
verbose=True,
)
Try setting merge=False
to see what happens.
I'm trying to run batch segmentation on a orthomosaic of 4gb, what should be the free storage required in my system if I have to merge all the tiles and build one single raster out of all the masks. Settings which I have used:
My code is executing fine but it throws error that disk is full while merging all the masks although I have over 200 gb storage available in my disk.