|
| 1 | +# Datasets & Stimuli used in BindsNET |
| 2 | + |
| 3 | +BindsNET ships **no** third-party datasets. Its dataset loaders fetch data from the |
| 4 | +upstream sources declared below; all licenses are the upstream providers' and BindsNET |
| 5 | +does not redistribute the data. This file declares every dataset and synthetic stimulus |
| 6 | +referenced by the shipped examples and benchmarks, plus the additional dataset loaders |
| 7 | +the library provides. |
| 8 | + |
| 9 | +> Licenses below are pointers to the upstream source, not assertions by BindsNET. |
| 10 | +> Confirm the current license at the source before using a dataset in your own work. |
| 11 | +
|
| 12 | +--- |
| 13 | + |
| 14 | +## 1. Datasets used by the shipped examples |
| 15 | + |
| 16 | +### MNIST |
| 17 | +- **Loader:** `from bindsnet.datasets import MNIST` — a thin wrapper over |
| 18 | + `torchvision.datasets.MNIST` (`bindsnet/datasets/torchvision_wrapper.py`). |
| 19 | +- **Upstream source:** torchvision → http://yann.lecun.com/exdb/mnist/ |
| 20 | +- **Version/snapshot:** whatever the installed `torchvision` resolves (mirror-hosted). |
| 21 | +- **Obtained by:** automatic download on first run (`download=True` in the examples). |
| 22 | +- **License:** as published by the upstream/torchvision mirror (verify upstream). |
| 23 | +- **Used in:** `examples/mnist/*.py` |
| 24 | + (e.g. `eth_mnist.py`, `batch_eth_mnist.py`, `supervised_mnist.py`, `conv_mnist.py`, |
| 25 | + `reservoir.py`, `MCC_reservoir.py`, `conv1d_MNIST.py`, `conv3d_MNIST.py`, |
| 26 | + `loc1d_mnist.py`, `loc2d_mnist.py`, `loc3d_mnist.py`, `SOM_LM-SNNs.py`). |
| 27 | +- **Preprocessing → spikes:** `transforms.ToTensor()` then scaling by `--intensity` |
| 28 | + (default 128 in `eth_mnist.py`), then rate coding via |
| 29 | + `bindsnet.encoding.PoissonEncoder(time, dt)` — pixel intensities become Poisson |
| 30 | + spike trains over `time` ms at step `dt`. |
| 31 | + |
| 32 | +### Atari — Breakout (and Space Invaders) |
| 33 | +- **Loader:** `bindsnet.environment.GymEnvironment("BreakoutDeterministic-v4")` |
| 34 | + (see `examples/breakout/*.py`). |
| 35 | +- **Upstream source:** Arcade Learning Environment via `gymnasium[atari]` + `ale-py` |
| 36 | + (declared in `pyproject.toml`). ROMs are provided through the ALE/AutoROM tooling. |
| 37 | +- **Obtained by:** the Gymnasium/ALE runtime; not stored in this repo. |
| 38 | +- **License:** ALE/ROM licensing applies (verify via ale-py / AutoROM). |
| 39 | +- **Used in:** `examples/breakout/breakout.py`, `breakout_stdp.py`, |
| 40 | + `play_breakout_from_ANN.py`, `random_baseline.py`, `random_network_baseline.py`. |
| 41 | +- **Preprocessing → spikes:** Atari observations are converted to network input by the |
| 42 | + example pipelines (see each script and `bindsnet/encoding/`). |
| 43 | +- **Pretrained artifact:** `examples/breakout/trained_shallow_ANN.pt` (a Breakout |
| 44 | + Q-network transplanted into an SNN) — provenance in |
| 45 | + [examples/breakout/README.md](examples/breakout/README.md). |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 2. Synthetic stimuli (no external dataset) |
| 50 | + |
| 51 | +### Scaling-benchmark Poisson drive |
| 52 | +Used by `examples/benchmark/benchmark.py` and reported in the README "Benchmarking" |
| 53 | +section and Hazan et al. 2018: |
| 54 | +- Population of **n** Poisson input neurons, firing rates drawn from **U(0, 100) Hz**. |
| 55 | +- Connected all-to-all to an equally sized population of LIF neurons; connection |
| 56 | + weights sampled from **N(0, 1)**. |
| 57 | +- **n** varied 250 → 10,000 in steps of 250; each run simulated **1,000 ms** at |
| 58 | + **dt = 1.0 ms**. |
| 59 | + |
| 60 | +This stimulus is generated programmatically; there is no dataset to download. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## 3. Additional dataset loaders provided by the library |
| 65 | + |
| 66 | +These loaders are part of `bindsnet.datasets` and are available to users, though not |
| 67 | +every one is exercised by a shipped example. Sources are taken directly from the loader |
| 68 | +modules. |
| 69 | + |
| 70 | +| Dataset | Loader | Upstream source | Notes | |
| 71 | +|---------|--------|-----------------|-------| |
| 72 | +| Spoken MNIST (Free Spoken Digit Dataset) | `bindsnet.datasets.SpokenMNIST` (`spoken_mnist.py`) | https://github.com/Jakobovski/free-spoken-digit-dataset (downloads `master.zip`) | License per upstream repo | |
| 73 | +| ALOV300++ | `bindsnet.datasets.ALOV300` (`alov300.py`) | frames `http://isis-data.science.uva.nl/alov/alov300++_frames.zip`, GT text `http://isis-data.science.uva.nl/alov/alov300++GT_txtFiles.zip`; info `http://alov300pp.joomlafree.it/dataset-resources.html` | Visual-tracking dataset | |
| 74 | +| DAVIS 2017 | `bindsnet.datasets.Davis` (`davis.py`) | https://davischallenge.org/davis2017/code.html | Video object segmentation | |
| 75 | +| Other torchvision datasets | `create_torchvision_dataset_wrapper(...)` (`torchvision_wrapper.py`) | torchvision | Wrappers exported for CIFAR10/100, FashionMNIST, EMNIST, KMNIST, SVHN, STL10, Omniglot, VOC*, COCO*, etc. — each downloads from its torchvision-declared source | |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## Data handling notes |
| 80 | +- Datasets download to a user-specified `root` directory (the examples typically use a |
| 81 | + local `data/` path); they are **not** committed to this repository. |
| 82 | +- BindsNET does not modify or redistribute upstream data; it applies encodings |
| 83 | + (`bindsnet/encoding/`) to turn inputs into spike trains at simulation time. |
| 84 | +- If a download URL has moved, consult the loader module in `bindsnet/datasets/` and the |
| 85 | + upstream project page listed above. |
0 commit comments