Skip to main content

A biosensor simulation toolkit.

Project description

PyPI - Version Read The Docs

🌄 Overview

Pyrception is a simulation framework for biosensors. Currently, it provides the base ingredients for simulating key parts of the structural and functional elements of visual processing observed in the mammalian retina. The long-term goal of Pyrception is to support multiple sensory modalities (such as auditory, olfactory and tactile), and to provide methods for integrating those inputs into a unified multisensory input signal (such as spike trains). Alongside this, Pyrception can also serve as an input conversion for encoding raw multimodal sensory input into a uniform spike train suitable for processing with spiking neural networks.

🪛 Installation

You can install Pyrception from PyPI:

pip install pyrception

or directly from GitHub (optionally in development mode):

git clone git@github.com:cantordust/pyrception.git
cd pyrception
pip install -e .

♻️ Optional dependencies

Pyrception supports several dependency groups:

  • cli: Command-line interface.
  • events: Support for processing events (including from event cameras).
  • dev: Development tools (for testing, profiling, etc.).
  • torch: PyTorch support.
  • ipy: ipykernel & ipywidgets (for running inside notebooks).
  • docs: Tools for building the documentation.
  • all: All of the above.

Use the --group with pip to enable a dependency group (repeat for each group). For instance:

pip install -e . --group events --group docs

will pull in all dependencies necessary for event-based input and building the documentation.

⏯️ Usage

Please refer to the documentation, which contains step-by-step notebooks demonstrating how to use Pyrception with a static image and an RGB video. More notebooks are currently being developed, including sparse event input from an event camera. Stay tuned.

📈 Development

Please open an issue if you discover a bug, feature. That said, contributions are welcome!

To generate and view the documentation locally, clone the repository and run the MkDocs build pipeline (note that you have to install Pyrception with the docs dependency group):

git clone git@github.com:cantordust/pyrception.git
cd pyrception
pip install -e . --group docs
mkdocs build

Then, to view the documentation locally, start the MkDocs server:

mkdocs serve

📋 ToDo

Short-term

👁️ Visual package

  • All major types of retinal cells.
    • Receptors (raw input, Weber's law).
    • Horizontal cells (mean local brightness, normalising feedback).
    • Bipolar cells (positive and negative contrast, temporal filter, excitatory input to ganglion cells).
    • Amacrine cells (inhibitory input to ganglion cells, modulatory signal to bipolar cells).
    • Ganglion cells (spiking).
  • Logpolar kernel arrangement.
  • Uniform or Gaussian kernels.
  • Arbitrary kernel, size, shape and orientation.
  • 🚧 Colour vision (with colour opponency).
  • 🚧 Temporal dynamics.
  • 🚧 Events as input.
  • Saccadic movements.

👂 Auditory package

WIP.

👃 Olfactory package

WIP.

🔧 Others

  • 🚧 Support alternative backends for sparse matrix operations (CuPy, PyTorch, Sparse).
  • 🚧 Interfacing with (neuromorphic) hardware, such as event cameras.

Contributing to Pyrception

Please read the contribution guide

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

pyrception-0.3.4.post3.tar.gz (32.4 MB view details)

Uploaded Source

Built Distribution

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

pyrception-0.3.4.post3-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file pyrception-0.3.4.post3.tar.gz.

File metadata

  • Download URL: pyrception-0.3.4.post3.tar.gz
  • Upload date:
  • Size: 32.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyrception-0.3.4.post3.tar.gz
Algorithm Hash digest
SHA256 90ec7f68a58c2eb85e11e0c6542aa466b4435d78b772b81ce59bb5bcf28bb8ec
MD5 6756239276f063a85acffabb5069c929
BLAKE2b-256 dbba0cbac75d3bca82f3f31a76c54481f37695fd5d17c6847e18c581d8e39f04

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrception-0.3.4.post3.tar.gz:

Publisher: pypi.yml on cantordust/pyrception

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrception-0.3.4.post3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyrception-0.3.4.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 eeadf0b8407e628e05e5e332e010a50a9fc73159504b8059f3f733c7f5d28d00
MD5 110e0b27f8325c867db77ce1f0765b34
BLAKE2b-256 d322c808608771ce7e785bf1b8441e8823eccbb9a5f8595b4fe6b120626394c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrception-0.3.4.post3-py3-none-any.whl:

Publisher: pypi.yml on cantordust/pyrception

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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