Skip to content

The checkpoints seem some questions #16

@mao1333

Description

@mao1333

I downloaded the released weights (https://github.com/gitbooo/CrossViVit/releases/tag/0.1.0) but encountered some naming mismatch issues when loading them:

ckpt = torch.load("/workspace/crossvivit/CrossViVit-main/checkpoints/crossvivit_multiquantile_large.ckpt", map_location='cpu')
/workspace/crossvivit/env1/lib/python3.10/site-packages/torchmetrics/utilities/imports.py:22: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import DistributionNotFound, get_distribution
Traceback (most recent call last):
File "", line 1, in
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 809, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 1172, in _load
result = unpickler.load()
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 1165, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'src.metrics.aufec'

ckpt = torch.load("/workspace/crossvivit/CrossViVit-main/checkpoints/crossvivit_multiquantile_large.ckpt", map_location='cpu')
Traceback (most recent call last):
File "", line 1, in
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 809, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 1172, in _load
result = unpickler.load()
File "/workspace/crossvivit/env1/lib/python3.10/site-packages/torch/serialization.py", line 1165, in find_class
return super().find_class(mod_name, name)
AttributeError: Can't get attribute 'RoCrossViViT_bis' on <module 'src.models.cross_vivit_bis' from '/workspace/crossvivit/CrossViVit-main/src/models/cross_vivit_bis.py'>

It seems there are some module and class naming inconsistencies between the released weights and the current codebase. Could you please help check and resolve these issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions