--- id: cellpose version: "4.2.1.1" license: BSD license_treatment: permissive maintenance: active --- # cellpose — anatomical segmentation algorithm License: permissive · Maintenance: active · Downloads: 115.7K/mo ## What it is and what it does Cellpose is a deep-learning-based segmentation tool designed for identifying cells and nuclei in microscopy images. It combines a generalist neural network backbone with support for custom model training, allowing users to adapt it to their own data without extensive ML expertise. The package handles challenging real-world imaging conditions—shot noise, blur, undersampling, contrast inversions, variable channel order, and mixed object sizes—and works in both 2D and 3D. The latest version integrates segment_anything for improved generalization and includes image restoration capabilities to clean up noisy or degraded input before segmentation. You can use pre-trained models out of the box, fine-tune them on labeled data via human-in-the-loop training, or run batch processing through the web interface. The package ships with a GUI, command-line tools, and a Python API, making it accessible for both interactive exploration and automated pipelines. Use it for: - Segment cell nuclei and cytoplasm in fluorescence microscopy images for quantitative analysis. - Process 3D volumetric data from confocal or light-sheet microscopy with orthogonal refinement. - Fine-tune a pre-trained model on your own labeled dataset to improve accuracy for specific cell types or imaging modalities. - Restore degraded microscopy images before segmentation to improve mask quality. - Batch-process large image collections via the Hugging Face web interface without local GPU setup. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cellpose segments cells and nuclei in microscopy images using deep learning, with support for 2D/3D data, custom model training, and image restoration. Yes, if you work with microscopy image segmentation. Cellpose is actively maintained, well-documented, and handles real-world imaging challenges. Install friction is low for standard ML environments. Note that pre-trained models are CC-BY-NC licensed; if commercial use of those models is required, verify licensing implications. No known security vulnerabilities. ## Install pip install cellpose uv add cellpose poetry add cellpose ## Installing cellpose Before you install: Low friction wheel distribution. Active maintenance with recent release. Requires torch and torchvision, which are substantial dependencies but standard for ML workflows. 13 runtime dependencies including image I/O and computer vision libraries. License in practice: BSD permissive license. Training data and models are CC-BY-NC licensed, which restricts commercial use of those artifacts—relevant if you plan to use or redistribute the pre-trained models commercially. Quickstart: pip install cellpose import cellpose from cellpose import models model = models.Cellpose(model_type='cyto3') masks, flows, styles = model.eval(images, channels=[0,0]) Requires torch and torchvision; GPU drivers and CUDA libraries recommended for performance. At least 8GB RAM; 16GB-32GB may be required for larger images and 3D volumes. Verify before relying: - Whether pre-trained model download happens automatically or requires manual setup on first use. - Memory and compute requirements for typical 3D segmentation workflows. - Compatibility with Apple Silicon (MPS) for mask creation in 2D/3D. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 115.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cell segmentation microscopy, nucleus detection deep learning, image segmentation biological, 3D cell segmentation, microscopy image analysis, automated cell detection, custom model training segmentation, microscopy-image-analysis, cell-segmentation, deep-learning [View on SkillFed](https://skillfed.io/packages/cellpose) · [View on PyPI](https://pypi.org/project/cellpose/)