wiggins-lab / SuperSegger

A completely automated MATLAB-based trainable image cell segmentation, fluorescence quantification and analysis suite, particularly well suited for high-throughput time lapse fluorescence microscopy of in vivo bacterial cells.
GNU General Public License v3.0
32 stars 20 forks source link

Error messages after segmentation & missing output options #21

Closed showmepuppies closed 6 years ago

showmepuppies commented 6 years ago

Hi,

I am getting the same error messages for almost every segmentation run. I am using 60xEc with default segmentation settings (but I get the same error with other constants, including trained ones). Segmentation fails at Step7:

xy1: trackOpti - Step 7: Running trackOptiClist.
Error using trackOptiClist (line 203)
Array indices must be positive integers or logical values.

Error in trackOpti (line 186)
    [clist] = trackOptiClist(dirname_seg, CONST, header);

Error in BatchSuperSeggerOpti>intProcessXY (line 350)
    trackOpti(dirname_xy,skip,CONST, header, startEnd);

Error in BatchSuperSeggerOpti (line 215)
    parfor(j = 1:num_xy,workers)

Error in superSeggerGui>segment_images_Callback (line 213)
    BatchSuperSeggerOpti(dirname, skip, clean_flag, CONST, startEnd);

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in superSeggerGui (line 38)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)superSeggerGui('segment_images_Callback',hObject,eventdata,guidata(hObject)) 
Error while evaluating UIControl Callback.

If I go to SuperSeggerViewer after an "errored" run, many output options are not listed (I assume because linking was not completed).

The dataset consists of 40 phase contrast images, no fluorescence. Interestingly, when I run only the first 25 images, it completes without error messages.

Here is the final frame of the 40 images: capture

Best, Elisa

pawiggins commented 6 years ago

Hey Elisa:

This is definitely a problem with the new generation / progenitor code. I have never had this error but I think I fixed it. The problem is that I don’t know since I don’t have you’re data. Could you send me you data? I suspect there must be some deeper error that is allowing cells to get ID = 0.

Also… are your frames over exposed? The halo around the cells looks like it is saturating the camera.

—PAW

On Aug 9, 2018, at 5:32 AM, showmepuppies notifications@github.com wrote:

Hi,

I am getting the same error messages for almost every segmentation run. I am using 60xEc with default segmentation settings (but I get the same error with other constants, including trained ones). Segmentation fails at Step7:

xy1: trackOpti - Step 7: Running trackOptiClist. Error using trackOptiClist (line 203) Array indices must be positive integers or logical values.

Error in trackOpti (line 186) [clist] = trackOptiClist(dirname_seg, CONST, header);

Error in BatchSuperSeggerOpti>intProcessXY (line 350) trackOpti(dirname_xy,skip,CONST, header, startEnd);

Error in BatchSuperSeggerOpti (line 215) parfor(j = 1:num_xy,workers)

Error in superSeggerGui>segment_images_Callback (line 213) BatchSuperSeggerOpti(dirname, skip, clean_flag, CONST, startEnd);

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in superSeggerGui (line 38) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)superSeggerGui('segment_images_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating UIControl Callback. If I go to SuperSeggerViewer after an "errored" run, many output options are not listed (I assume because linking was not completed).

The dataset consists of 40 phase contrast images, no fluorescence. Interestingly, when I run only the first 25 images, it completes without error messages.

Here is the final frame of the 40 images: https://user-images.githubusercontent.com/15034855/43898918-4415ee7c-9bd8-11e8-8b1a-8544a46c74f5.PNG Best, Elisa

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wiggins-lab/SuperSegger/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/Amb9oQiFS-bHwMBMCUqRu9pYdMCXqDGAks5uPCvGgaJpZM4V1m0q.

showmepuppies commented 6 years ago

This was a 1st test run with a new phase objective, so it's possible the cells are overexposed. I'm pretty sure it shouldn't cause problems though, since the segmentation itself works really well with ~95% accuracy, even without training. It just seems to have issues with cell linking.

Here is the full dataset (53 images, but I only attempted to segment&link until frame 40):

Elisa_data.zip

pawiggins commented 6 years ago

Hey Elisa:

Ok… I ran your data. There was another bug of the same nature later in the code which is now fixed. You will need to update again. It now runs fine.

Re the data. In general, it looks pretty good.

I would strongly recommend a couple things, especially if training with the data:

(i) Don’t over expose. There are many subtle things that this will screw up.

(ii) The images are 8 bit. Presumably the original data was at least 14 bit. I would use the original full bit-depth images.

(iii) The frame rate is too low. A couple things happen when you do this. We have a minimal cell age at division set at 5 frames. Of course you can change this, but this is a pretty good rule of thumb for making things “work”. Also… as the colony grows, there is not sufficient overlap between cells in subsequent frames to make the tracking work well.

—PAW

On Aug 9, 2018, at 8:51 AM, showmepuppies notifications@github.com wrote:

This was a 1st test run with a new phase objective, so it's possible the cells are overexposed. I'm pretty sure it shouldn't cause problems though, since the segmentation itself works really well with ~95% accuracy, even without training. It just seems to have issues with cell linking.

Here is the full dataset (53 images, but I only attempted to segment&link until frame 40):

Elisa_data.zip https://github.com/wiggins-lab/SuperSegger/files/2274849/Elisa_data.zip — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wiggins-lab/SuperSegger/issues/21#issuecomment-411805899, or mute the thread https://github.com/notifications/unsubscribe-auth/Amb9oZOSfjbppgnzZfjTFbB6J7qX0sWIks5uPFp4gaJpZM4V1m0q.

pawiggins commented 6 years ago

Elisa:

Also… I looked at why you have ID = 0. This is a tracking problem that I don’t have time to fix at the moment. But, a faster frame rate would probably fix this automatically.

—PAW

showmepuppies commented 6 years ago

Thanks a lot for your help. We will increase the frame rate in the future and use full-depth images.

pawiggins commented 6 years ago

Hi Guys:

I added some extra code that should prevent ID==0 for good.

—PAW

On Aug 9, 2018, at 8:39 AM, Paul Wiggins pawiggins@gmail.com wrote:

Hey Elisa:

This is definitely a problem with the new generation / progenitor code. I have never had this error but I think I fixed it. The problem is that I don’t know since I don’t have you’re data. Could you send me you data? I suspect there must be some deeper error that is allowing cells to get ID = 0.

jimmysantander commented 5 years ago

Hi all, I think I might be having a similar issue with cells getting ID=0. At the moment I am using the las version of supersegger. I have been able to run it a couple of times successfully, but mots of the times I get the same error, which I paste here:

Error using multiAssignmentSparse/getRevAssign (line 460) Cell contents indices must be greater than 0

Error in multiAssignmentSparse (line 349) revAssign = getRevAssign();

Error in trackOptiLinkCellMulti (line 151) data_c.regs.revmap.r] = assignmentFun (data_c, data_r,CONST,0,0);

Error in trackOpti (line 93) trackOptiLinkCellMulti(dirname_seg, delete_old_err_files, CONST, header);

Error in BatchSuperSeggerOpti>intProcessXY (line 350) trackOpti(dirname_xy,skip,CONST, header, startEnd);

Error in BatchSuperSeggerOpti (line 215) parfor(j = 1:num_xy,workers)

Error in superSeggerGui>segment_images_Callback (line 213) BatchSuperSeggerOpti(dirname, skip, clean_flag, CONST, startEnd);

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in superSeggerGui (line 38) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)superSeggerGui('segment_images_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating UIControl Callback

Thanks for your help!