Slow performance
Hi,
I segmented with GUI a 2008x2008 picture with dapi nuclei. (output see below) First of all is shows (2008, 2008, 3) but is a grayscale image. I use a 6 core I7-6800 CPU (3.4 GHz), 64GB Memory, GTX 1080 and Use GPU is on. Running Windows 10. When looking at the GPU usage I see a few seconds of Cuda activity. But the total calculation time is 52 seconds. I want to analyse 10K pictures (high content/throughput data). What can I do to speed the calculations up. (So what hardware etc.) and how does the speed of your algorithm compares to Stardist for example (I used Stardist on the same data, and the calculation is done in 5 seconds).
Best, Ron
1 (2008, 2008, 3) removed all cells estimated diameter of cells using nuclei model = 37.0 pixels removed all cells using model nuclei processing 1 image(s) estimated masks for 1 image(s) in 52.57 sec
TOTAL TIME 52.57 sec 1859 cells found with cellpose net in 52.772 sec plane 0 outlines processed
can you try the latest version of the pipeline? I just ran a 2025 x 2025 image on my Windows laptop (no GPU, not a particularly fast CPU) and the computation time for 4 networks is 41sec. with 1 network it's a 16sec runtime
Hi,
I used the new version (with the GUI) and these are the results (file in attached zip file).
It looks it is faster as the older version. The network over the GPU is very fast!! The calculations of the mask is the slower part. Is there a way to optimize the mask creation?
Best, Ron
--> Without GPU (4 networks, 1 fast)
CUDA version not installed/working, will use CPU version. E:/Ron/Anaconda/CellPoseTest/test1.tif 1 (2008, 2008, 3) removed all cells removed all cells cyto cellpose_residual_on_style_on_concatenation_off using model cyto processing 1 image(s) time spent: running network 249.74s; flow+mask computation 32.14 estimated masks for 1 image(s) in 282.09 sec
TOTAL TIME 282.09 sec 2150 cells found with cellpose net in 282.300 sec plane 0 outlines processed removed all cells using model cyto processing 1 image(s) time spent: running network 61.31s; flow+mask computation 32.55 estimated masks for 1 image(s) in 94.13 sec TOTAL TIME 94.13 sec 2172 cells found with cellpose net in 94.277 sec plane 0 outlines processed
--> With GPU (4 networks(with autotune), 1 fast, 4 networks)
** CUDA version installed and working. ** E:/Ron/Anaconda/CellPoseTest/test1.tif 1 (2008, 2008, 3) removed all cells removed all cells cyto cellpose_residual_on_style_on_concatenation_off using model cyto processing 1 image(s) [09:49:57] c:\jenkins\workspace\mxnet-tag\mxnet\src\operator\nn\cudnn./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable) time spent: running network 13.74s; flow+mask computation 31.80 estimated masks for 1 image(s) in 45.74 sec
TOTAL TIME 45.74 sec 2150 cells found with cellpose net in 47.953 sec plane 0 outlines processed removed all cells using model cyto processing 1 image(s) time spent: running network 1.17s; flow+mask computation 31.92 estimated masks for 1 image(s) in 33.31 sec TOTAL TIME 33.31 sec 2172 cells found with cellpose net in 33.468 sec plane 0 outlines processed removed all cells using model cyto processing 1 image(s) time spent: running network 4.95s; flow+mask computation 30.74 estimated masks for 1 image(s) in 35.89 sec TOTAL TIME 35.89 sec 2150 cells found with cellpose net in 36.028 sec plane 0 outlines processed
You can try turning off the quality control step in the flow+mask computation by setting flow_threshold=0. The QC step throws out masks that produce flows which are substantially different from the network's predicted flows. This mask->flow computation takes some time.