File size: 643 Bytes
7c5db1f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import numpy as np
type = ['stroking', 'tapping', 'pressing', 'scratching', 'pinch', 'poke', 'grip', 'squeeze', 'knead', 'beat']
labels = []
datas = []
datamans = ['0', '1', '2', '3']
for i in range(len(type)):
for dataman in datamans:
data_path = './dataset/man' + dataman + '/' + type[i] + '_man' + dataman + '.npy'
data_samples = np.load(data_path)
for j in data_samples:
j = j.astype(np.int32)
j = np.expand_dims(j, axis=0)
datas.append(j)
labels.append(i)
datas = np.array(datas, dtype=np.int32)
labels = np.array(labels, dtype=np.int32)
|