LPIPS for MegEngine
MegEngine port for LPIPS metric.
Get Started
Run pip3 install mge-lpips to install this package. The provided mge_lpips.LPIPS is a normal MegEngine M.Module which can be used as a metric or a loss function.
import numpy as np
import megengine as mge
from mge_lpips import LPIPS
metric_lpips = LPIPS(net="alex")
in1 = np.random.uniform(-1, 1, size=(2, 3, 256, 256)).astype(np.float32)
in2 = np.random.uniform(-1, 1, size=(2, 3, 256, 256)).astype(np.float32)
d = metric_lpips(mge.Tensor(in1), mge.Tensor(in2))
Acknowledgements
The code of this project is modified from the original LPIPS project. The backbone model code is modified from torchvision. The weights are from the origian LPIPS project and torchvision.
Metadata
Release files for mge-lpips 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mge_lpips-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mge_lpips-0.1.0-py3-none-any.whl |
Release files / mge_lpips-0.1.0-py3-none-any.whl
| Download URL | mge_lpips-0.1.0-py3-none-any.whl |
|---|---|
| Size | 48.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6ea87854392de059cc74ccb38fe11bd45e0c75b127944ea4da0a9947fd50bbc
|
|
BLAKE2b-256 checksum How to use checksums |
15fa90ac9104d6e6b8b83630055641bb9082032fc45eedb3f7bc1db1b1c3a06c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.4.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9
|
Security for mge-lpips 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.