Error when running the DTU Test
Closed this issue · 5 comments
*Interval_Scale
1.06
dataset test metas: 1078 interval_scale:{'scan1': 1.06, 'scan4': 1.06, 'scan9': 1.06, 'scan10': 1.06, 'scan11': 1.06, 'scan12': 1.06, 'scan13': 1.06, 'scan15': 1.06, 'scan23': 1.06, 'scan24': 1.06, 'scan29': 1.06, 'scan32': 1.06, 'scan33': 1.06, 'scan34': 1.06, 'scan48': 1.06, 'scan49': 1.06, 'scan62': 1.06, 'scan75': 1.06, 'scan77': 1.06, 'scan110': 1.06, 'scan114': 1.06, 'scan118': 1.06}
drop_path_rate: --- 0.2
Traceback (most recent call last):
File "/mnt/d/s225241/MVSFormer/test.py", line 585, in
save_depth(testlist, config)
File "/mnt/d/s225241/MVSFormer/test.py", line 198, in save_depth
model = TwinMVSNet(config['arch']['args'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/d/s225241/MVSFormer/models/mvsformer_model.py", line 329, in init
self.vit = gvts.alt_gvt_small()
^^^^^^^^^^^^^^^^^^^^
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 552, in init
super(alt_gvt_small, self).init(
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 469, in init
super(ALTGVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 458, in init
super(PCPVT, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads,
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 386, in init
super(CPVTV2, self).init(img_size, patch_size, in_chans, num_classes, embed_dims, num_heads, mlp_ratios,
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 276, in init
_block = nn.ModuleList([block_cls(
^^^^^^^^^^^
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 276, in
_block = nn.ModuleList([block_cls(
^^^^^^^^^^
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 205, in init
super(GroupBlock, self).init(dim, num_heads, mlp_ratio, qkv_bias, qk_scale, drop, attn_drop,
TypeError: Block.init() takes from 3 to 10 positional arguments but 11 were given
Hi, you should check the timm version in the environment.
Hello and thank you for your suggestion! I had problems installing the specified version of various packages, may I ask the Python version used? And would it be possible to run the model with newer versions of Pytorch and the other packages? I think that was my mistake
Now the problem I get is the following:
Traceback (most recent call last):
File "/mnt/d/s225241/MVSFormer/test.py", line 585, in
save_depth(testlist, config)
File "/mnt/d/s225241/MVSFormer/test.py", line 197, in save_depth
from models.mvsformer_model import TwinMVSNet
File "/mnt/d/s225241/MVSFormer/models/mvsformer_model.py", line 4, in
import models.gvt as gvts
File "/mnt/d/s225241/MVSFormer/models/gvt.py", line 6, in
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/init.py", line 2, in
from .models import create_model, list_models, is_model, list_modules, model_entrypoint,
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/init.py", line 1, in
from .cspnet import *
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/cspnet.py", line 20, in
from .helpers import build_model_with_cfg
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/helpers.py", line 17, in
from .layers import Conv2dSame, Linear
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/layers/init.py", line 7, in
from .cond_conv2d import CondConv2d, get_condconv_initializer
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/layers/cond_conv2d.py", line 16, in
from .helpers import to_2tuple
File "/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/timm/models/layers/helpers.py", line 6, in
from torch._six import container_abcs
ImportError: cannot import name 'container_abcs' from 'torch._six' (/home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/torch/_six.py)
You could try to replace
from torch._six import container_abcs
with
import container.abc as container_abcs
in /home/matteo/miniconda3/envs/mvsf2/lib/python3.9/site-packages/torch/_six.py
I was able to run it, thank you for your help and support!