Skip to content

Commit

Permalink
增加dvs gesture数据集
Browse files Browse the repository at this point in the history
  • Loading branch information
fangwei123456 committed Sep 10, 2020
1 parent 78c687c commit 1b33878
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spikingjelly/datasets/dvs_gesture.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def download_and_extract(download_root: str, extract_root: str):
file_name = os.path.join(download_root, 'DvsGesture.tar.gz')
if os.path.exists(file_name):
if utils.check_md5(file_name, resource[1]):
utils.extract_archive(download_root, extract_root)
utils.extract_archive(file_name, extract_root)
else:
print(f'{file_name} corrupted.')

Expand Down Expand Up @@ -171,8 +171,6 @@ def __init__(self, root: str, use_frame=True, frames_num=10, split_by='number',
# 如果root目录下存在events_root目录则认为数据集文件存在
print(f'events data root {events_root} already exists.')
else:
os.mkdir(events_root)
print(f'mkdir {events_root}')
self.download_and_extract(root, events_root)

events_npy_root = os.path.join(root, 'events_npy')
Expand All @@ -181,7 +179,7 @@ def __init__(self, root: str, use_frame=True, frames_num=10, split_by='number',
else:
os.mkdir(events_npy_root)
print(f'mkdir {events_root}')
print('read evetns data from *.aedat and save to *.npy...')
print('read events data from *.aedat and save to *.npy...')
DvsGesture.convert_aedat_dir_to_npy_dir(events_root, events_npy_root)


Expand Down

0 comments on commit 1b33878

Please sign in to comment.