Metadata-Version: 2.4
Name: ncalib
Version: 0.1.2
Summary: Modular Python Library for Neural Cellular Automata
Author: Dominik Woiwode
Author-email: Dominik Woiwode <woiwode@tnt.uni-hannover.de>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: flatten-dict>=0.4.2
Requires-Dist: gitpython>=3.1.45
Requires-Dist: hydra-core>=1.3.2
Requires-Dist: importlib-metadata>=8.7.0
Requires-Dist: jaxtyping>=0.2.36
Requires-Dist: lightning>=2.5.2
Requires-Dist: matplotlib>=3.9.4
Requires-Dist: numpy>=2.0.2
Requires-Dist: omegaconf>=2.3.0
Requires-Dist: opencv-python>=4.11.0.86
Requires-Dist: tensordict>=0.9.1
Requires-Dist: torch>=2.8.0
Requires-Dist: torchvision>=0.23.0
Requires-Dist: tqdm>=4.67.1
Requires-Dist: wandb ; extra == 'wandb'
Requires-Dist: hydra-slurm-rich-launcher ; extra == 'wandb'
Requires-Python: >=3.9
Provides-Extra: wandb
Description-Content-Type: text/markdown

# ncalib
A modular Python Library for handling Neural Cellular Automata.

## Features

- Modular architecture for Neural Cellular Automata
- Easy-to-use API for building and training NCA models
- Extensible framework for custom implementations


## Quickstart
### Installation

Install ncalib from PyPI using pip:

```bash
pip install ncalib
```
Some examples and loggers are using [Weights and Biases](https://wandb.ai/). To use them install the required dependencies using:
```bash
pip install ncalib[wandb]
```
### Examples
Examples are found in ``examples``. Currently there are following implementations:
- [simple_nca.py](/examples/simple_nca.py) - Original NCA reconstructing an image ([Mordvintsev et al. (2020)](https://distill.pub/2020/growing-ca/))
- [simple_classifying_mnist.py](/examples/self_classifying_mnist.py) - Self-classicying MNIST Digits ([Randazzo et al. (2020)](https://distill.pub/2020/selforg/mnist/) )
- [image_segmentation.py](/examples/image_segmentation.py)/[image_segmentation_hydra.py](/examples/image_segmentation_hydra.py) - NCA that can segment an image (with and without hydra) ([Sandler et al. (2020)](https://arxiv.org/abs/2008.04965))
- [genome_nca.py](/examples/genome_nca.py) - NCA that can be seeded with different genomes ([Stovold (2023)](https://arxiv.org/abs/2305.12971))


## Development

This project uses [uv](https://docs.astral.sh/uv/) for package management and distribution.

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/dwoiwode/ncalib.git
cd ncalib

# Install dependencies with uv
uv sync

# Install extra dependencies
uv sync  --all-extras
```

### Running Tests

Tests are run using pytest:

```bash
uv run pytest tests
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Links

- [PyPI Package](https://pypi.org/project/ncalib/)
- [GitHub](https://github.com/dwoiwode/ncalib)
- [Issues](https://github.com/dwoiwode/ncalib/issues)