Closed wngTn closed 6 months ago
Triplet loss is employed with batch size at 8,8,10, refers to ID, sequence per ID, and frames number per sequence respectively.
Point number for training and testing at each frame is 512 points in lidargait paper.
SGD optimizer is with initial learning rate at 0.01, and learning rate multiply 0.1 at 2w and 3w iterations.
I will give an example configuration for pointnet++.
evaluator_cfg:
enable_float16: true
restore_ckpt_strict: true
restore_hint: 40000
save_name: PointNet2
eval_func: evaluate_indoor_dataset
sampler:
batch_shuffle: false
points_in_use:
pointcloud_index: 0
points_num: 512
batch_size: 8
frames_num_fixed: 10 # fixed frames number for training
frames_skip_num: 0
#sample_type: fixed_ordered
sample_type: all_ordered # all indicates whole sequence used to test, while ordered means input sequence by its natural order; Other options: fixed_unordered
frames_all_limit: 720 # limit the number of sampled frames to prevent out of memory
metric: euc # cos
transform:
- type: BasePointTransform
loss_cfg:
- loss_term_weight: 1.0
margin: 0.2
type: TripletLoss
log_prefix: triplet
model_cfg:
model: PointNet2
optimizer_cfg:
lr: 0.01
momentum: 0.9
solver: SGD
weight_decay: 0.0005
scheduler_cfg:
gamma: 0.1
milestones: # Learning Rate Reduction at each milestones
- 20000
- 30000
scheduler: MultiStepLR
trainer_cfg:
enable_float16: true # half_percesion float for memory reduction and speedup
fix_BN: false
with_test: true #true
log_iter: 100
restore_ckpt_strict: true
restore_hint: 0
save_iter: 5000
save_name: PointNet2
sync_BN: true
total_iter: 40000
sampler:
batch_shuffle: true
batch_size:
- 8 # TripletSampler, batch_size[0] indicates Number of Identity
- 8 # batch_size[1] indicates Samples sequqnce for each Identity
frames_num_fixed: 10 # fixed frames number for training
sample_type: fixed_unordered # fixed control input frames number, unordered for controlling order of input tensor; Other options: unfixed_ordered or all_ordered
type: TripletSampler
points_in_use:
pointcloud_index: 0
points_num: 512
transform:
- type: AllPointTransform
Noted that we follow the default model hyperparameter like https://github.com/yanx27/Pointnet_Pointnet2_pytorch/blob/master/models/pointnet2_cls_msg.py
What GPU did you use for training on these point clouds? Since you'd need a forward pass with a tensor of shape (8*8*10, 3, 512). Even with automatic mixed precision, this would require significant amount of memory.
I train PointNet++ on 8 TITAN GPUs, each with 24 GB memory.
Hi, Dr. Shen, I noticed that you use transforms like BasePointTransform and AllPointTransform when training pointnet++, but they are not included in opengait/data/transform.py. Could you please provide some details or code about PointNet++ trained on SUSTech1K? That would be much appreciated!
Hi, Dr. Shen, I noticed that you use transforms like BasePointTransform and AllPointTransform when training pointnet++, but they are not included in opengait/data/transform.py. Could you please provide some details or code about PointNet++ trained on SUSTech1K? That would be much appreciated!
Hi, Currently, I have no time to make code publicly available. I can provide the necessary information to help you reproduce transform for point clouds.
Basically, there are only few things in PointTransform:
Hope this can help you
That's very helpful, thanks. Good luck to you!
What were the hyperparameters for the point-based methods in LidarGait? I.e., for PointNet, PointNet++, and PointTransformer?