HI All,
I have captured point cloud data from the zivid camera in ply format, from which I converted a .bin format by this code.
import numpy as np
import pandas as pd
from plyfile import PlyData
def convert_ply(input_path, output_path):
plydata = PlyData.read(input_path) # read file
data = plydata.elements[0].data # read data
data_pd = pd.DataFrame(data) # convert to DataFrame
data_np = np.zeros(data_pd.shape, dtype=np.float) # initialize array to store data
property_names = data[0].dtype.names # read names of properties
for i, name in enumerate(
property_names): # read data by property
data_np[:, i] = data_pd[name]
data_np.astype(np.float32).tofile(output_path)
Then I gave generated file- test.bin to the pretrained model based on votenet.
After running the model cannot detect any object in the given point cloud. So is there any mistake, I am making while converting ply to bin, or the problem is in somewhere else?
Maybe you can compare your converted data with our provided demo data? It might be related to the different coordinate systems or points' coordinate scales?
HI All, I have captured point cloud data from the zivid camera in ply format, from which I converted a .bin format by this code.
import numpy as np import pandas as pd from plyfile import PlyData
def convert_ply(input_path, output_path): plydata = PlyData.read(input_path) # read file data = plydata.elements[0].data # read data data_pd = pd.DataFrame(data) # convert to DataFrame data_np = np.zeros(data_pd.shape, dtype=np.float) # initialize array to store data property_names = data[0].dtype.names # read names of properties for i, name in enumerate( property_names): # read data by property data_np[:, i] = data_pd[name] data_np.astype(np.float32).tofile(output_path)
Then I gave generated file- test.bin to the pretrained model based on votenet.
python3 demo/pcd_demo.py test.bin configs/votenet/votenet_iouloss_8x8_scannet-3d-18class.py checkpoints/votenet_8x8_scannet-3d-18class_20210823_234503-cf8134fa.pth --show
After running the model cannot detect any object in the given point cloud. So is there any mistake, I am making while converting ply to bin, or the problem is in somewhere else?