Doodleverse / holodoodler

HoloDoodler; semi-interactive image segmentation implemented using HoloViews
3 stars 1 forks source link

Match the Format of Outputted Images with the Format of Input Image (especifically GeoTIFFs) #3

Closed venuswku closed 1 year ago

venuswku commented 1 year ago

New Feature Request

Suggested Solution

Notes

dbuscombe-usgs commented 1 year ago

Excellent, thanks @venuswku. I like all these changes, and will accept and merge your PR today

I tested the output geotiff files in QGIS. They appear in the correct place, and look good

I like the output json file, "info.json", containing metadata.

There are three further changes I would like to see

The first relates to your question The doodles image might be used to test other segmentation models, but it's not super useful to view it on a map so I don't think it needs to contain any geographic information. What do you think? I think there are good reasons to make the doodles image a geotiff, if the inputs are geotiffs. It would be valuable to see where in space those doodles were made.

The second request is to make only the following outputs

  1. colorized segmentation
  2. greyscale segmentation - this is the 1-band 8-bit integer or greyscale version of the doodler output, before it gets colorized
  3. doodles
  4. info json file

The "input" file that is currently an output is surplus to requirements - it merely duplicates the input file

The third request is to name the output files with the same root as the input file. So, if the input file is called samplegeotiff.tif, the outputs should be called 1) samplegeotiff_doodles.tif, 2) samplegeotiff_colorlabel.tif, 3) samplegeotiff_label.tif, and 4) samplegeotiff_info.json. This will be easier to match input files with outputs, based on filename. The info.json files could later be consolidated into a single JSON file containing all metadata info for all doodled images

Thanks!

venuswku commented 1 year ago

Thanks for testing the output files in QGIS, @dbuscombe-usgs!

The info.json file is actually Maxime's idea.😄 I just modified it a little bit to reflect my changes.

I made a pull request for your three changes here: https://github.com/Doodleverse/holodoodler/pull/7. Feel free to check it out when you have time! Here are the new outputs if the input is another_geotiff.tif.zip: 20221021-201048.zip.