Closed oeway closed 3 years ago
This PR enables converting from a mask image (with pixel number corresponds to the object id) to a geojson string.
See usage below:
from imjoy_interactive_trainer.data_utils import mask_to_geojson import imageio image = imageio.imread("/my_label_file.png") geojson = mask_to_geojson(image) with open("my_geojson.json", "w") as f: f.write(geojson)
This PR enables converting from a mask image (with pixel number corresponds to the object id) to a geojson string.
See usage below: