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
Problem when running 3D model on 2-channel stack #182
Comments
Hi @maweigert ! I am not running a notebook, just a script from the terminal. Everything works as long as I have one channel, but then if I try with two I get that error. Thank you for your help!! |
Note that
model.predict_instances(Z[i], axes="ZYXC", n_tiles=(2,8,8,1)) |
This works for me: from stardist.models import StarDist3D, Config3D
config = Config3D(n_channel_in=2)
model = StarDist3D(config, 'my_model', basedir=None)
x = np.zeros((12,133,157,2), dtype=np.float32)
out = model.predict_instances(x, axes='ZYXC', n_tiles=(1,4,4,1)) |
@uschmidt83 thanks, I corrected the mistake with the tuple :) |
Just tried it with this shape, and it works on my GPU (8GB RAM): from stardist.models import StarDist3D, Config3D
config = Config3D(n_channel_in=2)
model = StarDist3D(config, 'my_model', basedir=None)
x = np.zeros((193, 1699, 1938, 2), dtype=np.float32)
out = model.predict_instances(x, axes='ZYXC', n_tiles=(2,16,16,1)) Does this not run for you? |
Hello,
I have trained a 3D model on 2-channel images, but I have problems when I try to run it on a new dataset having similar shape zyxc, (50, 233, 257, 2).
Here is the code I am using:
And here is where I get the error messages:
I am not sure what I am doing wrong... by chance do you have a clue of what I should modify/correct?
Thank you a lot!!
Lucrezia
The text was updated successfully, but these errors were encountered: