Closed dbuscombe-usgs closed 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
do_seg
Fixed in https://github.com/Doodleverse/doodleverse_utils/commit/b608042492c0da4c91112f612f51824208b08cf9
Use v0.0.16 https://pypi.org/project/doodleverse-utils/0.0.16/
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