Skip to content
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

Errno 2 #13

Open
Sassimion opened this issue Jun 13, 2022 · 0 comments
Open

Errno 2 #13

Sassimion opened this issue Jun 13, 2022 · 0 comments

Comments

@Sassimion
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant