-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Loading Pre-trained Weights: Size Mismatch in DPTDepthModel when trying to run for first time. #255
Comments
Same problem here |
@weijielyu I have managed to circumvent this issue by computing Depth of Field directly using this script, feel free to take a look: https://github.com/pablobiedma/DoF-with-MiDaSv3.1 |
Got it, thank you! |
|
If the version of timm is too high, it will cause this problem. I replaced timm 0.9.7 with version 0.6.12 adapted to the project, and the problem disappeared |
This solved the issue for me |
For easy inference see #259 |
Works nice! |
Thank you! I solved it through this way |
Hello everyone,
I am new to MiDaS and I am trying to get it to run for the first time.
I followed the instructions and added the downloaded weights to the weight folder.
Then I added 10 random images to the input folder.
After I run execution the following command:
python run.py --model_type dpt_swin2_tiny_256 --input input --output output
(also with model and weights for dpt_beit_large_512 and dpt_swin2_large_384) I get the following error message:Initialize
Essentially, I am encountering a size mismatch error when trying to load pre-trained weights into the DPTDepthModel. Despite ensuring that the model type and the pre-trained weights should be compatible, the error persists.
Do you know what my mistake is?
Any help is appreciated
The text was updated successfully, but these errors were encountered: