MesoNet: Difference-of-Gaussians latency encoder

DoG branch, different from bipolar TSC. flat image vs one sharp edge would be a useful tiny check—esp if thresholding leaves no latency events

reference implementation: imgClassifierSDNN/src/dog_filter.py, explicitly attributed in the code to the Kheradpisheh et al. STDP object-recognition work. This is a different preprocessing/encoding branch from the bipolar temporal-switch experiment.

processing sequence: load image → grayscale → resize → correlate with the DoG filter → zero a five-pixel border → retain responses at least 15 → convert magnitudes to inverse-response latencies → sort → discard infinite latencies → allocate events across the time axis. The saved main.py uses DoG_params = {'img_size': (250, 160), 'DoG_size': 7}.

function map: dog(size, s1, s2) constructs the difference of Gaussians and normalizes it; dog_filter(...) returns the image-shaped spike-time tensor. CPU and CUDA normalization functions are present, but the shown calls are commented out and img_out = img is active.

review questions: what happens for a fully thresholded/empty image, where the latency list has zero length? Is the uint8 time-index representation large enough for the configured sequence? Preserve which preprocessing branch and normalization state was used when comparing results.

saved paper identifier: arXiv:1611.01421 appears in the source docstring; use the original paper alongside the imported implementation.

DoG and latency preprocessing
DoG and latency preprocessing