Skip to main content

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.

docs python-package manuscript

NCALab Logo

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
  • 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

NCALab Logo

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

ncalab-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncalab-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for ncalab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c10e6dd1cf54438eaa292b2503d9b58403ab8a8d040f3d11eb1b2d0a66bd508e
MD5 5fc1245d9ce51a56249b156bff01f8f7
BLAKE2b-256 65a2facdc6e4b96e22633d4728f5c8faee02174f9f74644adfc220b942c09698

See more details on using hashes here.

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

Hashes for ncalab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe945842e8d3082f1d952020e3a73398811c89851c20a3dc100c63c4ef36ae7
MD5 368faf0abc84501ae6e541fd9e99c3a0
BLAKE2b-256 464a917b79c36811d0d22d660d2b3a07ab037015101d7775b44cdcd7cbd26348

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page