ToVoxelGrid

ToVoxelGrid#

ToVoxelGrid

Downloading https://prod-dcd-datasets-public-files-eu-west-1.s3.eu-west-1.amazonaws.com/a99d0fee-a95b-4231-ad22-988fdb0a2411 to ../../tutorials/data/NMNIST/test.zip

  0%|          | 0/169674850 [00:00<?, ?it/s]
  0%|          | 69632/169674850 [00:00<06:13, 454560.39it/s]
  0%|          | 156672/169674850 [00:00<04:41, 602229.89it/s]
  0%|          | 382976/169674850 [00:00<02:23, 1177318.79it/s]
  0%|          | 574464/169674850 [00:00<02:05, 1346937.19it/s]
  1%|          | 1009664/169674850 [00:00<01:26, 1952227.08it/s]
  1%|          | 1793024/169674850 [00:00<00:48, 3438123.24it/s]
  2%|▏         | 2611200/169674850 [00:00<00:36, 4521098.72it/s]
  3%|▎         | 4254720/169674850 [00:01<00:22, 7453093.30it/s]
  3%|▎         | 5827584/169674850 [00:01<00:17, 9251134.49it/s]
  5%|▌         | 9300992/169674850 [00:01<00:10, 15493953.21it/s]
  7%|▋         | 12381184/169674850 [00:01<00:08, 18697915.99it/s]
 11%|█▏        | 19213312/169674850 [00:01<00:04, 30795194.84it/s]
 14%|█▎        | 23292928/169674850 [00:01<00:04, 31067731.47it/s]
 19%|█▊        | 31419392/169674850 [00:01<00:03, 38190809.26it/s]
 23%|██▎       | 39283712/169674850 [00:01<00:03, 41833124.14it/s]
 28%|██▊       | 47295488/169674850 [00:02<00:02, 44506776.74it/s]
 33%|███▎      | 55208960/169674850 [00:02<00:02, 46016824.26it/s]
 37%|███▋      | 63204352/169674850 [00:02<00:02, 47205619.05it/s]
 42%|████▏     | 71101440/169674850 [00:02<00:02, 47797431.10it/s]
 47%|████▋     | 79096832/169674850 [00:02<00:01, 48325030.34it/s]
 51%|█████▏    | 87059456/169674850 [00:02<00:01, 48638611.66it/s]
 56%|█████▌    | 94940160/169674850 [00:03<00:01, 48796212.32it/s]
 61%|██████    | 102935552/169674850 [00:03<00:01, 49119256.23it/s]
 65%|██████▌   | 110914560/169674850 [00:03<00:01, 49248282.33it/s]
 70%|███████   | 118959104/169674850 [00:03<00:01, 49240727.79it/s]
 75%|███████▍  | 126856192/169674850 [00:03<00:00, 49194684.13it/s]
 79%|███████▉  | 134835200/169674850 [00:03<00:00, 49308301.25it/s]
 84%|████████▍ | 142683136/169674850 [00:04<00:00, 49167297.26it/s]
 89%|████████▊ | 150563840/169674850 [00:04<00:00, 49186595.08it/s]
 93%|█████████▎| 158411776/169674850 [00:04<00:00, 48983253.65it/s]
 98%|█████████▊| 165865472/169674850 [00:04<00:00, 54354755.07it/s]
169675776it [00:04, 37560636.60it/s]
Extracting ../../tutorials/data/NMNIST/test.zip to ../../tutorials/data/NMNIST

import tonic

nmnist = tonic.datasets.NMNIST("../../tutorials/data", train=False)
events, label = nmnist[0]

transform = tonic.transforms.ToVoxelGrid(
    sensor_size=nmnist.sensor_size,
    n_time_bins=20,
)

frames = transform(events)

ani = tonic.utils.plot_animation(frames)

Total running time of the script: (0 minutes 10.786 seconds)

Gallery generated by Sphinx-Gallery