You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the latest update to doodleverse-utils v0.0.33 MNDWI and NDWI models no longer function and throw error similar to the one pasted below. These models need the option to pass only a single band to the model such with code such as tf.squeeze(model(tf.expand_dims(image[:,:,1], 0)))
Traceback (most recent call last):
File "c:\development\doodleverse\coastseg\CoastSeg\debug_scripts\test_models.py", line 78, in <module>
model_dict = {
File "C:\development\doodleverse\coastseg\CoastSeg\src\coastseg\zoo_model.py", line 1036, in run_model
self.compute_segmentation(model_dict, percent_no_data)
File "C:\development\doodleverse\coastseg\CoastSeg\src\coastseg\zoo_model.py", line 1099, in compute_segmentation
do_seg(
File "C:\Users\sf230\anaconda3\envs\coastseg_transformers10\lib\site-packages\doodleverse_utils\prediction_imports.py", line 395, in do_seg
est_label, counter = est_label_multiclass(image,M,MODEL,TESTTIMEAUG,NCLASSES,TARGET_SIZE)
File "C:\Users\sf230\anaconda3\envs\coastseg_transformers10\lib\site-packages\doodleverse_utils\prediction_imports.py", line 174, in est_label_multiclass
est_label = tf.squeeze(model(tf.expand_dims(image[:,:,:3], 0)))
File "C:\Users\sf230\anaconda3\envs\coastseg_transformers10\lib\site-packages\keras\src\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\sf230\anaconda3\envs\coastseg_transformers10\lib\site-packages\keras\src\engine\input_spec.py", line 280, in assert_input_compatibility
raise ValueError(
ValueError: Exception encountered when calling layer 'model' (type Functional).
The text was updated successfully, but these errors were encountered:
Due to information provided by @2320sharon , the est_label_multiclass version implemented (for some reason!) in zoo was working but not the one in 'verse-utils-34 ... so I put the zoo versions of that function plus sister functions est_label_binary and do_seg into 'verse-utils/prediction_imports.
then I updated the Zoo and Gym functions so they use the doodleverse-utils versions of the above functions. Specifically, I updated model_functions and model_inference_funcs in zoo and tested various models with segment_orthomosaic.py and `select_model_and_batch_process_folder.py. I also tested gym/seg_images_in_folder.py
I tested both 2- and multiclass models, and segformer and resunet models, on satellite imagery and other imagery, including RGB and MNDWI and NDWI. It worked great every time 🎉
I was worried this might not work, but its works great! I tested it with all the models in both BEST and ENSEMBLE model and it works great! I also tested this change with all the models and it works!
Due to the latest update to doodleverse-utils v0.0.33 MNDWI and NDWI models no longer function and throw error similar to the one pasted below. These models need the option to pass only a single band to the model such with code such as
tf.squeeze(model(tf.expand_dims(image[:,:,1], 0)))
The text was updated successfully, but these errors were encountered: