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

Several issues on 3_model.ipynb #3

Open
kate-berezn opened this issue May 30, 2021 · 1 comment
Open

Several issues on 3_model.ipynb #3

kate-berezn opened this issue May 30, 2021 · 1 comment

Comments

@kate-berezn
Copy link

I can run this notebook to the end as I faced with several issues:

  1. Variables (x0, y0,rx and ry) in the cell with content below are not defined

filter pipes to ones inside the image

import shapely
box = shapely.geometry.box(
minx=x0,
miny=y0,
maxx=x0+rxdata.shape[1],
maxy=y0+ry
data.shape[2],
)

  1. variables X_val2 and y_val2 are not defined so the code below fails.
    I tried to guess which data I should pass and just passed "X_val, y_val" for now but it does not look right (as results of training/test is strange)

pretrain/test

history = model.fit_generator(
datagen.flow(X_train, y_train, batch_size=batch_size),
samples_per_epoch=len(X_train)*4,
verbose=0,
nb_epoch=60,
validation_data=[X_val2,y_val2],

Any idea on how to work-around or fix this?

@wassname
Copy link
Owner

wassname commented Jun 9, 2021

Copied from email

Sorry I'm late in replying, here and on github. I'm flat out at work, and haven't looked at this project for years.

I'm also afraid it's a bit messy... like not defining x0. Sorry about that, I just wanted to share it, even if I couldn't find the time to clean it up well.

It looks like I was running the cells out of order, and getting x0, from the tfw or tiff world file. But it looks like it's just:
x0 and y0 are Easting and Northing of the upper left pixel (0,0 in image coordinates). rx and ry are x-pixel resolution and y-pixel resolution.

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