Doodleverse / doodleverse_utils

A set of common Doodleverse tools and utilities
MIT License
4 stars 3 forks source link

Duplication and resizing behaviour of `zoo_merge_nd_inputs4pred.py` and `merge_nd_inputs4pred.py` #17

Closed dbuscombe-usgs closed 1 year ago

dbuscombe-usgs commented 1 year ago

There are currently 2 functions that do the same thing, and neither of them do it correctly!

They are zoo_merge_nd_inputs4pred.py and merge_nd_inputs4pred.py

They are designed to create npz files for ND models. I no longer remember why zoo_merge_nd_inputs4pred.py even exists. So that should be deleted

Next, merge_nd_inputs4pred.py should be modified so it does NOT resize inputs. We actually want the original sizes of imagery here because when they are passed to do_seg (https://github.com/Doodleverse/doodleverse_utils/blob/main/doodleverse_utils/prediction_imports.py#L268 or similar), we want this function https://github.com/Doodleverse/doodleverse_utils/blob/main/doodleverse_utils/prediction_imports.py#L210 to do the resizing and keep track of the new and original file sizes. That gives us the option to rescale the model inputs AND model outputs, so we finally get model outputs the same size as the original imagery

dbuscombe-usgs commented 1 year ago

Fixed in https://github.com/Doodleverse/doodleverse_utils/commit/b608042492c0da4c91112f612f51824208b08cf9

dbuscombe-usgs commented 1 year ago

Use v0.0.16 https://pypi.org/project/doodleverse-utils/0.0.16/