Skip to main content

Pytorch implementation of Shift-tolerant LPIPS

Project description

ShiftTolerant-LPIPS

Shift-tolerant Perceptual Similarity Metric

Abhijay Ghildyal, Feng Liu. In ECCV, 2022. [Arxiv]

from stlpips_pytorch import stlpips
from stlpips_pytorch import utils

path0 = "<dir>/ShiftTolerant-LPIPS/imgs/ex_p0.png"
path1 = "<dir>/ShiftTolerant-LPIPS/imgs/ex_ref.png"

img0 = utils.im2tensor(utils.load_image(path0))
img1 = utils.im2tensor(utils.load_image(path1))

stlpips_metric = stlpips.LPIPS(net="alex", variant="shift_tolerant")

stlpips_metric(img0,img1)
# 0.7777554988861084

Citation

If you find this repository useful for your research, please use the following.

@inproceedings{ghildyal2022stlpips,
  title={Shift-tolerant Perceptual Similarity Metric},
  author={Ghildyal, Abhijay and Liu, Feng},
  booktitle={European Conference on Computer Vision},
  year={2022}
}

Acknowledgements

This repository borrows from LPIPS, Anti-aliasedCNNs, and CNNsWithoutBorders. We thank the authors of these repositories for their incredible work and inspiration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stlpips_pytorch-0.0.2.tar.gz (63.8 MB view details)

Uploaded Source

Built Distribution

stlpips_pytorch-0.0.2-py3-none-any.whl (63.8 MB view details)

Uploaded Python 3

File details

Details for the file stlpips_pytorch-0.0.2.tar.gz.

File metadata

  • Download URL: stlpips_pytorch-0.0.2.tar.gz
  • Upload date:
  • Size: 63.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.6

File hashes

Hashes for stlpips_pytorch-0.0.2.tar.gz
Algorithm Hash digest
SHA256 29b1d4615e18851571d3872c509e9df3f415a5ba406fd6ac757356c7767fa8a6
MD5 041e1d1d2cda47a65e9fb8b2446180a9
BLAKE2b-256 70654e34c0fe7661690a33c0a13252e592cb8c9939d097550a9ee879472dee3d

See more details on using hashes here.

File details

Details for the file stlpips_pytorch-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stlpips_pytorch-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a412bf901a97c942b37af57c7c63b6e5d1aebfe8d1dfc17853d4b2f878630645
MD5 23a1f670f144535f9837e3219acfc571
BLAKE2b-256 f8af98a4417833e6805254491f86f4ee55f8629fd2412d832b0049b33b27a9b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page