tonic 1.5.1.dev20__tar.gz → 1.5.1.dev22__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.5.1.dev20 → tonic-1.5.1.dev22}/ChangeLog +1 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/PKG-INFO +1 -1
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/datasets.rst +3 -9
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/__init__.py +2 -0
- tonic-1.5.1.dev22/tonic/datasets/nerdd.py +120 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/PKG-INFO +1 -1
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/SOURCES.txt +1 -0
- tonic-1.5.1.dev22/tonic.egg-info/pbr.json +1 -0
- tonic-1.5.1.dev20/tonic.egg-info/pbr.json +0 -1
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/.binder/requirements.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/.coveragerc +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/.github/workflows/ci-pipeline.yml +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/.pre-commit-config.yaml +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/.readthedocs.yml +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/AUTHORS +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/LICENSE.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/MANIFEST.in +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/README.md +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/Makefile +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/event-cameras/eventstream.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/event-cameras/framestream.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/event-cameras/receptive-fields.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/event-cameras/sampling-theorems.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/snn/neuron-models.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/snn/surrogates.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/tonic-logo-black-bg.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/tonic-logo-black.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/tonic-logo-white.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_static/tonic_favicon.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_templates/class_dataset.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/_templates/class_transform.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/about/about.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/about/info.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/about/release_notes.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/conf.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/README.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/README.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/plot_tobinarep.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/plot_toframe.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/plot_toimage.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/plot_totimesurface.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/representations/plot_tovoxelgrid.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/README.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_centercrop.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_crop_time.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_decimation.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_denoise.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_downsample.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_event.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_event_by_area.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_event_by_time.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_pixel.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_event_downsampling.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_merge_polarities.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_random_crop.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_random_flip_lr.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_random_flip_ud.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_random_time_reversal.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_refractory_period.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_spatial_jitter.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_time_jitter.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_uniform_noise.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_involved/communication_channels.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_involved/contribute.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_involved/getting_involved.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_started/getting_started.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_started/install.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/getting_started/nmnist.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/how-tos/how-tos.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/how-tos/loading-raw-events.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/how-tos/visualizing-data.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/how-tos/wrapping_own_data.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/index.md +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/make.bat +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/reading_material/design_choices.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/reading_material/intro-event-cameras.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/reading_material/intro-snns.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/reading_material/reading_material.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/reading_material/training-snns.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/requirements.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/transformations.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/Aug_DiskCachDataset.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/audio_transforms_tutorial.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/batching.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/davis_data.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/fast_dataloading.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/large_datasets.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/slicing.ipynb +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/tutorials/tutorials.rst +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/requirements.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/setup.cfg +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/setup.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/dataset_utils.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/requirements.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_audio_augmentations.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_audio_transforms.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_aug_caching.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_caching.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_chained_transforms.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_data/sample.aedat4 +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_data/sample_aedat_header.aedat +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_data/sample_ncars.dat +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_data/sample_nmnist.bin +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_data/sample_stmnist.mat +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_datasets.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_dsec.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_io.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_representations.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_sliced_dataset.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_slicers.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_tonic_utils.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/test_transforms.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/torch_requirements.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/test/utils.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/__init__.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/audio_augmentations.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/audio_transforms.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/cached_dataset.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/collation.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/dataset.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/asl_dvs.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/cifar10dvs.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/davisdataset.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/dsec.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/dvs_lips.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/dvsgesture.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/ebssa.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/hsd.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/mvsec.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/ncaltech101.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/nmnist.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/ntidigits18.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/pokerdvs.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/s_mnist.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/threeET_eyetracking.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/tum_vie.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/datasets/visual_place_recognition.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/download_utils.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/__init__.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/crop.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/decimate.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/denoise.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/drop_event.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/drop_pixel.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/event_downsampling.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/refractory_period.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/spatial_jitter.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/time_jitter.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/time_skew.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/to_averaged_timesurface.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/to_bina_rep.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/to_frame.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/to_timesurface.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/to_voxel_grid.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/functional/uniform_noise.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/io.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/sliced_dataset.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/slicers.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/transforms.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic/utils.py +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic-logo-padded.png +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/dependency_links.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/not-zip-safe +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/requires.txt +0 -0
- {tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/tonic.egg-info/top_level.txt +0 -0
|
@@ -45,19 +45,13 @@ Pose estimation, visual odometry, SLAM
|
|
|
45
45
|
MVSEC
|
|
46
46
|
TUMVIE
|
|
47
47
|
VPR
|
|
48
|
-
|
|
49
|
-
Star tracking
|
|
50
|
-
-------------------
|
|
51
|
-
.. autosummary::
|
|
52
|
-
:toctree: generated/
|
|
53
|
-
:template: class_dataset.rst
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Eye tracking
|
|
49
|
+
Object tracking
|
|
58
50
|
-------------------
|
|
59
51
|
.. autosummary::
|
|
60
52
|
:toctree: generated/
|
|
61
53
|
:template: class_dataset.rst
|
|
62
54
|
|
|
63
55
|
ThreeET_Eyetracking
|
|
56
|
+
NeRDD
|
|
57
|
+
EBSSA
|
|
@@ -9,6 +9,7 @@ from .ntidigits18 import NTIDIGITS18
|
|
|
9
9
|
from .hsd import SHD, SSC
|
|
10
10
|
from .mvsec import MVSEC
|
|
11
11
|
from .ncaltech101 import NCALTECH101
|
|
12
|
+
from .nerdd import NERDD
|
|
12
13
|
from .nmnist import NMNIST
|
|
13
14
|
from .pokerdvs import POKERDVS
|
|
14
15
|
from .s_mnist import SMNIST
|
|
@@ -25,6 +26,7 @@ __all__ = [
|
|
|
25
26
|
"EBSSA",
|
|
26
27
|
"MVSEC",
|
|
27
28
|
"NCALTECH101",
|
|
29
|
+
"NERDD",
|
|
28
30
|
"NMNIST",
|
|
29
31
|
"POKERDVS",
|
|
30
32
|
"SHD",
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
from typing import Any, Callable, Optional, Tuple
|
|
4
|
+
from tonic.download_utils import extract_archive
|
|
5
|
+
from tonic.io import make_structured_array
|
|
6
|
+
|
|
7
|
+
class NERDD:
|
|
8
|
+
"""`NeRDD <https://github.com/MagriniGabriele/NeRDD>`_
|
|
9
|
+
Neuromorphic Event-based Reactive Driving Dataset.
|
|
10
|
+
|
|
11
|
+
Parameters:
|
|
12
|
+
root (string): Location to save files to on disk.
|
|
13
|
+
transforms (callable, optional): A callable of transforms that is applied to both data and
|
|
14
|
+
labels at the same time.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
filename = "NeRDD.zip"
|
|
18
|
+
folder_name = "DATA"
|
|
19
|
+
sensor_size = (1280, 720, 2)
|
|
20
|
+
dtype = np.dtype([("t", np.int32), ("x", np.int16), ("y", np.int16), ("p", bool)])
|
|
21
|
+
ordering = dtype.names
|
|
22
|
+
|
|
23
|
+
def __init__(
|
|
24
|
+
self,
|
|
25
|
+
root: str,
|
|
26
|
+
transforms: Optional[Callable] = None,
|
|
27
|
+
):
|
|
28
|
+
self.data = []
|
|
29
|
+
self.targets = []
|
|
30
|
+
self.location_on_system = root
|
|
31
|
+
self.transforms = transforms
|
|
32
|
+
|
|
33
|
+
if not self._check_extracted():
|
|
34
|
+
if not self._check_zip_exists():
|
|
35
|
+
raise FileNotFoundError(
|
|
36
|
+
f"The dataset archive '{self.filename}' was not found in {self.location_on_system}. "
|
|
37
|
+
"Please download it manually and place it in the specified directory."
|
|
38
|
+
)
|
|
39
|
+
self._extract_archive()
|
|
40
|
+
|
|
41
|
+
self._load_dataset_structure()
|
|
42
|
+
|
|
43
|
+
def _check_zip_exists(self) -> bool:
|
|
44
|
+
"""Check if the zip file exists in the specified directory."""
|
|
45
|
+
return os.path.isfile(os.path.join(self.location_on_system, self.filename))
|
|
46
|
+
|
|
47
|
+
def _check_extracted(self) -> bool:
|
|
48
|
+
"""Check if the dataset has been extracted and contains at least 10 .npz files."""
|
|
49
|
+
data_path = os.path.join(self.location_on_system, self.folder_name)
|
|
50
|
+
if not os.path.isdir(data_path):
|
|
51
|
+
return False
|
|
52
|
+
npz_files = []
|
|
53
|
+
for root, _, files in os.walk(data_path):
|
|
54
|
+
npz_files.extend([f for f in files if f.endswith(".npz")])
|
|
55
|
+
return len(npz_files) == 115
|
|
56
|
+
|
|
57
|
+
def _extract_archive(self):
|
|
58
|
+
"""Extract the dataset archive."""
|
|
59
|
+
print(f"Extracting {self.filename}...")
|
|
60
|
+
archive_path = os.path.join(self.location_on_system, self.filename)
|
|
61
|
+
extract_archive(archive_path)
|
|
62
|
+
print(f"Extraction complete. Files are now in {self.location_on_system}.")
|
|
63
|
+
|
|
64
|
+
def _load_dataset_structure(self):
|
|
65
|
+
"""Load the dataset files and their corresponding labels."""
|
|
66
|
+
data_path = os.path.join(self.location_on_system, self.folder_name)
|
|
67
|
+
archives = [
|
|
68
|
+
f for f in os.listdir(data_path)
|
|
69
|
+
if os.path.isdir(os.path.join(data_path, f))
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
for archive in archives:
|
|
73
|
+
archive_path = os.path.join(data_path, archive)
|
|
74
|
+
scenes = [
|
|
75
|
+
f for f in os.listdir(archive_path)
|
|
76
|
+
if os.path.isdir(os.path.join(archive_path, f))
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
for scene in scenes:
|
|
80
|
+
scene_path = os.path.join(archive_path, scene)
|
|
81
|
+
event_file = os.path.join(scene_path, "Event", "output_events.npz")
|
|
82
|
+
rgb_folder = os.path.join(scene_path, "rgb_folder")
|
|
83
|
+
label_file = os.path.join(scene_path, "ev_rgb_coordinates.txt")
|
|
84
|
+
|
|
85
|
+
if os.path.exists(event_file) and os.path.exists(label_file):
|
|
86
|
+
self.data.append((event_file, label_file))
|
|
87
|
+
else:
|
|
88
|
+
print(f"Skipping scene {scene} in archive {archive}: missing files.")
|
|
89
|
+
|
|
90
|
+
def __getitem__(self, index: int) -> Tuple[Any, Any]:
|
|
91
|
+
"""
|
|
92
|
+
Returns:
|
|
93
|
+
(events, target) where target is index of the target class.
|
|
94
|
+
"""
|
|
95
|
+
event_file, label_file = self.data[index]
|
|
96
|
+
events = np.load(event_file)["data"]
|
|
97
|
+
events = make_structured_array(
|
|
98
|
+
events[:, 3], # t
|
|
99
|
+
events[:, 0], # x
|
|
100
|
+
events[:, 1], # y
|
|
101
|
+
events[:, 2], # p
|
|
102
|
+
dtype=self.dtype,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
with open(label_file, "r") as f:
|
|
106
|
+
bboxes = []
|
|
107
|
+
for line in f.readlines():
|
|
108
|
+
timestamp, bbox_str = line.strip().split(":")
|
|
109
|
+
bbox_coords = list(map(float, bbox_str.split(",")))
|
|
110
|
+
bboxes.append([float(timestamp)] + bbox_coords)
|
|
111
|
+
bboxes = np.array(bboxes, dtype=np.float32)
|
|
112
|
+
|
|
113
|
+
# Apply transforms if provided
|
|
114
|
+
if self.transforms is not None:
|
|
115
|
+
events, bboxes = self.transforms(events, bboxes)
|
|
116
|
+
|
|
117
|
+
return events, bboxes
|
|
118
|
+
|
|
119
|
+
def __len__(self):
|
|
120
|
+
return len(self.data)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "f368986", "is_release": false}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "3a8e1e2", "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
|
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_event_by_area.py
RENAMED
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_drop_event_by_time.py
RENAMED
|
File without changes
|
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_event_downsampling.py
RENAMED
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_merge_polarities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/docs/gallery/transformations/plot_random_time_reversal.py
RENAMED
|
File without changes
|
{tonic-1.5.1.dev20 → tonic-1.5.1.dev22}/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
|