question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

module 'metrics.LPIPS' has no attribute 'models'

See original GitHub issue

Hi,

Nice project!

I had to change line 15 in file ./codes/metrics/LPIPS/models/networks_basic.py from import metrics.LPIPS.models as util to import models as util to get it to run. But I am not a python guy so to speak, so perhaps I did it wrong. Hope this helps.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
IceClearcommented, Jul 4, 2021

I have the same problem under python 3.6.13. However, reinstalling a new python env is somehow a little complex. I think changing import metrics.LPIPS.models as util to from metrics.LPIPS import models as util solves the problem.

0reactions
Sazojicommented, Jan 11, 2021

I can confirm that you need 3.7.4 for LPIPS to seem to work and a version of scikit-image >.18 due to a depreciation of measure.ssim to metrics.structural_similarity. also some of TensorFlow’s dependencies are still required to run, if someone opens anything up later with a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lpips - PyPI
This repository contains our perceptual metric (LPIPS) and dataset (BAPPS). It can also be used as a "perceptual loss". This uses PyTorch; a...
Read more >
Learned Perceptual Image Patch Similarity (LPIPS)
A low LPIPS score means that image patches are perceptual similar. Both input image patches are expected to have shape [N, 3, H,...
Read more >
AttributeError: module 'sklearn.metrics' has no attribute ...
I got an error: AttributeError: module 'sklearn.metrics' has no attribute 'calinski_harabaz_score'. This is the version I have:.
Read more >
Issues · richzhang/PerceptualSimilarity · GitHub - rpkg.in
LPIPS metric. pip install lpips. ... AttributeError: module 'lpips' has no attribute 'normalize_tensor' ... Scaling factors are not frozen by default.
Read more >
Generative Joint Source-Channel Coding for Semantic Image ...
traditional distortion metrics alone does not necessarily result in ... A single model trained with AF modules is shown by.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found