New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

DMM-PyTorch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

DMM-PyTorch

Debiased Mapping for Full-Reference Image Quality Assessment

pipPyPI
Version
0.1
Maintainers
1

Debiased Mapping for Full-Reference Image Quality Assessment

This is the repository of paper Debiased Mapping for Full-Reference Image Quality Assessment.

Highlights:

  • The perception bias of existing deep-feature based FR-IQA measures is explored, which may cause inferior performance on misaligned features and restored content.
  • We propose an SVD-based debiased mapping to mitigate the perception bias. Specifically, the SVs distance and base angle consistency are designed to capture and measure the feature distortion reliably.

====== PyTorch Implementation ======

Installation:

  • pip install DMM-PyTorch

Requirements:

  • Python >= 3.6
  • PyTorch >= 1.0

Usage:


from DMM_PyTorch import DMM
from torchvision import transforms
from PIL import Image

def prepare_PIL_Image(PIL_Image):
    msize = min(PIL_Image.size)
    if  msize>128:
        tar_size = max(int(msize/(1.0*48))*32,128)
        image =transforms.functional.resize(PIL_Image,tar_size)
    image = transforms.ToTensor()(image)
    return image.unsqueeze(0)

model = DMM().cuda()

ref_pth =  './Images/I04.BMP'  
dist_pth =  './Images/i04_24_2.bmp' 
  
ref =  prepare_PIL_Image(Image.open(ref_pth).convert("RGB")).cuda()
dist = prepare_PIL_Image(Image.open(dist_pth).convert("RGB")).cuda()

dmm_score = model(ref, dist)
print(dmm_score)

or

git clone https://github.com/Baoliang93/DMM
cd DMM_PyTorch
python DMM.py --ref <ref_path> --dist <dist_path>

Keywords

pytorch

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts