Skip to main content

PCNN

Python implementation of the Pulse Coupled Neural Network (PCNN) alongside multiple variations:

  • Classical PCNN
  • Feature Linking Model (FLM)
  • Intersecting Cortical Model (ICM)
  • Multi Linking Model (MLM)
  • Spiking Cortical Model (SCM)
  • Sigmoidal Linking Model (SLM)

Install:

pip install pulse_coupled_nn

Usage example:

import numpy as np
import matplotlib.pyplot as plt

from pulse_coupled_nn import FLM
from pulse_coupled_nn import ICM
from pulse_coupled_nn import ClassicalPCNN
from pulse_coupled_nn import SCM
from pulse_coupled_nn import SLM


def run_image_segm(gamma=1, beta=2, v_theta=400, kernel_size=3, kernel='gaussian'):

    image = np.array(
        [[230, 230, 230, 230, 115, 115, 115, 115],
        [230, 230, 230, 230, 115, 115, 115, 115],
        [230, 230, 205, 205, 103, 103, 115, 115],
        [230, 230, 205, 205, 103, 103, 115, 115],
        [230, 230, 205, 205, 103, 103, 115, 115],
        [230, 230, 230, 230, 115, 115, 115, 115],
        [230, 230, 230, 230, 115, 115, 115, 115]]
    )

    model = ClassicalPCNN(image.shape, kernel, kernel_size=kernel_size)
    segm_image = model.segment_image(image, gamma=gamma, beta=beta, v_theta=v_theta, kernel_type='gaussian')

    plt.imshow(image)
    plt.colorbar()
    plt.show()

    plt.imshow(segm_image)
    plt.colorbar()
    plt.show()


run_image_segm()

Metadata

Release files for pulse-coupled-nn 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulse-coupled-nn 0.0.6
File Size Uploaded Provenance Actions
pulse_coupled_nn-0.0.6.tar.gz 6.4 kB Without provenance Details for pulse_coupled_nn-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pulse-coupled-nn 0.0.6
File Interpreter ABI Platform Actions
pulse_coupled_nn-0.0.6-py3-none-any.whl Python 3 none any Details for pulse_coupled_nn-0.0.6-py3-none-any.whl

Total release size: 25.8 kB

Release files / pulse_coupled_nn-0.0.6.tar.gz

Download URL pulse_coupled_nn-0.0.6.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5c9558144efc17ecfeb2b9dfc1eb74e2ffc3415579e7fc696af53d73b1d9a749
BLAKE2b-256 checksum
How to use checksums
4330b8f50bd777d3846d133d3e6b1dddfa0593488ca4389539564ee265736fae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / pulse_coupled_nn-0.0.6-py3-none-any.whl

Download URL pulse_coupled_nn-0.0.6-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
397bb0d458b5a56c385fe4ff8430dbf5723541f5db6d4a1121b7a052ac063d99
BLAKE2b-256 checksum
How to use checksums
215a26a1c0f9a0883e07ba463504b9d9adab03c5ef8822670ef92a532bbe5dac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Security for pulse-coupled-nn 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page