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

(bug) Prediction with window size slightly too small #25

Open
MatthewPierson90 opened this issue Jun 17, 2022 · 4 comments
Open

(bug) Prediction with window size slightly too small #25

MatthewPierson90 opened this issue Jun 17, 2022 · 4 comments

Comments

@MatthewPierson90
Copy link
Contributor

I just encountered an error doing a prediction on a test image.

It seems to be a result of the test image shape being just barley bigger than a multiple of the window size. In my case the raster data shape was (201, 200) and I was using a window size of 100. The error is occurring in SingleSensorNetwork and I believe it is occurring because the last piece shape is (100,1).

This results in a call to range(0, negative_value) and I suspect cython might be taking the largest int value it can and looping over that. the offending code is in n _build_network.pyx on line 344

I will investigate further.

@MatthewPierson90
Copy link
Contributor Author

Well, at one point it resulted in a memory leak (which is why I thought it might be looping over large values) but I can't recreate that behavior, so now it is just exiting.

@jgrss
Copy link
Owner

jgrss commented Jun 18, 2022

Good find -- we typically enforce the image dimensions in the generation of the time series data. Are you saying here that your input image has a dimension of (201 x 200)?

@MatthewPierson90
Copy link
Contributor Author

MatthewPierson90 commented Jun 19, 2022

For training the model I have also been enforcing dimensions (always 100x100). I did notice that your prediction function will make mosaics from larger data by iterating through the image, and so I had been playing with that to set up an inference script. I can absolutely enforce dimensions there too, that will be easy, this was just something I ran into.

On another note, the very right column and very bottom row of my predictions are often weird, have you run into this at all? I suspect I have everything off by a pixel somewhere in my code, but I can't find it. I can open a different issue for this if desired.

@jgrss
Copy link
Owner

jgrss commented Mar 9, 2023

@MatthewPierson90 please add details if you are still using (I know my response was very delayed) and encountering issues with this.

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