Code for robust monocular depth estimation described in "Ranftl et. al., Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer, TPAMI 2022"
MIT License
4.55k
stars
634
forks
source link
TypeError: NextViT.__init__() got an unexpected keyword argument 'pretrained_cfg_overlay' #271
Any idea how to solve this? I am clueless. Thanks!
(midas-py310) C:\Midas\MiDaS>python run.py --model_type dpt_next_vit_large_384 --input_path "C:\Midas\MiDaS\input" --output_path "C:\Midas\MiDaS\output"
Initialize
Device: cpu
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:375: UserWarning: Overwriting nextvit_small in registry with midas.external.next_vit.classification.nextvit.nextvit_small. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:381: UserWarning: Overwriting nextvit_base in registry with midas.external.next_vit.classification.nextvit.nextvit_base. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:387: UserWarning: Overwriting nextvit_large in registry with midas.external.next_vit.classification.nextvit.nextvit_large. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
@register_model
Traceback (most recent call last):
File "C:\Midas\MiDaS\run.py", line 276, in
run(args.input_path, args.output_path, args.model_weights, args.model_type, args.optimize, args.side, args.height,
File "C:\Midas\MiDaS\run.py", line 126, in run
model, transform, net_w, net_h = load_model(device, model_path, model_type, optimize, height, square)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\model_loader.py", line 124, in load_model
model = DPTDepthModel(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 160, in init
super().init(head, kwargs)
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 71, in init
self.pretrained, self.scratch = _make_encoder(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\blocks.py", line 85, in _make_encoder
pretrained = _make_pretrained_next_vit_large_6m(hooks=hooks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\backbones\next_vit.py", line 33, in _make_pretrained_next_vit_large_6m
model = timm.create_model("nextvit_large")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Neo\anaconda3\envs\midas-py310\Lib\site-packages\timm\models_factory.py", line 117, in create_model
model = create_fn(
^^^^^^^^^^
File "C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py", line 389, in nextvit_large
model = NextViT(stem_chs=[64, 32, 64], depths=[3, 4, 30, 3], path_dropout=0.2, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NextViT.init() got an unexpected keyword argument 'pretrained_cfg_overlay
`
Any idea how to solve this? I am clueless. Thanks!
(midas-py310) C:\Midas\MiDaS>python run.py --model_type dpt_next_vit_large_384 --input_path "C:\Midas\MiDaS\input" --output_path "C:\Midas\MiDaS\output" Initialize Device: cpu C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:375: UserWarning: Overwriting nextvit_small in registry with midas.external.next_vit.classification.nextvit.nextvit_small. This is because the name being registered conflicts with an existing name. Please check if this is not expected. @register_model C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:381: UserWarning: Overwriting nextvit_base in registry with midas.external.next_vit.classification.nextvit.nextvit_base. This is because the name being registered conflicts with an existing name. Please check if this is not expected. @register_model C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py:387: UserWarning: Overwriting nextvit_large in registry with midas.external.next_vit.classification.nextvit.nextvit_large. This is because the name being registered conflicts with an existing name. Please check if this is not expected. @register_model Traceback (most recent call last): File "C:\Midas\MiDaS\run.py", line 276, in
run(args.input_path, args.output_path, args.model_weights, args.model_type, args.optimize, args.side, args.height,
File "C:\Midas\MiDaS\run.py", line 126, in run
model, transform, net_w, net_h = load_model(device, model_path, model_type, optimize, height, square)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\model_loader.py", line 124, in load_model
model = DPTDepthModel(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 160, in init
super().init(head, kwargs)
File "C:\Midas\MiDaS\midas\dpt_depth.py", line 71, in init
self.pretrained, self.scratch = _make_encoder(
^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\blocks.py", line 85, in _make_encoder
pretrained = _make_pretrained_next_vit_large_6m(hooks=hooks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Midas\MiDaS\midas\backbones\next_vit.py", line 33, in _make_pretrained_next_vit_large_6m
model = timm.create_model("nextvit_large")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Neo\anaconda3\envs\midas-py310\Lib\site-packages\timm\models_factory.py", line 117, in create_model
model = create_fn(
^^^^^^^^^^
File "C:\Midas\MiDaS\midas\external\next_vit\classification\nextvit.py", line 389, in nextvit_large
model = NextViT(stem_chs=[64, 32, 64], depths=[3, 4, 30, 3], path_dropout=0.2, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NextViT.init() got an unexpected keyword argument 'pretrained_cfg_overlay
`