droid_metric
droid_metric copied to clipboard
An error occurred after changing the weight of metric3d
Hello, thank you for your excellent work. After I changed the metric weight from metric_depth_vit_giant2_800k.pth to metric_depth_vit_large_800k.pth, the image tensor dimension was wrong.
Traceback (most recent call last):
File "D:\Project\reconstruction\droid_metric\reconstruct.py", line 108, in
return func(*args, **kwargs)
File "D:\Project\reconstruction\droid_metric\modules\metric.py", line 66, in call
pred_depth, pred_depth_scale, scale, output = get_prediction(
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\utils\do_test.py", line 155, in get_prediction
pred_depth, confidence, output_dict = model.module.inference(data)
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\model\monodepth_model.py", line 12, in inference
pred_depth, confidence, output_dict = self.forward(data)
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\model\model_pipelines_base_model_.py", line 13, in forward
output = self.depth_model(**data)
File "D:\anaconda3\envs\droid_metric\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\model\model_pipelines\dense_pipeline.py", line 14, in forward
features = self.encoder(input)
File "D:\anaconda3\envs\droid_metric\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\model\backbones\ViT_DINO_reg.py", line 1091, in forward
ret = self.forward_features(*args, **kwargs)
File "D:\Project\reconstruction\droid_metric\modules\metric3d\mono\model\backbones\ViT_DINO_reg.py", line 981, in forward_features
B, C, H, W = x.size()
ValueError: not enough values to unpack (expected 4, got 3)
Hi,
It seems that the problem comes from metric3d. I'm not sure if it works well with metric_depth_vit_giant2_800k.pth on your device. If that weights work, you can check the code for the backbone and adjust for the new weights, where nothoing is modified by this project.