PointCloudC / downsample.py
Ren Jiawei
update
d7b89b7
raw
history blame
328 Bytes
import glob
import h5py
for fpath in glob.glob('modelnet_c/*.h5'):
f = h5py.File(fpath)
data = f['data'][:].astype('float32')
label = f['label'][:].astype('int64')
f.close()
f = h5py.File(fpath, 'w')
f.create_dataset('data', data=data[:100])
f.create_dataset('label', data=label[:100])
f.close()