8000 Small bugs on cache strategy for canon_views · Issue #118 · naver/mast3r · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Small bugs on cache strategy for canon_views #118
Open
@LongyiKim

Description

@LongyiKim

The cache file path for canon_views only depends on image path, but canon value comes from other matched images.
So if we only change images next time, but other parameters not changed (kw not changed), the value which is read from the cached file would be wrong.
cache = os.path.join(cache_path, 'canon_views', hash_md5(img) + f'_{subsample=}_{kw=}.pth')

Correct code, I think, would be like ...
cache = os.path.join(cache_path, 'canon_views', hash_md5(img) + '-' + hash_md5(sorted(other_matched_image_paths)) + f'_{subsample=}_{kw=}.pth')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0