Featured open source · Bio-inspired computer vision / 2026
NeuroSight
Motion detection, inspired by a fly.
A lightweight Python motion-detection library that translates the Drosophila optic-lobe circuit into an explainable, CPU-friendly vision pipeline.
01Frame pair
The detector accepts consecutive video frames through a frame-by-frame API or streams them from a video source. OpenCV handles video I/O and image preparation.
02ON / OFF signals
Brightness changes are separated into pathways analogous to the fly visual system: T4 neurons respond to moving bright edges and T5 neurons to moving dark edges.
03Temporal delay
Medulla-inspired channels provide delayed and current signals. This time offset lets a neighboring-pixel correlation distinguish motion from a static contrast edge.
04Direction correlation
A Hassenstein–Reichardt-style correlator combines delayed and undelayed neighboring signals. Pre-extracted, normalized connectome weights shape the four cardinal direction responses.
05Motion outputs
The public API returns a normalized saliency map plus tile-level vectors containing dominant direction, confidence, and spatial coordinates. Video output can overlay the vectors.
↳ Bright-edge motion → ON pathway / dark-edge motion → OFF pathway → four directional responses → saliency and vectors.
Problem & context
Robotics and edge-vision systems often need a fast indication of where motion is happening and which way it is moving. Large learned optical-flow models can add memory, accelerator, and deployment costs. NeuroSight explores a different trade-off: translate a compact biological motion circuit into deterministic array operations that remain inspectable.
Biological model
The implementation is based on the fly optic lobe. T4 and T5 pathways cover moving bright and dark edges, with four subtypes representing the cardinal directions. The project documents synapse counts extracted from the Drosophila hemibrain connectome through neuprint and normalized into correlator weights. This is a software abstraction inspired by that circuit, not a complete simulation of fly vision.
Implementation
NumPy performs the signal and correlation operations while OpenCV handles frames, cameras, and video files. The Hassenstein–Reichardt mechanism multiplies a delayed response at one location with a current response at a neighbor; comparing opposing correlations produces direction-selective responses. Results are aggregated into spatial tiles and exposed as a saliency array and directional-vector dictionary.
Evaluation & testing
The supplied résumé reports complete cardinal-direction accuracy on synthetic tests and 36 unit tests. The public repository contains a test suite and documents typed, tested packaging, but those exact results were not independently rerun during this portfolio change. Synthetic direction tests verify controlled motion patterns; they do not establish accuracy on every camera, scene, or robotics task.
Performance
The repository reports 45–50 FPS, 20–25 ms latency, and 15 MB memory for 1280×720 video on an Intel i7-12700K, alongside comparisons with OpenCV OpticalFlow and TensorFlow RAFT. These are maintainer-published measurements under that stated setup, not measurements reproduced by this portfolio. The package is published on PyPI and requires Python 3.10 or newer.
Failure modes & limits
A compact correlation model trades dense optical-flow precision for simplicity. Tile size controls spatial detail; coarse tiles can hide small motion, while smaller tiles increase work and noise sensitivity. Camera motion, flicker, low contrast, occlusion, and parameters that do not match the frame rate can weaken the directional signal. The library is complementary to optical flow rather than a universal replacement.
Where it can go next
The saliency and vector outputs provide a base for collision avoidance, looming cues, and time-to-contact experiments. Stronger next steps include repeatable benchmarks across ARM hardware, real-world annotated motion sequences, sensitivity analysis for tile size and temporal constants, and comparisons that publish scripts and raw results alongside summary tables.
Engineering decision records
01 / Use a biological correlator instead of a trained model
Context. The goal was a small, explainable motion primitive that could run without a GPU or model download.
Decision. Implement a Hassenstein–Reichardt-style correlation pipeline with connectome-derived directional weights.
Trade-off. The signal path stays inspectable and portable, while giving up the dense accuracy and scene-level learning available to larger optical-flow models.
02 / Expose saliency and structured vectors
Context. A heatmap is useful for visualization, but downstream robotics code also needs direction and location.
Decision. Return both a normalized saliency map and tile-level direction, confidence, and coordinates.
Trade-off. The same detector supports visual overlays and programmatic reactions, with tile resolution becoming an explicit accuracy/performance trade-off.
03 / Bundle extracted weights
Context. Requiring a connectome service at runtime would make a small motion library fragile and hard to deploy at the edge.
Decision. Ship the pre-extracted biological weights with the package and keep runtime processing local.
Trade-off. Installation and inference stay self-contained, while weight provenance and future connectome updates must be maintained in the repository.