tonic 1.3.4.dev18__tar.gz → 1.4.1.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/AUTHORS +1 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/ChangeLog +7 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/PKG-INFO +1 -1
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/nmnist.py +49 -2
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/PKG-INFO +1 -1
- tonic-1.4.1.dev4/tonic.egg-info/pbr.json +1 -0
- tonic-1.3.4.dev18/tonic.egg-info/pbr.json +0 -1
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/.coveragerc +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/.github/workflows/ci-pipeline.yml +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/.pre-commit-config.yaml +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/.readthedocs.yml +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/LICENSE.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/MANIFEST.in +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/README.md +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/Makefile +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/event-cameras/eventstream.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/event-cameras/framestream.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/event-cameras/receptive-fields.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/event-cameras/sampling-theorems.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/snn/neuron-models.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/snn/surrogates.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/tonic-logo-black.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/tonic-logo-white.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_static/tonic_favicon.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_templates/class_dataset.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/_templates/class_transform.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/about/about.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/about/info.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/about/prototype.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/about/release_notes.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/conf.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/datasets.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/README.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/README.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/plot_tobinarep.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/plot_toframe.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/plot_toimage.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/plot_totimesurface.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/representations/plot_tovoxelgrid.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/README.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_centercrop.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_crop_time.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_decimation.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_denoise.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_downsample.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_event.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_event_by_area.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_event_by_time.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_pixel.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_event_downsampling.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_merge_polarities.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_random_crop.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_random_flip_lr.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_random_flip_ud.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_random_time_reversal.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_refractory_period.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_spatial_jitter.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_time_jitter.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_uniform_noise.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_involved/communication_channels.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_involved/contribute.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_involved/getting_involved.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_started/getting_started.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_started/install.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/getting_started/nmnist.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/how-tos/how-tos.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/how-tos/loading-raw-events.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/how-tos/visualizing-data.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/how-tos/wrapping_own_data.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/index.md +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/make.bat +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/reading_material/design_choices.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/reading_material/intro-event-cameras.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/reading_material/intro-snns.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/reading_material/reading_material.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/reading_material/training-snns.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/requirements.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/transformations.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/batching.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/davis_data.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/fast_dataloading.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/large_datasets.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/slicing.ipynb +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/tutorials/tutorials.rst +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/requirements.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/setup.cfg +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/setup.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/dataset_utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/prototype_dataset_utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/requirements.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_audio_transforms.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_caching.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_chained_transforms.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_data/sample.aedat4 +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_data/sample_ncars.dat +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_data/sample_nmnist.bin +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_data/sample_stmnist.mat +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_datasets.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_dsec.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_io.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_prototype_datasets.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_representations.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_sliced_dataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_slicers.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_tonic_utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/test_transforms.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/test/utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/audio_transforms.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/cached_dataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/collation.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/dataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/asl_dvs.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/cifar10dvs.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/davisdataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/dsec.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/dvs_lips.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/dvsgesture.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/hsd.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/mvsec.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/ncaltech101.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/pokerdvs.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/s_mnist.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/tum_vie.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/datasets/visual_place_recognition.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/download_utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/crop.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/decimate.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/denoise.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/drop_event.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/drop_pixel.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/event_downsampling.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/refractory_period.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/spatial_jitter.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/time_jitter.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/time_skew.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/to_averaged_timesurface.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/to_bina_rep.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/to_frame.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/to_timesurface.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/to_voxel_grid.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/functional/uniform_noise.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/io.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/README.md +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/ncars.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/nmnist.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/prophesee.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/stmnist.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/utils/__init__.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/utils/_dataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/datasets/utils/_utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/prototype/slicers.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/sliced_dataset.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/slicers.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/transforms.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic/utils.py +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic-logo-padded.png +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/SOURCES.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/dependency_links.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/not-zip-safe +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/requires.txt +0 -0
- {tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/tonic.egg-info/top_level.txt +0 -0
|
@@ -15,6 +15,7 @@ Jens Egholm <jensegholm@protonmail.com>
|
|
|
15
15
|
Jonah P. Sengupta <jsengup1@jhu.edu>
|
|
16
16
|
Kenneth Chaney <chaneyk@seas.upenn.edu>
|
|
17
17
|
Laurent Perrinet <laurent.perrinet@univ-amu.fr>
|
|
18
|
+
Marco Rasetto <marcorax93@gmail.com>
|
|
18
19
|
MrPeterJin <Cheng.Jin@std.uestc.edu.cn>
|
|
19
20
|
Omar Oubari <omaroubari@gmail.com>
|
|
20
21
|
Sadique Sheik <sadique.sheik@aictx.ai>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
* Ooops, missing s
|
|
5
|
+
* Update nmnist.py
|
|
6
|
+
* Update nmnist.py
|
|
7
|
+
|
|
8
|
+
v1.4.0
|
|
9
|
+
------
|
|
10
|
+
|
|
4
11
|
* Fixed bug in differentiator code that resulted in improper spikes being propagated
|
|
5
12
|
* Incorporated suggestion to carry out all frame histogram subtractions in single step
|
|
6
13
|
* Added compatability for non-scalar targets
|
|
@@ -2,7 +2,6 @@ import os
|
|
|
2
2
|
from typing import Callable, Optional
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
5
|
-
|
|
6
5
|
from tonic.dataset import Dataset
|
|
7
6
|
from tonic.io import read_mnist_file
|
|
8
7
|
|
|
@@ -28,6 +27,7 @@ class NMNIST(Dataset):
|
|
|
28
27
|
train (bool): If True, uses training subset, otherwise testing subset.
|
|
29
28
|
first_saccade_only (bool): If True, only work with events of the first of three saccades.
|
|
30
29
|
Results in about a third of the events overall.
|
|
30
|
+
stabilize (bool): If True, it stabilizes egomotion of the saccades, centering the digit.
|
|
31
31
|
transform (callable, optional): A callable of transforms to apply to the data.
|
|
32
32
|
target_transform (callable, optional): A callable of transforms to apply to the targets/labels.
|
|
33
33
|
transforms (callable, optional): A callable of transforms that is applied to both data and
|
|
@@ -66,6 +66,7 @@ class NMNIST(Dataset):
|
|
|
66
66
|
save_to: str,
|
|
67
67
|
train: bool = True,
|
|
68
68
|
first_saccade_only: bool = False,
|
|
69
|
+
stabilize: bool = False,
|
|
69
70
|
transform: Optional[Callable] = None,
|
|
70
71
|
target_transform: Optional[Callable] = None,
|
|
71
72
|
transforms: Optional[Callable] = None,
|
|
@@ -78,6 +79,7 @@ class NMNIST(Dataset):
|
|
|
78
79
|
)
|
|
79
80
|
self.train = train
|
|
80
81
|
self.first_saccade_only = first_saccade_only
|
|
82
|
+
self.stabilize = stabilize
|
|
81
83
|
|
|
82
84
|
if train:
|
|
83
85
|
self.filename = self.train_filename
|
|
@@ -105,11 +107,14 @@ class NMNIST(Dataset):
|
|
|
105
107
|
def __getitem__(self, index):
|
|
106
108
|
"""
|
|
107
109
|
Returns:
|
|
108
|
-
a tuple of (events, target) where target is the index of the target
|
|
110
|
+
a tuple of (events, target) where target is the index of the target
|
|
111
|
+
class.
|
|
109
112
|
"""
|
|
110
113
|
events = read_mnist_file(self.data[index], dtype=self.dtype)
|
|
111
114
|
if self.first_saccade_only:
|
|
112
115
|
events = events[events["t"] < 1e5]
|
|
116
|
+
if self.stabilize:
|
|
117
|
+
events = stabilize(events)
|
|
113
118
|
target = self.targets[index]
|
|
114
119
|
if self.transform is not None:
|
|
115
120
|
events = self.transform(events)
|
|
@@ -127,3 +132,45 @@ class NMNIST(Dataset):
|
|
|
127
132
|
self._is_file_present()
|
|
128
133
|
and self._folder_contains_at_least_n_files_of_type(10000, ".bin")
|
|
129
134
|
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def stabilize(events):
|
|
138
|
+
"""
|
|
139
|
+
Stabilize digits, code ported from https://www.garrickorchard.com/datasets/n-mnist
|
|
140
|
+
Returns:
|
|
141
|
+
stabilized events, removing the egomotion caused by saccades.
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
stab_x = np.asarray(events["x"], dtype=np.float64)
|
|
145
|
+
stab_y = np.asarray(events["y"], dtype=np.float64)
|
|
146
|
+
|
|
147
|
+
# original code might result in a small offset, fixed manually
|
|
148
|
+
x_off = 4
|
|
149
|
+
y_off = 2
|
|
150
|
+
|
|
151
|
+
saccade_1_index = events["t"] <= 105e3
|
|
152
|
+
stab_x[saccade_1_index] = x_off + stab_x[saccade_1_index] - \
|
|
153
|
+
3.5*events["t"][saccade_1_index]/105e3
|
|
154
|
+
stab_y[saccade_1_index] = y_off + stab_y[saccade_1_index] - \
|
|
155
|
+
7*events["t"][saccade_1_index]/105e3
|
|
156
|
+
|
|
157
|
+
saccade_2_index = (events["t"] > 105e3) * (events["t"] <= 210e3)
|
|
158
|
+
stab_x[saccade_2_index] = x_off + stab_x[saccade_2_index] - \
|
|
159
|
+
3.5 - 3.5*(events["t"][saccade_2_index] - 105e3)/105e3
|
|
160
|
+
stab_y[saccade_2_index] = y_off + stab_y[saccade_2_index] - \
|
|
161
|
+
7 + 7*(events["t"][saccade_2_index] - 105e3)/105e3
|
|
162
|
+
|
|
163
|
+
saccade_3_index = (events["t"] > 210e3)
|
|
164
|
+
stab_x[saccade_3_index] = x_off + stab_x[saccade_3_index] - \
|
|
165
|
+
7 + 7*(events["t"][saccade_3_index]-210e3)/105e3
|
|
166
|
+
# events["y"] remains almonst unchaged because it is a horizontal saccade
|
|
167
|
+
stab_y[saccade_3_index] = y_off + stab_y[saccade_3_index]
|
|
168
|
+
|
|
169
|
+
events["x"] = np.asarray(np.round(stab_x), dtype=np.int64)
|
|
170
|
+
events["y"] = np.asarray(np.round(stab_y), dtype=np.int64)
|
|
171
|
+
|
|
172
|
+
nulls = (stab_x < 0) + (stab_y < 0) + (stab_x > 33) + (stab_y > 33)
|
|
173
|
+
|
|
174
|
+
events = events[nulls == 0]
|
|
175
|
+
|
|
176
|
+
return events
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "4b89557", "is_release": false}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "639d469", "is_release": false}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_event_by_area.py
RENAMED
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_drop_event_by_time.py
RENAMED
|
File without changes
|
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_event_downsampling.py
RENAMED
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_merge_polarities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_random_time_reversal.py
RENAMED
|
File without changes
|
{tonic-1.3.4.dev18 → tonic-1.4.1.dev4}/docs/gallery/transformations/plot_refractory_period.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|