The other CNN: image processing via neighbor gossip
A Python library that implements 1988-era Cellular Neural Networks for edge and corner detection—no GPUs required, just scipy and template math.

What it does
PyCNN wraps Cellular Neural Networks (CNNs—not ConvNets) into a small Python library for classic image processing tasks. You feed it an image; it runs feedback-and-control templates over local neighborhoods and spits out edges, corners, diagonal lines, or inverted outputs. The API is dead simple: instantiate PyCNN(), call edgeDetection() or cornerDetection(), and collect your PNG.
The interesting bit The cleverness is all in the templates. Researchers have spent decades deriving coefficient matrices for specific visual operations; this library just applies them via ODE integration using scipy. It’s essentially a programmable physics emulator for a parallel computing paradigm that was designed for 10,000 fps hardware in 1988, now running in interpreted Python on your laptop.
Key highlights
- Ships with six built-in operations: edge detection, grayscale edge detection, corner detection, diagonal line detection, inversion, and optimal edge detection
- Exposes a
generalTemplates()method for plugging in custom A/B templates and bias values from the published CNN Template Library - Pure Python with only Pillow, NumPy, and SciPy dependencies; supports Python 2.7+ and 3.3+
- Has actual academic citations, including a 2015 IEEE paper on Python/Julia implementations of natural computing algorithms
- Includes visual examples showing time-evolution convergence (the README notes this “looks pretty cool”)
Caveats
- The README warns that some methods “might need more time point samples than default,” which means tuning
tis somewhat trial-and-error - No performance benchmarks or speed claims are provided; given the dependency stack, real-time 10,000 fps is obviously not happening here
- Last meaningful activity appears to be years ago based on the Travis CI and dependency versions cited
Verdict Grab this if you’re teaching or experimenting with analog-style parallel computing paradigms, or if you need a quick, dependency-light way to generate edge/corner maps without pulling in OpenCV or deep learning frameworks. Skip it if you need production computer vision at scale—this is a pedagogical and research tool, not a pipeline component.