cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

How to use the command line to get the same information (cell number) displayed in the GUI

Open SaaaaiDing opened this issue 3 years ago • 4 comments

SaaaaiDing avatar Aug 02 '22 08:08 SaaaaiDing

First of all, thank you very much for maintaining cellpose, it helps me to get things done quickly.This is a great job.

In my work I ran into a problem: how to get the same information (cell number) that I get after batch processing the pictures using the command line and get a single photo after segmenting it in the GUI.

Although the segmentation effect I get with the command line is the same as the GUI version, I have tried many methods with imageJ and can't get the same number of cells as the GUI version shows.

Here is what shows in the GUI. a41c9197e2d39246f30c2e064788241 f945df18def447ac1631e6a5ca491f5

This is the mask picture I got with the command line when batch processing, and the count result I got from imageJ (I have used many segmentation methods and can't match the GUI display). 6ae1e0b239f87257fa49bd5211e5c5a d80dc0e56417935e9e8098f6828ec05

SaaaaiDing avatar Aug 02 '22 08:08 SaaaaiDing

Or is there any way to print the cell count information when batch processing images ?

SaaaaiDing avatar Aug 02 '22 08:08 SaaaaiDing

hmm this is a very common request. what if there is an option to make a txt file in the --dir that outputs two columns: the name of each file and the number of ROIs?

regarding imageJ import, are you using the --save_outlines option?

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

I'd also be interested in this feature, were it to be added. We're hoping to export a list of ROIs from images directly from the Colab notebook. Currently, we're having to save to '_seg.npy', download, and load into the GUI to view the number of cells.

Resolved by adding:

for mask in masks:
  print(len(utils.outlines_list(mask)))

Zymologist avatar Aug 30 '22 18:08 Zymologist

Sounds like this is related to #581? @carsen-stringer, let me know what you need to complete #643 and get this functionality added.

mrariden avatar Feb 05 '23 16:02 mrariden

thanks @mrariden , closing this issue as it will be resolved with #643

carsen-stringer avatar May 09 '23 18:05 carsen-stringer