Doodleverse / segmentation_zoo

A collection of geoscientific image segmentation models
MIT License
8 stars 3 forks source link

Add post-processing options to `script\segment_orthomosaic.py` #26

Open dbuscombe-usgs opened 1 year ago

dbuscombe-usgs commented 1 year ago

This script uses 50% overlap in 2 dimensions, with a 'mode' resampling algorithm, to attempt to smooth over noise.

However, labels have error and post-processing options would also be nice. This would require reading the label mosaic tiff using rasterio, and carrying out one of a set of pre-defined filters. In the past, I have used morphological operators from scikit-image to remove small holes and blobs. This could be done on each binary mask (each individual class map), and any gaps can be filled in using inpainting (of which there is a quick method inside doodleverse_utils already)

dbuscombe-usgs commented 1 year ago

Once stable, these options may be adopted for seg2map as well