cellstate-pred
A Python package for cell segmentation from drug assays and inference with pretrained deep learning models.
Overview
cellstate-pred is designed to analyze microscopy images from drug screening assays by automatically segmenting individual cells and extracting morphological features using pretrained deep learning models. The package provides tools for:
- Cell Segmentation: Automated segmentation of cells from microscopy images using advanced image processing techniques
- Feature Extraction: Extraction of morphological features from segmented cells using pretrained deep learning models
- Drug Assay Analysis: Specialized workflows for analyzing cellular responses in drug screening experiments
Key Features
- Support for Opera microscope image formats
- Otsu thresholding and watershed segmentation for robust cell detection
- Integration with Hugging Face transformers for feature extraction
- Batch processing capabilities for high-throughput analysis
- Flexible data loading with PyTorch DataLoader integration
Installation
Requirements
- Python 3.10+
- Dependencies as specified in
pyproject.toml
Install from source
git clone https://github.com/rendeirolab/cellstate-pred.git
cd cellstate-pred
pip install -e .
Quick Start
from cellstate_pred.image_utils import OperaImage
from cellstate_pred._inference import inference
from pathlib import Path
# Load and segment cells from a microscopy image
image = OperaImage()
image.load_image("path/to/your/image.tiff")
image.segment_cells(min_distance=7)
# Extract features using a pretrained model
inference(
batch_size=32,
image=image,
model_name="microsoft/resnet-50",
output_dir=Path("./features"),
num_workers=4
)
Documentation
For detailed usage examples and API documentation, see the notebooks in the scripts/ directory.
Contributing
This repository was created with a cookiecutter template, version 0.4.1dev.
License
[Add your license information here]
Metadata
Release files for cellstate-pred 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cellstate_pred-0.1.0.tar.gz | 587.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cellstate_pred-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 597.2 kB
Release files / cellstate_pred-0.1.0.tar.gz
| Download URL | cellstate_pred-0.1.0.tar.gz |
|---|---|
| Size | 587.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eded165ae823e7c28fd2a6c784aebf1aace92d78f08d88da45c55ea38a66662e
|
|
BLAKE2b-256 checksum How to use checksums |
66e64b547a30bd9fdb417a6cc52e6a8be7959a9e20e57d110a95b130f4358bee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|
Release files / cellstate_pred-0.1.0-py3-none-any.whl
| Download URL | cellstate_pred-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a6143f025cd253643ec0434218595c25682c749cc5feea33466980959092cc0
|
|
BLAKE2b-256 checksum How to use checksums |
3f564e23575916131d3d4de62cb1499ca5686ebf4ffa959d824ba7d3d010308a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|