Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input 0 is incompatible with layer model: expected shape=(None, None, None, 6), found shape=(None, 32, 4992, 3334) #8

Open
chaijian2019 opened this issue Aug 3, 2022 · 3 comments

Comments

@chaijian2019
Copy link

hi bro,i run the eg is fine,but it got wrong when i run my file in tif,it said “Input 0 is incompatible with layer model: expected shape=(None, None, None, 6), found shape=(None, 32, 4992, 3334)”

@chaijian2019
Copy link
Author

image

@jsta
Copy link

jsta commented Nov 4, 2022

deepwatermap expects a 6-layer sequence, per the README:

B2: Blue
B3: Green
B4: Red
B5: Near Infrared (NIR)
B6: Shortwave Infrared 1 (SWIR1)
B7: Shortwave Infrared 2 (SWIR2)

It appears your data is a 32 layers? The README says you may need to modify the inference script if your data is not of the same dimensions as Landsat etc.

"The inference script we provide gets its input from a 6-band TIFF file. You can modify the script to feed the model a matrix of MxNx6 dimensions in any form."

@jsta
Copy link

jsta commented Nov 4, 2022

For me, I added some lines after https://github.com/isikdogan/deepwatermap/blob/master/inference.py#L31 to reshape the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants