A generalist algorithm for cell and nucleus segmentation.

Overview

Cellpose | omnipose

cellpose

Documentation Status Build Status Coverage Status PyPI version PyPI - Downloads Python version Licence: GPL v3 Contributors website Image.sc forum repo size GitHub stars GitHub forks

A generalist algorithm for cell and nucleus segmentation.

Cellpose was written by Carsen Stringer and Marius Pachitariu. To learn about Cellpose, read the paper or watch the talk. For support, please open an issue.

Omnipose was written by Kevin Cutler (@kevinjohncutler). To learn about Omnipose, read the paper, and check out the README.

If you want to improve Cellpose/Omnipose for yourself and for everyone else, please consider contributing manual segmentations for a few of your images via the built-in GUI interface (see instructions below).

UPDATE v0.7 (Nov 2021)

Omnipose is now officially available and supported as part of Cellpose. Use the 'omni' flag and models to take advantage of it for long cells! (E.g., filamentous bacteria.) Many additonal options are available and we will be updating the documentation shortly.

UPDATE v0.6 (Dec 2020)

Pytorch is now the default deep neural network software for cellpose. Mxnet will still be supported. To install mxnet (CPU), run pip install mxnet-mkl. To use mxnet in a notebook, declare torch=False when creating a model, e.g. model = models.Cellpose(torch=False). To use mxnet on the command line, add the flag --mxnet, e.g. python -m cellpose --dir ~/images/ --mxnet. The pytorch implementation is 20% faster than the mxnet implementation when running on the GPU and 20% slower when running on the CPU.

Dynamics are computed using bilinear interpolation by default instead of nearest neighbor interpolation. Set interp=False in model.eval to turn off. The bilinear interpolation will be slightly slower on the CPU, but it is faster than nearest neighbor if using torch and the GPU is enabled.

Run cellpose without local python installation

You can quickly try out Cellpose on the website first (some features disabled).

You can also run Cellpose in google colab with a GPU:

  • a code-based notebook: Open In Colab
  • a more user-friendly notebook for 2D segmentation written by @pr4deepr: Open In Colab
  • a user-friendly ZeroCostDL4Mic notebook that includes training cellpose models, written by @guijacquemet: Open In Colab

The colab notebooks are recommended if you have issues with MKL or run speed on your local computer (and are running 3D volumes). Colab does not allow you to run the GUI, but you can save *_seg.npy files in colab that you can download and open in the GUI.

Executable file: You can download an executable file for Windows 10 or for Mac OS (High Sierra or greater) that were made using PyInstaller on Intel processors (MKL acceleration works, but no GPU support). Note in both cases it will take a few seconds to open.

  • The Mac OS file will download as cellpose_mac OR cellpose_mac.dms. You will need to make it into an executable file and run it through the terminal:
  1. Open a terminal and run cd ~/Downloads/.
  2. Run chmod 777 cellpose_mac OR chmod 777 cellpose_mac.dms to make the file executable.
  3. Run ./cellpose_mac OR ./cellpose_mac.dms to open the cellpose GUI. Messages from cellpose will be printed in the terminal.
  4. You can also run using the command line interface, e.g. as ./cellpose_mac --dir ~/Pictures/ --chan 2 --save_png.
  • The Windows 10 file is an exe and you can click on it to run the GUI. You can also run using the command line interface, e.g. as cellpose.exe --dir Pictures/ --chan 2 --save_png

Detailed documentation at www.cellpose.org/docs.

System requirements

Linux, Windows and Mac OS are supported for running the code. For running the graphical interface you will need a Mac OS later than Yosemite. At least 8GB of RAM is required to run the software. 16GB-32GB may be required for larger images and 3D volumes. The software has been heavily tested on Windows 10 and Ubuntu 18.04 and less well-tested on Mac OS. Please open an issue if you have problems with installation.

Local installation

If you have an older cellpose environment you can remove it with conda env remove -n cellpose before creating a new one.

If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

  1. Install an Anaconda distribution of Python -- Choose Python 3.8 and your operating system. Note you might need to use an anaconda prompt if you did not add anaconda to the path.
  2. Open an anaconda prompt / command prompt with conda for python 3 in the path
  3. Create a new environment with conda create --name cellpose python=3.8.
  4. To activate this new environment, run conda activate cellpose
  5. To install the minimal version of cellpose, run python -m pip install cellpose.
  6. To install cellpose, omnipose and the GUI, run python -m pip install cellpose[all]. If you're on a zsh server, you may need to use ' ' around the cellpose[all] call: `python -m pip install 'cellpose[all]'.

To upgrade cellpose (package here), run the following in the environment:

python -m pip install cellpose --upgrade

Note you will always have to run conda activate cellpose before you run cellpose. If you want to run jupyter notebooks in this environment, then also conda install jupyter and python -m pip install matplotlib.

You can also try to install cellpose, omnipose and the GUI dependencies from your base environment using the command

python -m pip install cellpose[all]

If you have issues with installation, see the docs for more details. You can also use the cellpose environment file included in the repository and create a cellpose environment with conda env create -f environment.yml which may solve certain dependency issues.

If these suggestions fail, open an issue.

GPU version (CUDA) on Windows or Linux

If you plan on running many images, you may want to install a GPU version of torch (if it isn't already installed).

Before installing the GPU version, remove the CPU version:

pip uninstall torch

Follow the instructions here to determine what version to install. The Anaconda install is strongly recommended, and then choose the CUDA version that is supported by your GPU (newer GPUs may need newer CUDA versions > 10.2). For instance this command will install the 10.2 version on Linux and Windows (note the torchvision and torchaudio commands are removed because cellpose doesn't require them):

conda install pytorch cudatoolkit=10.2 -c pytorch

For the GPU version of mxnet, you will need to install the cuda toolkit first if you haven't already (on Windows it may be necessary to install via anaconda as below):

conda install -c anaconda cudatoolkit

When upgrading GPU Cellpose in the future, you will want to ignore dependencies (to ensure that the pip version of torch does not install):

pip install --no-deps cellpose --upgrade

Installation of github version

Follow steps from above to install the dependencies. Then run

pip install git+https://www.github.com/mouseland/cellpose.git

If you want edit ability to the code, in the github repository folder, run pip install -e .. If you want to go back to the pip version of cellpose, then say pip install cellpose.

Download of pretrained models

The models will be downloaded automatically from the website when you first run a pretrained model in cellpose. If you are having issues with the downloads, you can download them from this google drive zip file, unzip the file and put the models in your home directory under the path .cellpose/models/, e.g. on Windows this would be C:/Users/YOUR_USERNAME/.cellpose/models/ or on Linux this would be /home/YOUR_USERNAME/.cellpose/models/, so /home/YOUR_USERNAME/.cellpose/models/cyto_0 is the full path to one model for example. If you cannot access google drive, the models are also available on baidu: Link:https://pan.baidu.com/s/1CARpRGCBHIYaz7KeyoX-fg ; Fetch code:pose ; thanks to @qixinbo!

Running cellpose

The quickest way to start is to open the GUI from a command line terminal. You might need to open an anaconda prompt if you did not add anaconda to the path:

python -m cellpose

The first time cellpose runs it downloads the latest available trained model weights from the website.

You can now drag and drop any images (*.tif, *.png, *.jpg, *.gif) into the GUI and run Cellpose, and/or manually segment them. When the GUI is processing, you will see the progress bar fill up and during this time you cannot click on anything in the GUI. For more information about what the GUI is doing you can look at the terminal/prompt you opened the GUI with. For example data, see website or this google drive folder. For best accuracy and runtime performance, resize images so cells are less than 100 pixels across.

Step-by-step demo

  1. Download the google drive folder and unzip it. These are a subset of the test images from the paper.
  2. Start the GUI with python -m cellpose.
  3. Drag an image from the folder into the GUI.
  4. Set the model (in demo all are cyto) and the channel you want to segment (in demo all are green). Optionally set the second channel if you are segmenting cyto and have an available nucleus channel.
  5. Click the calibrate button to estimate the size of the objects in the image. Alternatively you can set the cell diameter by hand and press ENTER. You will see the size you set as a red disk at the bottom left of the image.
  6. Click the run segmentation button. If MASKS ON is checked, you should see masks drawn on the image.
  7. Now you can click the LEFT/RIGHT arrow keys to move through the folder and segment another image.

On the demo images each of these steps should run in less than a few seconds on a standard laptop or desktop (with mkl working).

3D segmentation

For multi-channel, multi-Z tiff's, the expected format is Z x channels x Ly x Lx.

Contributing training data

We are very excited about receiving community contributions to the training data and re-training the cytoplasm model to make it better. Please follow these guidelines:

  1. Run cellpose on your data to see how well it does. Try varying the diameter, which can change results a little.
  2. If there are relatively few mistakes, it won't help much to contribute labelled data.
  3. If there are consistent mistakes, your data is likely very different from anything in the training set, and you should expect major improvements from contributing even just a few manually segmented images.
  4. For images that you contribute, the cells should be at least 10 pixels in diameter, and there should be at least several dozens of cells per image, ideally ~100. If your images are too small, consider combining multiple images into a single big one and then manually segmenting that. If they are too big, consider splitting them into smaller crops.
  5. For the manual segmentation, please try to outline the boundaries of the cell, so that everything (membrane, cytoplasm, nucleus) is inside the boundaries. Do not just outline the cytoplasm and exclude the membrane, because that would be inconsistent with our own labelling and we wouldn't be able to use that.
  6. Do not use the results of the algorithm in any way to do contributed manual segmentations. This can reinforce a vicious circle of mistakes, and compromise the dataset for further algorithm development.

If you are having problems with the nucleus model, please open an issue before contributing data. Nucleus images are generally much less diverse, and we think the current training dataset already covers a very large set of modalities.

Using the GUI

The GUI serves two main functions:

  1. Running the segmentation algorithm.
  2. Manually labelling data.

There is a help window in the GUI that provides more instructions and a page in the documentation here. Also, if you hover over certain words in the GUI, their definitions are revealed as tooltips. Here is a summary of their functions:

cellpose gui

In a notebook

See run_cellpose.ipynb.

From the command line

Run python -m cellpose and specify parameters as below. For instance to run on a folder with images where cytoplasm is green and nucleus is blue and save the output as a png:

python -m cellpose --dir ~/images_cyto/test/ --pretrained_model cyto --chan 2 --chan2 3 --save_png

You can specify the diameter for all the images or set to 0 if you want the algorithm to estimate it on an image by image basis. Here is how to run on nuclear data (grayscale) where the diameter is automatically estimated:

python -m cellpose --dir ~/images_nuclei/test/ --pretrained_model nuclei --diameter 0. --save_png

See the docs for more info.

Timing

You can check if cellpose is running the MKL version (if you are using the CPU not the GPU) by adding the flag --check_mkl. If you are not using MKL cellpose will be much slower. Here are Cellpose run times divided into the time it takes to run the deep neural network (DNN) and the time for postprocessing (gradient tracking, segmentation, quality control etc.). The DNN runtime is shown using either a GPU (Nvidia GTX 1080Ti) or a CPU (Intel 10-core 7900X), with or without network ensembling (4net vs 1net). The postprocessing runtime is similar regardless of ensembling or CPU/GPU version. Runtime is shown for different image sizes, all with a cell diameter of 30 pixels (the average from our training set).

256 pix 512 pix 1024 pix
DNN (1net, GPU) 0.054 s 0.12 s 0.31 s
DNN (1net, CPU) 0.30 s 0.65 s 2.4 s
DNN (4net, GPU) 0.23 s 0.41 s 1.3 s
DNN (4net, CPU) 1.3 s 2.5 s 9.1 s
Postprocessing (CPU) 0.32 s 1.2 s 6.1 s

Outputs

See the docs for info.

Dependencies

cellpose relies on the following excellent packages (which are automatically installed with conda/pip if missing):

Comments
  • Issue getting Cellpose to use GPU

    Issue getting Cellpose to use GPU

    Hi, I'm trying to test out Cellpose on data from a very large data set of bacterial images, and the CPU version seems to be struggling to process our images. I followed the instructions on your website regarding installing the GPU version of mxnet, but in the GUI the GPU setting remains grayed out.

    When I try to run model = models.Cellpose(gpu=True, model_type='cyto'), I get the readout Using CPU.

    My CUDA version is: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019 Cuda compilation tools, release 10.1, V10.1.105

    And my mxnet version is mxnet-cu101mkl version 1.5.0.

    opened by nolsman 25
  • Expanding cellpose applicability by augmenting the current dataset

    Expanding cellpose applicability by augmenting the current dataset

    A great deal of performance may be gained by manipulating images to be more 'like' other images on which cellpose has been trained. Below I'll give a direct comparison:

    Original image: image Adjusted: image The actual transformation on the original image is rescale(1./(1+meannorm(im))), where meannorm adjusts the mean to 0.5 (the range of im prior was [0 1]) and rescale scales the result back to [0 1]. Curiously, if I do not rescale the input, the segmentation returned is slightly different: image As far as the rescaling goes, this could be an artifact of the online tool. The images above all happened to have a bit depth of 8 (the default in MATLAB it seems, at least when saving to PNG instead of TIFF). Saving explicitly with a bit depth of 16 appears to give the same result as the rescaled [0-255] image (labeled 'adjusted' above). I need to do more testing with a local instance to see if rescaling actually does matter.

    However, I feel like cellpose can/should be made to work without manipulating the input images in this way. One easy solution would be to take the existing training set and perform various transformations on it (such as the inversion above) and re-train. This would vastly expand the set of image 'types' that cellpose can segment.

    I wonder what set of transformations would be needed to fully generalize cellpose, in the sense that it would be insensitive to any per-pixel transformation of the image. Of course one could go the other route - find a way to automatically transform input images into one of the closest 'types' that cellpose can already handle well.

    I also wonder if the dataset may be augmented to successfully segment slightly out-of-focus cells (due to distance from the optical axis, vibrations, and angled or irregular cell substrates). My idea would be to blur the existing dataset (uniformly or with some spatial dependence) and re-train. I see this sensitivity to out-of-focus regions conflicting with 3D segmentation, so even if this were successful, there would need to become two models: one for single-plane images and one for z-stacks.

    opened by kevinjohncutler 16
  • Is there a way to change where models will be downloaded?

    Is there a way to change where models will be downloaded?

    I have a problem with running Cellpose in a pipeline inside a container. The problem is that at each run of the pipeline Cellpose redownloads models, although they are already present in the container in the proper location. This happens because Cellpose looks for models in the$HOME directory, and $HOME directory is changed during the pipeline runtime.

    So is there a way to change the directory in which Cellpose will look for model files?

    opened by VasylVaskivskyi 14
  • Performance and accuracy issue

    Performance and accuracy issue

    Hi Cellpose team,

    I am continuing trying more images. Although the accuracy of segmentation is fabulous, the processing speed for one image is a little slow. It took me about 2.5 min to just estimate cell diameters for one image and about the same time or longer for cell counting. Of course, my image is a very large image (2048 x 2048 pixels) and contains about 3k cells. I wonder if the speed is normal? I tried to reduce the quality of my image into (512 x 512). The speed is increased. But the accuracy decreases a lot and the result is not useable. I tried in both GUI and code version. Do you have any comments or suggestions on it?

    Thank you again for your wonderful tools!

    opened by cyf203 14
  • Force casting mask to np.uint16

    Force casting mask to np.uint16

    Hi, thank you for this great program!

    I'm trying to segment a large image, and noticed that a mask with the index >65535 is not correctly indexed (there appears several regions with the same index). I think this is because the mask is cast to np.uint16 around this line, though it is treated as np.int32 beforehand. https://github.com/MouseLand/cellpose/blob/babf2eff59265815f0462f8cbc9fb9c68e747cc3/cellpose/models.py#L593 Does it make sense to change np.uint16 to np.int32 or np.uint32?

    Cheers, YF

    opened by yfukai 12
  • Processing Large 3D image

    Processing Large 3D image

    Hi @carsen-stringer , In an existing issue thread I found that you recommended : “if you're running out of memory due to the size of the tiff we don't currently have a workaround for that -- we recommend splitting the stack and stitching the masks afterwards.”

    I’m wondering how to achieve an optimal stitching of the masks (aka Label images, in which all the pixels of an object have the same value). Indeed stitching of overlapping intensity values looks natural but my first guess is that it is much more complicated for Labels, in 3D! Detecting objects in 3D in the overlapping area, detecting partially/fully overlapping objects, deciding which one to keep … removing objects touching the edge ? Am I overthinking it?

    With @lacan we thought it might be “easier” to fuse the flow images ? maybe in temporary files to overcome memory issues and run the other section of CellPose after on the fused image, which might not be so memory hungry? Best, Romain

    enhancement 
    opened by romainGuiet 12
  • Sending manual training set of packed cells

    Sending manual training set of packed cells

    Greetings and thanks a lot for sharing your tool for imaging data single cell segmentation, i have a challenging image of packed cells i tried to segmentate with cellpose, and would like to send a manually labeled dataset to your server, do you need a fully manual labeling? cause my image contains about 2000 nuclei. Any guidance is appreciated! packed nuclei of adherent cells Manual segmentation

    opened by AlexBouz 11
  • cellpose installation results in AttributeError: module 'PyQt5.QtGui' has no attribute 'QPushButton' error

    cellpose installation results in AttributeError: module 'PyQt5.QtGui' has no attribute 'QPushButton' error

    after following instructions to create the cellpose environment I run python -m cellpose and recieve the AttributeError: module 'PyQt5.QtGui' has no attribute 'QPushButton' error message. I tried to reinstall or upgrade the pyqt5 module but neither works. Any suggestions for getting this to work?

    opened by jdecarre 10
  • optimize the flow 2 label mask method

    optimize the flow 2 label mask method

    I am trying to optimize the flow2mask method, but now I get the 2 channels XY vector from the eval result. can you show me how to get the model's output (XY flow and cellprob) directly?

    opened by yxdragon 10
  • add resizing to pipeline (original: Optimise RAM and GPU usage)

    add resizing to pipeline (original: Optimise RAM and GPU usage)

    I have a strong system with 16 gb NVIDIA P5000 GPU, cellpose is only using 1GB and is taking around 30 min for processing my nuclei stack of size (477, 1848, 1848). Can i allocate more GPU to cellpose and make the workflow fast? I have cellpose installed from env file. image

    enhancement good first issue 
    opened by athulrv 10
  • Mac segmentation 11

    Mac segmentation 11

    running current version of cellpose on macOS Mojave or Catalina results in segmentation 11 error when launching GUI version and simply fails to process images in command line.

    opened by azijl 10
  • WORKING DOCkER FILE

    WORKING DOCkER FILE

    Hi, I was searching for a one working docker file that would enable running cellpose GUI. I tried installing it first on my M1 MacBook but had no luck ( qt libraries issues). Then I switched to Docker as in theory one well-set file should be helpful for everyone, but I cant find any which is working. Can anyone from the community have a working Dockerfile to share?

    opened by matrama 0
  • Unable to launch cellpose 2.0 GUI on Mac OS 10.14.6 (Mojave)

    Unable to launch cellpose 2.0 GUI on Mac OS 10.14.6 (Mojave)

    I was able to install Cellpose 2.0 following the recommended terminal commands below:

    conda create --name cellpose python=3.8 conda activate cellpose python -m pip install cellpose[gui]

    However, when I attempt to launch the gui I get error below. Any thoughts how to troubleshoot this?

    best, Justin

    ====== (cellpose) elstrotj-6CJGH7:~ elstrotj$ python -m cellpose Traceback (most recent call last): File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/main.py", line 7, in from cellpose import utils, models, io, core File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/utils.py", line 5, in import cv2 File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cv2/init.py", line 181, in bootstrap() File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cv2/init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: dlopen(/Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: ___darwin_check_fd_set_overflow Referenced from: /Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cv2/.dylibs/libX11.6.dylib (which was built for Mac OS X 11.0) Expected in: /usr/lib/libSystem.B.dylib in /Users/elstrotj/opt/anaconda3/envs/cellpose/lib/python3.8/site-packages/cv2/.dylibs/libX11.6.dylib

    opened by jelstrott 0
  • Cannot run cellpose in ImageJ (Fiji)

    Cannot run cellpose in ImageJ (Fiji)

    Hi I am trying to run the cellpose wrapper within ImageJ but get an error returned. I have attached pictures of the error code and the packages installed within the cellpose environment. Any advice as to overcome this would be appreciated

    Fault List of installed packages

    opened by joebear33 0
  • Impossible to train if mask images have less than 5 regions

    Impossible to train if mask images have less than 5 regions

    This seems to be a feature and not a bug, but this is very problematic for datasets in which images contain only one object to segment.

    Suggested solution: make an option in the training GUI to change the value of models.train.rescale or models.train.min_train.masks

    opened by TAspert 0
  • Mitigated FP-precision problem in label to flow conversion code and double input file detection bug

    Mitigated FP-precision problem in label to flow conversion code and double input file detection bug

    Replaced imprecise calculations of the form log(1+x) with specialized functions from Torch and NumPy.

    The previous implementation caused numerical instability when very long cells are converted to flows. I observe the diffusion process implementation to be quite robust, however going from mass concentration to log mass concentration + 1 is introducing instability. This is because to potentially very small mass concentrations (maybe 10e-50 in my particular case) we add 1.0 and only then take the logarithm. Even for float64 this gap between the exponents is too large.

    To resolve this problem, a number of libraries provide specialized functions to perform the log(1+x) operation using a single call to a function commonly named log1p.

    In general, I am skeptical about the need to compute the log mass concentrations. Because the flow field is normalized afterwards anyways, dropping the logarithm seemed to work fine for me.

    opened by koerner-axs 4
Releases(v2.1.1)
  • v2.1.1(Nov 7, 2022)

    Implementing some minor fixes and updates

    • cellpose passes tests for python 3.9 and 3.10 across operating systems -- we still recommend python 3.8, particularly if you have issues with the install
    • added option to use Mac M1 chip (if installed with torch) with command line argument --gpu device mps
    • added option to run cellpose on a single file from the command like with --image_path as an alternative to --dir (#543)
    • added new suggestion mode to suggest best Cellpose 2 model
    • suppressed writing PNGs or outlines when no masks were found (#584)
    • added docs for all functions (#554)
    • fixed case sensitive image file detection (#555)
    • allow eval method of Cellpose and CellposeModel to take as input torch arrays (#557)
    • added the function io.add_model(/full/path/to/model) to add the model file to the hidden folder to use with GUI and CLI; can also access the function by running python -m cellpose --add_model /full/path/to/model (#558)
    • fixed issue with cursor not allowing resizing (#545 )
    • added mac instructions (#523)
    • forced tiff saving for masks > 2**16 (#524)
    • added pyqt5 import statement for windows 8.1 compatibility
    Source code(tar.gz)
    Source code(zip)
  • v2.0.5(May 1, 2022)

    Small updates to Cellpose 2.0:

    • added new notebook for running Cellpose 2.0
    • model zoo model that was last clicked is highlighted in GUI
    • number of ROIs in image is shown in the GUI
    • added stitch_threshold option to GUI
    • reenabled 3D annotations with "single stroke" option
    • added imagecodecs dependency
    • merged #494 and #495
    Source code(tar.gz)
    Source code(zip)
  • v2.0.4(Apr 6, 2022)

    Cellpose 2.0 is here! Now you can train models in the loop with the Cellpose graphical interface. Upgrade to the latest version with

    pip install cellpose --upgrade
    

    Check out the twitter thread and preprint for details.

    Read how to use human-in-the-loop yourself in the gui docs, and check out the full human-in-the-loop video.

    Also, read more about the model zoo and how to use user-trained models in the models docs.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Apr 3, 2022)

  • v1.0(Jan 26, 2022)

    stable release

    • fixes some bugs in 0.8 with plotting and flow visualization in GUI
    • merges pull request for stitch_threshold bug (#390)
    • allows images with empty masks, depending on new flag --min_train_masks that is set to 5 by default. if fewer than min_train_masks in an image it is not used
    • resample set to default True as in older releases
    • model reloading per image turned off in CLI and class so that model is faster
    • optional _masks.tif loading in GUI
    • warning for user if masks are to be saved in np.uint32
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Jan 19, 2022)

    • now install omnipose with pip! pip install omnipose
    • added PR #416 which removed global logging settings, now turn on logging in a notebook with from cellpose.io import logger_setup; logger,log_file=logger_setup(), and from the command line with --verbose
    • added support for >2^16 masks with np.uint32, if there are <2^16 masks then the masks are returned as np.uint16 still
    • fixed bug with torch.long on windows
    Source code(tar.gz)
    Source code(zip)
  • v0.7.3(Nov 19, 2021)

  • v0.7.2(Nov 18, 2021)

    Introducing Omnipose, a collaboration between the Stringer, Wiggins, and Mougous labs written by @kevinjohncutler. Read more about it in our preprint and on the Omnipose README. Important new features are:

    • cyto2_omni model for slight improvement over the 'cyto2' Cellpose model
    • bact_omni model for bacteria phase contrast segmentation (huge improvement over Cellpose models trained on bacteria, which you can demo with the bact model)
    • omni option to use Omnipose mask reconstruction with your Cellpose model to help reduce over-segmentation (off by default)
    • cluster option to force DBSCAN clustering in Omnipose mask reconstruction. This is off by default and turned on automatically when the average cell diameter is less than diam_threshold. Note theat scikit-learn is necessary for DBSCAN, and a CLI prompt will ask you to download it when you run --omni.

    Several saving options have been included as well:

    • in_folders saves outputs into separate folders named masks, outlines, etc. (off by default)
    • dir_above saves output in the directory above the image directory (useful to have images next to masks etc.) (off by default)
    • save_txt turns on ImageJ outline saving (now off by default)
    • save_ncolor uses @kevinjohncutler's N-color algorithm to save masks with repeating but non-touching integers (typically 4 or fewer, 5 or 6 when necessary), which allows segmentations of thousands of cells to be presented without as many colors (which can become very hard to distinguish otherwise). Use in combination with a color map to visualize output.

    Several bug fixes and pull requests are included in this release as well.

    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Jan 31, 2021)

  • v0.6(Dec 21, 2020)

    Pytorch is now the default deep neural network software for cellpose. Mxnet will still be supported. To install mxnet (CPU), run pip install mxnet-mkl. To use mxnet in a notebook, declare torch=False when creating a model, e.g. model = models.Cellpose(torch=False). To use mxnet on the command line, add the flag --mxnet, e.g. python -m cellpose --dir ~/images/ --mxnet. The pytorch implementation is 20% faster than the mxnet implementation when running on the GPU and 20% slower when running on the CPU.

    Dynamics are computed using bilinear interpolation by default instead of nearest neighbor interpolation. Set interp=False in model.eval to turn off. The bilinear interpolation will be slightly slower on the CPU, but it is faster than nearest neighbor if using torch and the GPU is enabled.

    Source code(tar.gz)
    Source code(zip)
  • v0.5(Nov 30, 2020)

  • v0.1.0.1(Oct 1, 2020)

    • automated testing implemented
    • dynamics are run at rescaled size (will be faster for images with cells larger than 30 pixels in diameter)
    • pyinstaller binaries created from this release
    Source code(tar.gz)
    Source code(zip)
  • v0.0.3.1(Aug 30, 2020)

  • v0.0.1.25(Apr 2, 2020)

  • v0.0.1.23(Mar 7, 2020)

    on pypi.

    • fixed bug with running in notebook with single channel files

    added

    • 3D labelling
    • command line interface for running in batch
    • color inversion option in gui
    • user can input diameter in pixels instead of "rescale"
    Source code(tar.gz)
    Source code(zip)
Owner
MouseLand
collaborative analysis of neural recordings
MouseLand
LIVECell - A large-scale dataset for label-free live cell segmentation

LIVECell dataset This document contains instructions of how to access the data associated with the submitted manuscript "LIVECell - A large-scale data

Sartorius Corporate Research 112 Jan 7, 2023
Kaggle: Cell Instance Segmentation

Kaggle: Cell Instance Segmentation The goal of this challenge is to detect cells in microscope images. with simple view on how many cels have been ann

Jirka Borovec 9 Aug 12, 2022
Solution of Kaggle competition: Sartorius - Cell Instance Segmentation

Sartorius - Cell Instance Segmentation https://www.kaggle.com/c/sartorius-cell-instance-segmentation Environment setup Build docker image bash .dev_sc

null 68 Dec 9, 2022
A scanpy extension to analyse single-cell TCR and BCR data.

Scirpy: A Scanpy extension for analyzing single-cell immune-cell receptor sequencing data Scirpy is a scalable python-toolkit to analyse T cell recept

ICBI 145 Jan 3, 2023
pcnaDeep integrates cutting-edge detection techniques with tracking and cell cycle resolving models.

pcnaDeep: a deep-learning based single-cell cycle profiler with PCNA signal Welcome! pcnaDeep integrates cutting-edge detection techniques with tracki

ChanLab 8 Oct 18, 2022
A lightweight Python-based 3D network multi-agent simulator. Uses a cell-based congestion model. Calculates risk, loudness and battery capacities of the agents. Suitable for 3D network optimization tasks.

AMAZ3DSim AMAZ3DSim is a lightweight python-based 3D network multi-agent simulator. It uses a cell-based congestion model. It calculates risk, battery

Daniel Hirsch 13 Nov 4, 2022
7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle

kaggle-hpa-2021-7th-place-solution Code for 7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle. A description of the met

null 8 Jul 9, 2021
Learning cell communication from spatial graphs of cells

ncem Features Repository for the manuscript Fischer, D. S., Schaar, A. C. and Theis, F. Learning cell communication from spatial graphs of cells. 2021

Theis Lab 77 Dec 30, 2022
Message Passing on Cell Complexes

CW Networks This repository contains the code used for the papers Weisfeiler and Lehman Go Cellular: CW Networks (Under review) and Weisfeiler and Leh

Twitter Research 108 Jan 5, 2023
A Parameter-free Deep Embedded Clustering Method for Single-cell RNA-seq Data

A Parameter-free Deep Embedded Clustering Method for Single-cell RNA-seq Data Overview Clustering analysis is widely utilized in single-cell RNA-seque

AI-Biomed @NSCC-gz 3 May 8, 2022
Single Red Blood Cell Hydrodynamic Traps Via the Generative Design

Rbc-traps-generative-design - The generative design for single red clood cell hydrodynamic traps using GEFEST framework

Natural Systems Simulation Lab 4 Jun 16, 2022
RL algorithm PPO and IRL algorithm AIRL written with Tensorflow.

RL algorithm PPO and IRL algorithm AIRL written with Tensorflow. They have a parallel sampling feature in order to increase computation speed (especially in high-performance computing (HPC)).

Fangjian Li 3 Dec 28, 2021
Implement object segmentation on images using HOG algorithm proposed in CVPR 2005

HOG Algorithm Implementation Description HOG (Histograms of Oriented Gradients) Algorithm is an algorithm aiming to realize object segmentation (edge

Leo Hsieh 2 Mar 12, 2022
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP

Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se

Daniil Pakhomov 134 Dec 19, 2022
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

yifan liu 147 Dec 3, 2022
Realtime segmentation with ENet, the fast and accurate segmentation net.

Enet This is a realtime segmentation net with almost 22 fps on GTX1080 ti, and the model size is very small with only 28M. This repo contains the infe

JinTian 14 Aug 30, 2022
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
nnFormer: Interleaved Transformer for Volumetric Segmentation Code for paper "nnFormer: Interleaved Transformer for Volumetric Segmentation "

nnFormer: Interleaved Transformer for Volumetric Segmentation Code for paper "nnFormer: Interleaved Transformer for Volumetric Segmentation ". Please

jsguo 610 Dec 28, 2022
Mae segmentation - Reproduction of semantic segmentation using masked autoencoder (mae)

ADE20k Semantic segmentation with MAE Getting started Install the mmsegmentation

null 97 Dec 17, 2022