Metadata-Version: 2.4
Name: acia
Version: 0.4.0
Summary: The acia library provides utility functionality for analyzing 2D+t time-lapse image sequences in microfluidic live-cell imaging experiments.
Author-email: Johannes Seiffarth <j.seiffarth@fz-juelich.de>
License-Expression: MIT
Project-URL: Homepage, https://github.com/SMLCI/acia-core
Project-URL: Repository, https://github.com/SMLCI/acia-core
Project-URL: Documentation, https://smlci.github.io/acia-core
Keywords: acia,image-analysis,cell-tracking,segmentation,microscopy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: shapely>=2.0.0
Requires-Dist: tqdm>=4.61.2
Requires-Dist: opencv-python-headless>=4.5.5
Requires-Dist: rtree>=0.9.7
Requires-Dist: pillow>=8.3.1
Requires-Dist: scikit-learn>=1.0
Requires-Dist: scipy>=1.9
Requires-Dist: scikit-image>=0.19.1
Requires-Dist: seaborn>=0.11.2
Requires-Dist: roifile>=2021.6.6
Requires-Dist: tifffile>=2020.11.18
Requires-Dist: pycocotools>=2.0.7
Requires-Dist: pint>=0.18
Requires-Dist: pint-pandas>=0.5
Requires-Dist: papermill>=2.6.0
Requires-Dist: numpy>=1.23.1
Requires-Dist: rasterio>=1.3.6
Requires-Dist: retry>=0.9.2
Requires-Dist: imagecodecs
Requires-Dist: influxdb_client
Requires-Dist: ipywidgets>=8.0.0
Requires-Dist: plotly
Requires-Dist: fsspec>=2023.1.0
Requires-Dist: platformdirs>=3.0.0
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
Requires-Dist: imageio>=2.0
Requires-Dist: moviepy<2
Requires-Dist: statsmodels>=0.14
Provides-Extra: dev
Requires-Dist: ruff>=0.15.0; extra == "dev"
Requires-Dist: mypy>=1.19.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
Requires-Dist: pytest-sugar>=1.0.0; extra == "dev"
Requires-Dist: ipykernel>=6.0; extra == "dev"
Requires-Dist: coverage>=7.0.0; extra == "dev"
Requires-Dist: tox>=4.0.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Requires-Dist: bump-my-version>=0.20.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
Requires-Dist: myst-nb>=1.1; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
Requires-Dist: sphinx-design>=0.6; extra == "docs"
Requires-Dist: ipykernel>=6.0; extra == "docs"
Provides-Extra: report
Requires-Dist: nbconvert>=7.0; extra == "report"
Provides-Extra: omero
Requires-Dist: omero-py>=5.9.3; extra == "omero"
Provides-Extra: lineage
Requires-Dist: openlineage-python>=1.0; extra == "lineage"
Provides-Extra: notebook
Requires-Dist: ipywidgets>=8.0.0; extra == "notebook"
Provides-Extra: remote
Requires-Dist: smbprotocol>=1.10.0; extra == "remote"
Requires-Dist: keyring>=24.0.0; extra == "remote"
Provides-Extra: nd2
Requires-Dist: nd2>=0.10; extra == "nd2"
Provides-Extra: czi
Requires-Dist: aicspylibczi>=3.1; extra == "czi"
Provides-Extra: widget
Requires-Dist: anywidget>=0.9; extra == "widget"
Provides-Extra: cellpose
Requires-Dist: cellpose<4; extra == "cellpose"
Provides-Extra: cellpose-sam
Requires-Dist: cellpose>=4; extra == "cellpose-sam"
Provides-Extra: omnipose
Requires-Dist: omnipose==1.0.6; extra == "omnipose"
Requires-Dist: torch; extra == "omnipose"
Requires-Dist: torchvision; extra == "omnipose"
Requires-Dist: torchaudio; extra == "omnipose"
Requires-Dist: natsort; extra == "omnipose"
Requires-Dist: scipy==1.11.4; extra == "omnipose"
Provides-Extra: flowpose-rt
Requires-Dist: flowpose-rt; extra == "flowpose-rt"
Requires-Dist: torch; extra == "flowpose-rt"
Provides-Extra: stardist
Requires-Dist: stardist; extra == "stardist"
Requires-Dist: tensorflow; extra == "stardist"
Provides-Extra: microsam
Requires-Dist: micro_sam; extra == "microsam"
Provides-Extra: delta
Requires-Dist: delta-microscopy[torch-cpu]; extra == "delta"
Dynamic: license-file

# **Acia**: Automated single-cell image analysis

[![CI](https://github.com/SMLCI/acia-core/actions/workflows/ci.yml/badge.svg)](https://github.com/SMLCI/acia-core/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/acia.svg)](https://pypi.org/project/acia/)
[![Python versions](https://img.shields.io/pypi/pyversions/acia.svg)](https://pypi.org/project/acia/)
[![Docs](https://img.shields.io/badge/docs-github.io-blue)](https://smlci.github.io/acia-core)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Accio** 🪄 - and your single-cell insights appear - Not quite but - `acia` - and your single-cell insights appear to become much easier 😉

`acia` turns a 2D+t time-lapse microscopy file into quantitative single-cell
results. One API reads ND2, CZI, OME-TIFF and folders of TIFFs; physical units
travel with the data from load to result; eight state-of-the-art segmentation and
tracking backends plug in behind one call.

Built for microfluidic live-cell imaging, but nothing in it assumes cells — it
works for any objects you can detect in images.

## The first five minutes

```python
from acia import ureg
from acia.segm.open import open_sequence
from acia.segm.processor.omnipose import OmniposeSegmenter
from acia.analysis import extract_growth

src = open_sequence("experiment.nd2").position(0)      # ND2, CZI, TIFF, folders
src = src[::10, 256:768, 256:768]                      # lazy: subsample + crop
src = src.with_pixel_size(0.072 * ureg.micrometer)     # calibration travels along

overlay = OmniposeSegmenter()(src)                     # -> detections
table, growth, figure = extract_growth(overlay, src)   # -> µm², hours, 1/hour
```

That is a complete pipeline. `growth.doubling_time` comes back as a pint
quantity, not a bare float.

## What you get

- **One reader for every format.** `open_sequence()` dispatches ND2, CZI, TIFF
  stacks and folders of per-timepoint TIFFs to a lazy handle that reads metadata
  without touching pixels — so opening a 100 GB acquisition costs nothing. OMERO,
  SMB/SAMBA shares and S3 work through the same interface.
- **numpy-style slicing that never copies.** `src[::2, 100:200, 50:150, 0]`
  composes subsampling, cropping and channel selection into a lazy view.
- **Units that do not get lost.** Declare pixel size and frame interval once;
  they survive slicing, flow into detections as timestamps, and are picked up
  automatically by the property extractors. Results come out in µm² and hours.
- **Segmentation and tracking, swappable.** Cellpose, Cellpose-SAM, Omnipose,
  Contour Proposal Network, YOLO — and trackastra, ultrack, PyUAT, laptrack —
  behind a uniform call signature, with lazy model loading and GPU autorelease.
- **Visualization all the way to publication.** Segmentation and tracking
  overlays, scale bars, timestamps, annotated videos, lineage trees, and an
  interactive viewer that appears when you put a source at the end of a Jupyter
  cell.

## Installation

```bash
pip install acia
```

Optional readers and backends live behind extras — `acia[nd2]`, `acia[czi]`,
`acia[omero]`, `acia[remote]`, `acia[widget]`.

> **Note:** the segmentation backends are **mutually exclusive** — `cellpose`,
> `cellpose-sam` and `omnipose` pin conflicting versions, so install exactly one
> per environment. See the
> [installation guide](https://smlci.github.io/acia-core/installation.html).

## Documentation

Full documentation: **<https://smlci.github.io/acia-core>**

New here? The getting-started tutorials are runnable notebooks — open them on
Colab and nothing needs installing:

1. [Open your first file](docs/tutorials/01_open_your_first_file.ipynb) — one API for every format
2. [The sequence model](docs/tutorials/02_the_sequence_model.ipynb) — THWC and lazy slicing
3. [Look at your data](docs/tutorials/03_look_at_your_data.ipynb) — viewers, scale bars, videos
4. [Calibration and units](docs/tutorials/04_calibration_and_units.ipynb) — µm² instead of px²
5. [Segment and quantify](docs/tutorials/05_segment_and_quantify.ipynb) — the full pipeline to a growth rate

For complete published analyses built on `acia` — growth-rate quantification,
fluorescence co-culture characterization, single-cell oxygen response, and
scaling those across hundreds of sequences — see the companion
[acia-workflows](https://github.com/JuBiotech/acia-workflows)
collection.

## Developers

```bash
git clone https://github.com/SMLCI/acia-core.git
cd acia-core
pip install -e ".[dev]"

pytest
ruff check acia tests
```

To build the documentation locally (the first build downloads a ~20 MB sample
dataset and executes the tutorials):

```bash
pip install -e ".[docs,omnipose]" --use-pep517
make docs
```

Contributions are welcome — see [CONTRIBUTING.rst](CONTRIBUTING.rst).

## License

MIT — see [LICENSE](LICENSE).
