-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocessing DVS Gestures #37
Comments
Replace |
That worked, but later when ind = (t >= tst) & (t < ten) It says that ind should be scalar integer since it is user as an index, instead it is an array of bool I think. Should I cast I somehow or I have to redefine it in some other way? |
I think this can be the right code:
I hope it can help you. |
Thanks @albertopolito . |
Hi, I have tried and it seems to work perfectly. Thanks a lot for the help. |
Great. |
Thanks for your work. Can other data sets be preprocessed in this way, such as ASL-DVS? |
Hi, I was trying to preprocessing the DVS Gesture dataset with the code given in #10, but I get this error.
The path is right since I have tried to read the data with the readAedatevent function and everything works well.
Any suggestions?
0 user01_fluorescent
ValueError Traceback (most recent call last)
in ()
23 #for i in range(20):
24 # print(x[i], y[i], p[i],t[i])
---> 25 splitData(filename, path)
26 count += 1
3 frames
in splitData(filename, path)
1 def splitData(filename, path):
----> 2 x, y, p, t = scipy.io.loadmat(path + filename + '.aedat')
3 print(x,y,p,t)
4 labels = np.loadtxt(path + filename + '_labels.csv', delimiter=',', skiprows=1)
5 labels[:,0] -= 1
/usr/local/lib/python3.6/dist-packages/scipy/io/matlab/mio.py in loadmat(file_name, mdict, appendmat, **kwargs)
215 variable_names = kwargs.pop('variable_names', None)
216 with _open_file_context(file_name, appendmat) as f:
--> 217 MR, _ = mat_reader_factory(f, **kwargs)
218 matfile_dict = MR.get_variables(variable_names)
219
/usr/local/lib/python3.6/dist-packages/scipy/io/matlab/mio.py in mat_reader_factory(file_name, appendmat, **kwargs)
70 """
71 byte_stream, file_opened = _open_file(file_name, appendmat)
---> 72 mjv, mnv = get_matfile_version(byte_stream)
73 if mjv == 0:
74 return MatFile4Reader(byte_stream, **kwargs), file_opened
/usr/local/lib/python3.6/dist-packages/scipy/io/matlab/miobase.py in get_matfile_version(fileobj)
239 if maj_val in (1, 2):
240 return ret
--> 241 raise ValueError('Unknown mat file type, version %s, %s' % ret)
242
243
ValueError: Unknown mat file type, version 0, 154
The text was updated successfully, but these errors were encountered: