Skip to content
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

Depth anything #54

Open
7rwang opened this issue Dec 25, 2024 · 8 comments
Open

Depth anything #54

7rwang opened this issue Dec 25, 2024 · 8 comments

Comments

@7rwang
Copy link

7rwang commented Dec 25, 2024

Hi, it seems like that there is no relation with depth-anything in submodules. Do I need install depth-anything manually?

@XLR-man
Copy link

XLR-man commented Jan 6, 2025

Hi, i have the same issue, did you solve it?

@7rwang
Copy link
Author

7rwang commented Jan 7, 2025

Just install Depth-anything manually and rename it as Depthanything corresponding to the call

@XLR-man
Copy link

XLR-man commented Jan 8, 2025

I download and rename, but got this problem, how to solve?

  File "/data/xielangren/project/CF-3DGS/trainer/trainer.py", line 125, in setup_depth_predictor
    from submodules.DepthAnything.depth_anything.dpt import DepthAnything
  File "/data/xielangren/project/CF-3DGS/submodules/DepthAnything/depth_anything/dpt.py", line 7, in <module>
    from depth_anything.blocks import FeatureFusionBlock, _make_scratch
ModuleNotFoundError: No module named 'depth_anything'

@7rwang
Copy link
Author

7rwang commented Jan 8, 2025 via email

@XLR-man
Copy link

XLR-man commented Jan 8, 2025

File "/data/xielangren/project/CF-3DGS/trainer/trainer.py", line 125, in setup_depth_predictor
from submodules.DepthAnything.depth_anything.dpt import DepthAnything
File "/data/xielangren/project/CF-3DGS/submodules/DepthAnything/depth_anything/dpt.py", line 7, in
from depth_anything.blocks import FeatureFusionBlock, _make_scratch
ModuleNotFoundError: No module named 'depth_anything'

@7rwang
Copy link
Author

7rwang commented Jan 8, 2025 via email

@XLR-man
Copy link

XLR-man commented Jan 9, 2025

It works when change "from depth_anything.blocks import FeatureFusionBlock, _make_scratch" to ""from .blocks import FeatureFusionBlock, _make_scratch.

But i got a new issue:

File "/data/xielangren/project/CF-3DGS/trainer/trainer.py", line 128, in setup_depth_predictor
depth_anything = DepthAnything.from_pretrained('LiheYoung/depth_anything_{:}14'.format(encoder)).eval()
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/huggingface_hub/hub_mixin.py", line 550, in from_pretrained
instance = cls._from_pretrained(
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/huggingface_hub/hub_mixin.py", line 771, in from_pretrained
model = cls(**model_kwargs)
File "/data/xielangren/project/CF-3DGS/submodules/DepthAnything/depth_anything/dpt.py", line 171, in init
super().init(**config)
File "/data/xielangren/project/CF-3DGS/submodules/DepthAnything/depth_anything/dpt.py", line 147, in init
self.pretrained = torch.hub.load('torchhub/facebookresearch_dinov2_main', 'dinov2{:}14'.format(encoder), source='local', pretrained=False)
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/torch/hub.py", line 558, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/torch/hub.py", line 584, in _load_local
hub_module = _import_module(MODULE_HUBCONF, hubconf_path)
File "/data/xielangren/miniconda3/envs/cf3dgs/lib/python3.10/site-packages/torch/hub.py", line 98, in _import_module
spec.loader.exec_module(module)
File "", line 879, in exec_module
File "", line 1016, in get_code
File "", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/data/xielangren/project/CF-3DGS/torchhub/facebookresearch_dinov2_main/hubconf.py'

How to solve it?
How do you run it successfully? Can you give your steps?

@XLR-man
Copy link

XLR-man commented Jan 9, 2025

I have solved!
there is no problem now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants