upload()
Uploads the Point Cloud to Diffgram
Uploads all the points added to the File3D
object into the Diffgram project.
Parameters:
- dataset_name(str): the name of the directory/dataset to upload the 3D File to.
Returns
True
if the upload was started succesfully.
Note: This method does not wait for the upload to finish, it just enqueues the upload so that the Diffgram File processor can start uploading and preprocessing the data. Check the Import Section of the Diffgram project to see the status of the upload.
Example
import open3d as o3d
def read_pcd_o3d(file_name):
pcd = o3d.io.read_point_cloud(file_name)
out_arr = np.asarray(pcd.points)
return out_arr
points_arr = read_pcd_o3d('test.pcd')
diffgram_3d_file = File3D(client = project, name = 'test.pcd')
for i in range(0, len(points_arr)):
point = points_arr[i]
diffgram_3d_file.add_point(
x = point[0],
y = point[1],
z = point[2],
)
print('num points: {}'.format(len(diffgram_3d_file.point_list)))
diffgram_3d_file.upload()
Updated about 3 years ago