Open wanghuahua576 opened 1 month ago
put the "class DepthPro" before the line154: def create_model_and_transforms
put the "class DepthPro" before the line154: def create_model_and_transforms
Maybe the import package path is wrong, try this from ...depth_pro import create_model_and_transforms, load_rgb
Maybe you are using an old Python version which does not support type declarations after type annotations. There are three solutions:
DepthPro
before the type annotation as you already mentionedDepthPro
like so: ) -> Tuple["DepthPro", Compose]:
from __future__ import annotations
at the top of the Python fileMaybe you are using an old Python version which does not support type declarations after type annotations. There are three solutions:
- put the class
DepthPro
before the type annotation as you already mentioned- put quotes around
DepthPro
like so:) -> Tuple["DepthPro", Compose]:
- (for Python 3.7+) add
from __future__ import annotations
at the top of the Python file
I tried the methods above, and it works. By the way, the statement of solution3 is in the code, i forgot ,thxxxxx~
when I was using run.py in command:
the command line shows:
it seems cannot find the model, how can i solve this problem? thx