ByteDance-Seed / ByteDance-Seed/Depth-Anything-3

error ,parallel_utils.py", line 87, in get_length raise NotImplementedError

Open
#152 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.3k
Forks
702
PR merge metrics
No merged PRs in 30d

Description

[INFO ] using SwiGLU layer as FFN
[INFO ] using MLP layer as FFN
Loading weights from local directory
Model loaded on cuda
Traceback (most recent call last):
File "/appdata//Depth-Anything-3/da3_genn.py", line 29, in
prediction = model.inference(
^^^^^^^^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/api.py", line 196, in inference
imgs_cpu, extrinsics, intrinsics = self._preprocess_inputs(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/api.py", line 285, in _preprocess_inputs
imgs_cpu, extrinsics, intrinsics = self.input_processor(
^^^^^^^^^^^^^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/utils/io/input_processor.py", line 86, in __call__
results = self._run_parallel(
^^^^^^^^^^^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/utils/io/input_processor.py", line 147, in _run_parallel
results = parallel_execution(
^^^^^^^^^^^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/utils/parallel_utils.py", line 111, in parallel_execution
length = get_length(args, kwargs)
^^^^^^^^^^^^^^^https://github.com/ByteDance-Seed/Depth-Anything-3/issues/152#top^^^^^^^^^
File "/appdata//Depth-Anything-3/src/depth_anything_3/utils/parallel_utils.py", line 87, in get_length
raise NotImplementedError
NotImplementedError

安装方式 pip install -e ".[all]",
model 从modelscope下载的
运行da3.ipynb
prediction = model.inference 就报错了

prediction = model.inference(
image=image_paths,
process_res=504,
process_res_method="upper_bound_resize",
export_dir=None,
export_format="glb"
)

用官方图片就可以运行,自己的图片就以上报错
[INFO ] using SwiGLU layer as FFN
[INFO ] using MLP layer as FFN
Loading weights from local directory
Model loaded on cuda
[INFO ] Processed Images Done taking 0.07134819030761719 seconds. Shape: torch.Size([2, 3, 280, 504])
[INFO ] Model Forward Pass Done. Time: 1.5513248443603516 seconds
[INFO ] Conversion to Prediction Done. Time: 0.0018007755279541016 seconds
Depth shape: (2, 280, 504)
Extrinsics: (2, 3, 4)
Intrinsics: (2, 3, 3)

需要改这几个参数,分辨率?
process_res=504,
process_res_method="upper_bound_resize",
export_dir=None,
export_format="glb"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.