cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

CellposeTraining: IndexError: list index out of range

Open ChenZhaoLab opened this issue 3 years ago • 1 comments

Dear all,

I have been trying to use the command line to train Cellpose. However, I kept getting "IndeError: list index out of range". In addition, the flow images look weird too....

Here are my test images https://github.com/chenzhao2016/TestImages/blob/main/Test_images.rar

Here is the error message image

I would appreciate it if someone could give me some suggestions. Thank you very much!

ChenZhaoLab avatar Aug 09 '22 11:08 ChenZhaoLab

it looks like your _masks images might be empty (the diameter is nan). did you save the training masks as indices 0=no cell, 1=cell 1, 2=cell 2,... etc

carsen-stringer avatar Aug 11 '22 21:08 carsen-stringer

We changed the mask images to instance segmentation and indexed each mask by grayscale.

ChenZhaoLab avatar Aug 16 '22 11:08 ChenZhaoLab

I'm also having this issue... I'm on mac. Made the mask, saved NPY file... followed exactly online tutorial on here image

BrandonSLockey avatar Aug 24 '22 09:08 BrandonSLockey

What I figured out is if all your training images have fewer than 5 cells, then you'll produce this error. If you have at least 1 image with more than 5 cells segmented then its fine...

BrandonSLockey avatar Aug 24 '22 10:08 BrandonSLockey