yifanlu0227 / ChatSim

[CVPR2024 Highlight] Editable Scene Simulation for Autonomous Driving via LLM-Agent Collaboration
https://yifanlu0227.github.io/ChatSim
329 stars 25 forks source link

mclight推理readme中的预训练模型报错KeyError: 'downsample' #48

Open huiyiygy opened 1 month ago

huiyiygy commented 1 month ago

您好,我使用mclight/skydome_lighting下Readme文件中提供的STAGE_2_BEST_CKPT,对waymo数据集进行推理时会触发多个keyError 运行命令如下

python mc_to_sky/tools/infer_waymo_batch.py \
-y mc_to_sky/config/stage2/multi_view_avg.yaml \
-c ./logs/stage2_log/lightning_logs/version_0/checkpoints/epoch=269-val_loss=0.10.ckpt \
--waymo_scenes_dir ./data/waymo_skydome \
-o  ./visualization_results

在mc_to_sky/model/skymodel_enhanced.py文件中报错提示

KeyError: 'downsample'

我看了下原因是multi_view_avg.yaml配置文件中并没有这个参数。 我尝试过参照其它文件配件中的内容,在multi_view_avg.yaml添加 downsample: 4。但紧接着就会报错提示更多的key缺失。如下图 Dingtalk_20240924165603

哪怕我将缺失的参数,全部手动补齐,并注释掉self.on_train_epoch_start(),在最后读取预训练权重时,也会提示权重中存储的key与模型不匹配。

能麻烦你看下,我哪里没有配置对吗?

yifanlu0227 commented 1 month ago

Hi! 抱歉回复晚了,这些参数不属于Stage2, 而是属于Stage 1的LDR到HDR的reconstruction。请问您设置了mc_to_sky/config/stage2/multi_view_avg.yaml 中stage 1的ckpt了吗?

https://github.com/yifanlu0227/ChatSim/blob/923b20c99d40a7dc4bf0f4c3e6dd4a0a407162f7/chatsim/foreground/mclight/skydome_lighting/mc_to_sky/config/stage2/multi_view_avg.yaml#L41-L43

Screenshot 2024-09-28 at 17 49 01