Closed dbuscombe-usgs closed 2 years ago
Another issue is that formulae for MNDWI is incorrect (terms switched in denominator and numerator)
Fixed in https://github.com/Doodleverse/doodleverse_utils/commit/6c8e1adc5443c6ed567f6988580542f1c2e0a6d0
Changes made:
do_resize_label
and do_resize_image
moved from Gym/make_nd_dataset
to doodleverse-utils/imports
do_pad_label
and do_pad_image
removed from make_ndwi_dataset
and make_mndwi_dataset
. the above functions called with from .imports import *
gym/make_nd_dataset
mndwi = np.divide(g - swir, g + swir )
is now correct in make_mndwi_dataset
this will require a change to Gym/make_nd_dataset
to comment out functions scale
, scale_rgb
, do_resize_label
, and do_resize_image
, which will now be called from doodleverse_utils/imports
. An additional change is the earlier call to from doodleverse_utils.imports import *
I'm making NDWI and MNDWI datasets to train a Gym model and just noticed that the functions are out of date
The functions called by the Gym utils script
python preprocess_data.py
still create padded images, not resized ones. This is no longer consistent withmake_nd_datasets
used to make 1, 3, and Nd datasetsdef do_pad_label(lfile, TARGET_SIZE):
anddef do_pad_image(f, TARGET_SIZE):
need to be changed to be more consistent with the correspinding gym functionsdef do_resize_label(lfile, TARGET_SIZE):
anddef do_resize_image(f, TARGET_SIZE):
In fact, this may be an opportunity to make a common set of functions, all housed in
doodleverse-utils
?