How to Reproduce Pre-Training Results
I am encountering inconsistent zero-shot detection results while training a pretrained model using the SpatialLM-Dataset
Training Setup: Hardware: 8× A100 (80GB) GPUs Duration: 12.5 hours Implementation: Followed Appendi B of the paper.
Configuration Details:
### model
model_name_or_path: /data/Spatiallm/pretrained_model/spatiallm_pretrain # using initialize_weight.py generate
trust_remote_code: true
### method
do_train: true
freeze_language_tower: false
freeze_point_tower: false
train_proj_only: false
### dataset
dataset: spatiallm_train # arkitscenes_train,arkitscenes_val
dataset_dir: dataset/Spatiallm-dataset # arkitscenes-spatiallm
template: spatiallm_qwen # spatiallm_qwen, spatiallm_llama
num_bins: 1280
do_augmentation: true
random_rotation: true
cutoff_len: 8192
overwrite_cache: true
preprocessing_num_workers: 16
dataloader_num_workers: 16
save_dir: saves2/spatiallm_pretrain
### output
output_dir: saves2/spatiallm_pretrain
logging_steps: 20
save_steps: 2000
overwrite_output_dir: true
save_total_limit: 20
### train
per_device_train_batch_size: 1
gradient_accumulation_steps: 8
learning_rate: 1.0e-4
num_train_epochs: 4
lr_scheduler_type: cosine
warmup_ratio: 0.03
pure_bf16: false
bf16: false
fp16: false
tf32: true
ddp_timeout: 180000000
report_to: none # choices: [none, wandb, tensorboard, swanlab]
max_new_tokens: 4096
# max_new_tokens: 2048
### eval
val_size: 0.0001
per_device_eval_batch_size: 1
eval_strategy: steps
eval_steps: 2000
The zero-shot detection results show significantly lower metrics for the following categories: window, curtain, nightstand, cabinet, stool, refrigerator.
Could you please help me: Review my configuration for potential errors? Identify any overlooked detail?
Thank you for your time and expertise—I greatly appreciate your support!
Hi @bkxmw, Thank you for your effort and interest in pretraining from scratch with SpatialLM-Dataset. There are several factors that may explain the inconsistencies you observed between your pre-trained models and the released model:
- Pretraining data: The pretraining used both single-room and multi-room point clouds. For multi-room data, we combine the point clouds and the ground-truth room layouts from the released SpatialLM-Dataset using the same Scene IDs. (In other words, all rooms are merged into one multi-room sample. You can also sample them randomly if you want to further increase diversity.)
- Category-specific detection: The released checkpoints support detection with user-specified categories. However, this feature is not implemented in the released training script, which was kept simple to maintain generalization across datasets. It can be added with some modifications to the training code, but we chose to leave it out.
- Cuboid crop augmentation: The cuboid crop data augmentation is not included in the released training code. For reference, you can check the V-DETR data augmentation. (Note that cuboid crop is only applied when the input language prompt does not include a layout prediction.)
I saw you enabled random_rotation, in our experiments we leave it as false, but you are welcome to explore the difference and decide if you want to leave it on or not, if what you care is more about the objects and not the architectural layouts.
I think these are the main reasons you see the difference between your results and the released checkpoints.
@SamMaoYS Thank you for the clear and helpful explanations! I’ll continue experimenting with the settings you mentioned.
@SamMaoYS Thank you for the clear and helpful explanations! I’ll continue experimenting with the settings you mentioned.感谢您清晰而有用的解释!我会继续尝试您提到的设置。
Hello! May I ask if you were ultimately successful in training from scratch? I would love to exchange ideas with you. Thank you!