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%|          | 62464/169674850 [00:00<07:02, 401398.81it/s]
  0%|          | 330752/169674850 [00:00<02:24, 1169958.11it/s]
  1%|          | 1427456/169674850 [00:00<00:44, 3818759.28it/s]
  3%|▎         | 4467712/169674850 [00:00<00:16, 9931198.79it/s]
  5%|▍         | 7646208/169674850 [00:00<00:11, 13621825.28it/s]
  6%|▋         | 10857472/169674850 [00:00<00:09, 15887580.04it/s]
  8%|▊         | 14085120/169674850 [00:01<00:08, 17367859.74it/s]
 10%|█         | 17312768/169674850 [00:01<00:08, 18347072.87it/s]
 12%|█▏        | 20589568/169674850 [00:01<00:07, 19070884.05it/s]
 14%|█▍        | 23899136/169674850 [00:01<00:07, 19660983.97it/s]
 16%|█▌        | 27225088/169674850 [00:01<00:07, 20058371.49it/s]
 18%|█▊        | 30485504/169674850 [00:01<00:06, 20344830.37it/s]
 20%|██        | 33958912/169674850 [00:02<00:06, 20850217.17it/s]
 22%|██▏       | 37366784/169674850 [00:02<00:06, 21067350.19it/s]
 24%|██▍       | 40938496/169674850 [00:02<00:06, 21441151.27it/s]
 26%|██▌       | 44526592/169674850 [00:02<00:05, 21945626.28it/s]
 28%|██▊       | 48131072/169674850 [00:02<00:05, 22108982.95it/s]
 31%|███       | 51751936/169674850 [00:02<00:05, 22365343.87it/s]
 33%|███▎      | 55438336/169674850 [00:03<00:05, 22556335.63it/s]
 35%|███▍      | 59141120/169674850 [00:03<00:04, 22888493.36it/s]
 37%|███▋      | 62876672/169674850 [00:03<00:04, 23292537.80it/s]
 39%|███▉      | 66644992/169674850 [00:03<00:04, 23200682.69it/s]
 42%|████▏     | 70429696/169674850 [00:03<00:04, 23715642.10it/s]
 44%|████▍     | 74247168/169674850 [00:03<00:03, 23863326.02it/s]
 46%|████▌     | 78130176/169674850 [00:03<00:03, 23720285.58it/s]
 48%|████▊     | 82045952/169674850 [00:04<00:03, 24097156.77it/s]
 51%|█████     | 86027264/169674850 [00:04<00:03, 24442544.37it/s]
 53%|█████▎    | 90041344/169674850 [00:04<00:03, 25077175.41it/s]
 55%|█████▌    | 94137344/169674850 [00:04<00:03, 24891668.95it/s]
 58%|█████▊    | 98249728/169674850 [00:04<00:02, 25248810.66it/s]
 60%|██████    | 102378496/169674850 [00:04<00:02, 25472848.36it/s]
 63%|██████▎   | 106572800/169674850 [00:05<00:02, 25862696.95it/s]
 65%|██████▌   | 110799872/169674850 [00:05<00:02, 26027068.28it/s]
 68%|██████▊   | 115059712/169674850 [00:05<00:02, 26685397.78it/s]
 70%|███████   | 119417856/169674850 [00:05<00:01, 26530853.67it/s]
 73%|███████▎  | 123808768/169674850 [00:05<00:01, 27128883.07it/s]
 76%|███████▌  | 128232448/169674850 [00:05<00:01, 27640444.45it/s]
 78%|███████▊  | 132721664/169674850 [00:05<00:01, 27884756.50it/s]
 81%|████████  | 137227264/169674850 [00:06<00:01, 27867656.19it/s]
 84%|████████▎ | 141782016/169674850 [00:06<00:00, 28394944.00it/s]
 86%|████████▋ | 146385920/169674850 [00:06<00:00, 28200417.52it/s]
 89%|████████▉ | 150989824/169674850 [00:06<00:00, 28584739.98it/s]
 92%|█████████▏| 155626496/169674850 [00:06<00:00, 28630947.23it/s]
 94%|█████████▍| 160279552/169674850 [00:06<00:00, 29098924.54it/s]
 97%|█████████▋| 164965376/169674850 [00:07<00:00, 29202431.74it/s]
169675776it [00:07, 23557224.53it/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 13.566 seconds)

Gallery generated by Sphinx-Gallery