Closed 2320sharon closed 1 year ago
I found a fix for this and I'm working on it
So this works for some models but for model sat_MNDWI_4class_7352850 in coastseg it fails..
It feels like each of the models expects a different sized input....
Input 0 of layer "conv2d" is incompatible with the layer: expected axis -1 of input shape to have value 1, but received input with shape (1, 512, 512, 3)
This same error occurs for sat_NDWI_4class_7352859, but not sat_5band_4class_7344606
yes mndwi and ndwi models should be using (1,512,512,1) sized tensors. they are only 1 band data. I'll need to pay attention to all cases when updating doodleverse-utils. All cases are 1-band (mndwi, ndwi), 3-band, and >3 bands
Haha you answered the question I was just about to ask. Thanks
We could check the name of the model maybe?
I think we decided recently to ignore the ndwi and mndwi models for now, but when I update doodleverse-utils (it'll be tomorrow now), I will try to include those cases in my testing suite. this testing suite is LOOONG overdue
for coastseg and seg2map, at least for now, we'll be working with RGB imagery only. Later we should add 1-band and 5-band models to coastseg.
Gotcha. We can come up with a plan with what to do for coastseg tommorrow. Great work!
I belive this bug is now fixed with the latest release
There is a bug that only uses the the first channel (aka the red channel) to create a label vector.
(tf.expand_dims(image[:,:,0], 0)
should be tf.expand_dims(image[:,:,:3], 0) so that if the imagery has 3 or more channels all three channels are used.I've tried this solution with 4 band imagery with resunet models, but I haven't had any luck with any of the segformer models.