Problem with Untangle Worms


This is my first question on The tutorial on the CellProfiler website and the answers here helped me a lot.

I would like to analyze our images to determine live/dead nematodes using Worm Toolbox Pipelines.

I modified the “Worm_Analysis_CreateWormModel.cppipe” pipeline and create a new pipeline “TrainingModel.cpproj” to use our data. Also, I modified the “Worm_Analysis_UntangleWormsAndMakeMeasurements.cppipe” to the new pipeline “RunAssaaySolidity.cpproj”. Windows10 system and CellProfiler version 2.1.0 were used.
Please see the attached files of the pipelines and images.

Unfortunately, we have challenged images, with a lot of aggregates in the growing media. The result of this model was that the worms were divided into 3-4 parts. In addition, it was a problem to distinguish between the worms and the aggregates.

I didn’t succeed to improve the thresholding and the segmentation.

Is it possible to improve these pipelines?

Thank you in advance.


C2_IX_Trans_T81_Z0.ome.tif (2.8 MB) C3_IX_Trans_T61_Z0.ome.tif (2.8 MB) C4_IX_Trans_T61_Z0.ome.tif (2.8 MB) C6_IX_Trans_T61_Z0.ome.tif (2.8 MB) C9_IX_Trans_T61_Z0.ome.tif (2.8 MB) MyNewWormModel.xml (25.1 KB) RunAassay.cpproj (157.3 KB) TrainingModel.cpproj (485.3 KB)

Hi @A.G,
I checked your images & pipeline. There is slight changes that I had made in the IdentifyPrimaryobject module in the thresholding lower bound value, two class thresholding since there is no third class in your case (you have only foreground & background) & correction factor. The segmentation seems to be fine after these changes.
Regarding your aggregates,
I understand your aggregates as small particles (circular mostly) in your images. If you want to remove it, you could try using filter objects module after your segmentation (may be with size & circularity in your case).
PFA screen shot of your segmentation & setting in primaryobject module

Hope this helps.

Fujifilm Wako Automation (Consultant)
For CellProfiler training or optimised pipeline write to,

Read more on our site.
Yokogawa CV8000 - The Ultimate in Confocal HCS

1 Like


Just to add onto Lakshmi work, a small gaussian smooth (5 or 10) will also help.


1 Like


Thank you @lakshmi and @lee.marshall for your informative answers.
I used your suggestions to improve the pipeline.
I’m still working to achieve better results.



I improved my pipeline thanks to your suggestions.
I tried to export the analyzed data to “ExportToDatabase” to an SQLite Database.
Unfortunately, I couldn’t succeed to export the run the pipeline.
I read the “help for ExportToDatabase module”, however, I didn’t find how to modify the setting to solve the error.
Windows10 system and CellProfiler version 3.1.9 were used.

Any suggestions on how to solve this?

I appreciate any help you can provide.

RunAssayMay.cpproj (150.6 KB) trainingMay.xml (19.2 KB)

You might try posting a fresh post with a new subject line?

1 Like

I’ll re-post a new subject.

1 Like