You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for i in range(0, len(filenames)):
plydata = PlyData.read("./ply/" + filenames[i] + ".ply")
piddata = [line.rstrip() for line in open("./points_label/" + filenames[i] + ".seg", 'r')]
for j in range(0, 2048):
a_data[i, j] = [plydata['vertex']['x'][j], plydata['vertex']['y'][j], plydata['vertex']['z'][j]]
a_pid[i,j] = piddata[j]
data = f.create_dataset("data", data = a_data)
pid = f.create_dataset("pid", data = a_pid)](url)
The text was updated successfully, but these errors were encountered:
Hi, I received this error while converting the data from ply to h5. Not sure what's wrong.
FileNotFoundError: [Errno 2] No such file or directory: './ply/ply.ply'
Do I need to provide path in the loop?
Here is the code with my path:
[import h5py
import numpy as np
from plyfile import PlyData, PlyElement
filenames = [line.rstrip() for line in open("build.ply", 'r')]
#f = h5py.File("./hdf5_data/data_training.h5", 'w')
f = h5py.File("C:/Users/Asus/Desktop/CODINGTRY/Writehdf5/hdf5_data/builda.h5", 'w')
a_data = np.zeros((len(filenames), 2048, 3), dtype = np.uint8)
a_pid = np.zeros((len(filenames), 2048), dtype = np.uint8)
for i in range(0, len(filenames)):
plydata = PlyData.read("./ply/" + filenames[i] + ".ply")
piddata = [line.rstrip() for line in open("./points_label/" + filenames[i] + ".seg", 'r')]
for j in range(0, 2048):
a_data[i, j] = [plydata['vertex']['x'][j], plydata['vertex']['y'][j], plydata['vertex']['z'][j]]
a_pid[i,j] = piddata[j]
data = f.create_dataset("data", data = a_data)
pid = f.create_dataset("pid", data = a_pid)](url)
The text was updated successfully, but these errors were encountered: