Training code and pre-trained models for Neural Cellular Automata on different datasets and tasks
Project description
NCALab
NCALab makes it easy to create Neural Cellular Automata (NCA) implementations for various downstream tasks, such as image segmentation, classification and generation.
Features
Features of NCALab include:
- Easy training and evaluation of NCA models
- Cascaded multi-scale training
- Tensorboard integration with default presets
- Training with k-fold cross-validation
- Convenience features: Fixing random seeds, selecting compute devices, data processing
Getting started
Perhaps the best way of getting started with NCALab is to take a look at the provided usage example tasks, starting with the Growing Emoji task.
Usage Example Tasks
So far, the following example tasks are implemented in NCALab:
- Image Generation:
- Growing NCA for emoji generation
- Training and evaluation
- Fine-tuning of a pre-trained emoji generator
- Hyperparameter search
- Growing NCA for emoji generation
- Image Classification:
- Self-classifying MNIST digits
- MedMNIST image classification (PathMNIST, BloodMNIST)
- Image Segmentation:
- Endoscopic polyp segmentation (Kvasir-SEG, public)
- Capsule endoscopic bleeding segmentation (KID2 dataset, proprietary)
- Monocular Depth Estimation
- Capsule endoscopic monocular depth estimation
You can find those example tasks inside the tasks/ directory and its subfolders.
A good starting point to get started with NCAs is the famous Growing Lizard emoji example.
python3 tasks/growing_emoji/train_growing_emoji.py
Run this script to generate a GIF of the trained model's prediction:
python3 tasks/growing_emoji/eval_growing_emoji.py
Installation
Run
pip install git+https://github.com/MECLabTUDA/NCAlab
to install the most recent version of NCALab. We recommend to install NCALab in a virtual environment.
Tensorboard integration
We recommend your training progress in Tensorboard. To launch tensorboard, run
tensorboard --logdir=runs
in a separate terminal. Once it is running, it should show you the URL the tensorboard server is running on, which is localhost:6006 by default. Alternatively, you may use the tensorboard integration of your IDE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncalab-0.1.0.tar.gz.
File metadata
- Download URL: ncalab-0.1.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c10e6dd1cf54438eaa292b2503d9b58403ab8a8d040f3d11eb1b2d0a66bd508e
|
|
| MD5 |
5fc1245d9ce51a56249b156bff01f8f7
|
|
| BLAKE2b-256 |
65a2facdc6e4b96e22633d4728f5c8faee02174f9f74644adfc220b942c09698
|
File details
Details for the file ncalab-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ncalab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbe945842e8d3082f1d952020e3a73398811c89851c20a3dc100c63c4ef36ae7
|
|
| MD5 |
368faf0abc84501ae6e541fd9e99c3a0
|
|
| BLAKE2b-256 |
464a917b79c36811d0d22d660d2b3a07ab037015101d7775b44cdcd7cbd26348
|