cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

Can't train size model with newest cellpose version

Open trongtuyen99 opened this issue 3 years ago • 5 comments

I am using Cellpose v2.1.0, train from scatch, channel=0 and channel2=0. After training cp model had done, indexerror happend: out of bound for axis 0 with size 1200 (my image width). In line 748, random_rotate_and_resize function - file transforms.py

I found that nchan variable in this functions is width of first image instead of image channel. After I have corrected the shape of input image, another bug found.

Anyone successfully train size model with cellpose v2.x please help me fix this issue. Thanks

@carsen-stringer @kevinjohncutler @marius10p thanks for your support🤣🤣🤣

trongtuyen99 avatar Sep 08 '22 03:09 trongtuyen99

Whats your input image dimension? are you using the gui or the command line?

sri9s avatar Sep 08 '22 06:09 sri9s

@sri9s my input image dimensions are various, rgb image. I used command line to train.

trongtuyen99 avatar Sep 08 '22 07:09 trongtuyen99

Try adding --all_channel argument to your command

sri9s avatar Sep 08 '22 09:09 sri9s

Do you want grayscale or RGB inputs? (--chan 0 --chan2 0 means grayscale and no nuclear channel)

can you report the full error message?

carsen-stringer avatar Sep 09 '22 12:09 carsen-stringer

@carsen-stringer what would be the commandline argument for RGB inputs?

sri9s avatar Sep 19 '22 12:09 sri9s

yes --all_channel would be the option to train a network with 3 channels instead of 2, but we don't have support for size models currently with different channel configurations (more than 2 channels)

carsen-stringer avatar Nov 06 '22 16:11 carsen-stringer

we recommend if possible that the user provides the diameter for the images

carsen-stringer avatar Nov 06 '22 16:11 carsen-stringer