You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vit_base_resnet50_384 was a deprecated (now-removed) alias for vit_base_r50_s16_384 (see [here]). This PR makes omnidata-tools compatible with recent versions of timm and does not affect compatibility with the timm version listed in the existing requirements.txt.
Traceback (most recent call last):
File "demo.py", line 63, in
model = DPTDepthModel(backbone='vitb_rn50_384', num_channels=3) # DPT Hybrid
File "/media/data2/taojiazheng/omnidata-main/omnidata_tools/torch/modules/midas/dpt_depth.py", line 101, in init
super().init(head, **kwargs)
File "/media/data2/taojiazheng/omnidata-main/omnidata_tools/torch/modules/midas/dpt_depth.py", line 48, in init
self.pretrained, self.scratch = _make_encoder(
File "/media/data2/taojiazheng/omnidata-main/omnidata_tools/torch/modules/midas/blocks.py", line 20, in _make_encoder
pretrained = _make_pretrained_vitb_rn50_384(
File "/media/data2/taojiazheng/omnidata-main/omnidata_tools/torch/modules/midas/vit.py", line 483, in _make_pretrained_vitb_rn50_384
model = timm.create_model("vit_base_r50_s16_384", pretrained=pretrained)
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/factory.py", line 81, in create_model
model = create_fn(pretrained=pretrained, **kwargs)
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/vision_transformer_hybrid.py", line 238, in vit_base_r50_s16_384
model = _create_vision_transformer_hybrid(
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/vision_transformer_hybrid.py", line 146, in _create_vision_transformer_hybrid
return _create_vision_transformer(
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/vision_transformer.py", line 531, in _create_vision_transformer
model = build_model_with_cfg(
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/helpers.py", line 457, in build_model_with_cfg
load_pretrained(
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/timm/models/helpers.py", line 184, in load_pretrained
state_dict = load_state_dict_from_url(pretrained_url, progress=progress, map_location='cpu')
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/torch/hub.py", line 557, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/torch/serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/taojiazheng/anaconda3/envs/omnidata/lib/python3.8/site-packages/torch/serialization.py", line 794, in _legacy_load
deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 978043 more bytes. The file might be corrupted.
There are still issues after modification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vit_base_resnet50_384was a deprecated (now-removed) alias forvit_base_r50_s16_384(see [here]). This PR makesomnidata-toolscompatible with recent versions oftimmand does not affect compatibility with thetimmversion listed in the existingrequirements.txt.