jhultman / vision3d

Research platform for 3D object detection in PyTorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

please, how can I train the network with my own point cloud dataset?

electronicYH opened this issue · comments

thank you for your work.
I have my own point cloud dataset. The point cloud dataset is not from lidar.
I want to train the network with my dataset, please help me!

Hi, thank you for your interest. You need to write your own dataset class (refer to KittiDataset). Its __getitem__ method should produce a dictionary item with the following data:

item = {
  'points': (N, 4) float np.ndarray (x, y, z, intensity),
  'boxes': (K, 7) torch.FloatTensor (x, y, z, w, l, h, theta),
  'class_idx': (K,) torch.LongTensor (category of object),
  'box_ignore': (K,) torch.BoolTensor (mask indicating whether box should be ignored for training),
}

You should then call target_assigner(item) before returning as is done here.

If you want to train with database sampling augmentation, you can use the DatabaseBuilder to construct a pickled database. The builder expects as input a python list annotations containing the following data:

annotations = [
  {
    'velo_path': string path to point cloud `.bin` file,
    'boxes': (K, 7) float np.ndarray (careful, numpy array -- not torch.Tensor),
    'class_idx': (K,) int np.ndarray (careful, numpy array -- not torch.Tensor),
  },
  {
  ...
  }
]

Closing due to inactivity. Please feel free to reopen if have more questions.