-
Notifications
You must be signed in to change notification settings - Fork 216
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
Cannot run ZoeDepth in Python 3.10+ #84
Comments
By your code, the model is loading but it's showing error when i try to get the depth_map prediction. I am getting error in infer_pil function. Were you able to suceesfully get the depth map? img_path = '/content/IMG_20231012_190249746.jpg' # Replace with your image file path depth = model_zoe_nk.infer_pil(img) colored_depth = colorize(depth) |
Try this solution,it is from a Chinese website https://blog.csdn.net/a486259/article/details/133099592.You need to modify the original code a bit. Anyway, it works for me. |
The error indicates that |
I had to do both: adjust the beit.py as well as manually cast to int(..) in midas to get it to work |
@AnthoneoJ thanks for help. An extra i changed in sanity.py at 37 as: Otherwise, it downloads again and overwrites the changes I made in the beit.py code. |
As far as I can tell, there is no way to run ZoeDepth in Python 3.10+, because torch v2 introduces a breaking change and v1 cannot run above python 3.9.
My goal is to run this code in Python 3.11 and Pytorch 2.1.0. This is necessary for me because reverting to Python 3.9 is breaking for other parts of my codebase.
I can load the model using the method in #82:
(in model_io.py)
But I still get the following error when trying to use the model.eval function:
#62 fixes this for models constructed locally, but even locally instantiating zoedepthNK in 'infer' downloads the statedict from this repo.
From config_zoedepth_nk.json
We need an update to this repo (or a release in an independent repo) that incorporates the fixes in #62
The text was updated successfully, but these errors were encountered: