Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
richzhang committed Sep 6, 2020
1 parent 167f74a commit 2b1ca85
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='lpips',
version='0.1',
author="Richard Zhang",
author_email="[email protected]",
description="LPIPS Similarity metric",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/richzhang/PerceptualSimilarity",
packages=['lpips'],
package_data={'lpips': ['weights/v0.0/*.pth','weights/v0.1/*.pth']},
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
)
4 changes: 2 additions & 2 deletions test_dataset_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

# evaluate model on data
if(opt.dataset_mode=='2afc'):
(score, results_verbose) = dm.score_2afc_dataset(data_loader, trainer.forward, name=dataset)
(score, results_verbose) = lpips.score_2afc_dataset(data_loader, trainer.forward, name=dataset)
elif(opt.dataset_mode=='jnd'):
(score, results_verbose) = dm.score_jnd_dataset(data_loader, trainer.forward, name=dataset)
(score, results_verbose) = lpips.score_jnd_dataset(data_loader, trainer.forward, name=dataset)

# print results
print(' Dataset [%s]: %.2f'%(dataset,100.*score))
Expand Down

0 comments on commit 2b1ca85

Please sign in to comment.