Questions tagged [ssim]

The structural similarity (SSIM) index is a method for measuring the similarity between two images

https://en.wikipedia.org/wiki/Structural_similarity

82 questions
3
votes
0 answers

Is it possible to vectorize, applying compare_ssim to every combination of images in two sets in Python?

I have two sets of images stored as 3D numpy arrays. All the images are the same size (28X28). I'd like to compare the images in each set to each other using compare_ssim. I have written the below code which is very slow. I've tried to vectorize…
P Donnelly
  • 31
  • 2
3
votes
1 answer

How to determine an image quality by SSIM?

I used to know that SSIM is a method for measuring the similarity between two images. How to determine the quality of processed image by SSIM score. Is the method has maximum or minimum value as the standard?
rizkie
  • 121
  • 1
  • 2
  • 7
3
votes
1 answer

Is it possible to make an SSIM algorithm in PHP?

Does PHP have enough low-layer methods in order to implement an image comparison metric such as SSIM (structural similarity)? Do you have an SSIM function for PHP? I've been searching but I can't find it. I will try to make it on my own, by…
Kevin Van Ryckegem
  • 1,915
  • 3
  • 28
  • 55
2
votes
1 answer

What purpose does .astype("uint8") have here?

(score,diff)= structural_similarity(original_gray,tempered_gray,full=True) diff = (diff*255).astype("uint8") print("SSIM:{}".format(score)) The above mentioned code is a snippet from a program that matches two images using their SSIM score. What I…
2
votes
0 answers

What is a better image similarity metric for these two black and white images?

So, I have a cGAN model that generates random images like the ones below. Using python's ssim metric, I'm trying to generate an image that is at least 80% similar to the one on the left. I have generated bout 20,000 images and the maximum similarity…
srv_77
  • 547
  • 1
  • 8
  • 20
2
votes
0 answers

SSIM function in TensorFlow 2.x

I'm trying to use tf.image.ssim() as my loss function for training my model and I explored a liitle bit how people have implemented it. Here they are: Working with SSIM loss function in tensorflow for RGB images Use SSIM loss function with Keras I…
shaurov2253
  • 183
  • 1
  • 12
2
votes
1 answer

Extract the floor layout and threshold with OpenCV and Python

I've tried to use SSIM to extract the difference between two images to get only the floor area (image_a is the original and image_b has painted floor). The output that was expected, is a threshold mask. The problem I had was that the thresholding…
arturkuchynski
  • 790
  • 1
  • 9
  • 27
2
votes
1 answer

Fine A Precentage(%) Similarity Index Between Two Images in Matlab/Python

I am trying to analyse two images: The origional and an approximated version generated using Fourier transforms. Example: Original: Approx: How can i find a value that represents the similarity between these two images. I have tried using SSIM in…
CWrecker
  • 509
  • 7
  • 14
2
votes
0 answers

How to calculate avrage PSNR when it contains inf values?

I got PSNR via VQMT, then I found some 'inf' values in the calculated csv file which I understood it means the frame in the decoded sequence is identical to the original video frame. There are also some values like 111.29. My question here is that…
Talia
  • 2,947
  • 4
  • 17
  • 28
2
votes
1 answer

How to find PSNR and SSIM of two video files in python using openCV and other libraries?

I want to find out PSNR and SSIM of two video files in python using openCv and numpy. How to find PSNR in python I tried below code for SSIM # compute the Structural Similarity Index (SSIM) between the two # images, ensuring that the difference…
A.Patel
  • 29
  • 1
  • 3
2
votes
2 answers

Why psnr & ssim values generated by ffmpeg is different those generated by H264

I am getting generated mp4 video stream from input stream (mxf or mov), and when doing this I am using -psnr as H264 parameter. The result is approx. 40 or 41. Then I am comparing input and output with psnr (or ssim) filter. Results approx. 20 or…
Ceyhun Çakar
  • 29
  • 1
  • 2
2
votes
2 answers

SSIM between different image resolutions

I need to compare the quality of streaming between Linux desktop server and an Android client. So I have two images one from Linux server and the other one from Android client and they have different resolution. My question is how to calculate SSIM…
1
vote
0 answers

Decompose SSIM to luminous, contrast, and Structure instead of luminous, and Contrast-Structure

Referring to this this paper, authors proposed to use structural similarity index measure (SSIM) with different luminous, contrast and structure weights. I have seen different implementations for SSIM (tensorflow, cv2, skimage, Pillow) and each of…
1
vote
1 answer

TensorFlow costum loss: Implement Mix of L1 loss an SSIM loss

I want to implement a similar loss function like in this paper: https://arxiv.org/pdf/1511.08861.pdf They are combining here the l1 (Mean Average Error) and the MS-SSIM Loss like in following equation: L_Mix = α · L_MSSSIM + (1 − α) · GaussFilter·…
StE
  • 11
  • 4
1
vote
1 answer

Python - Torchmetric SSIM depends on batch size

sry for the quick question, I just want to know wether I found a bug or if I do not understand something here. I got the following sample, where I print the ssim of the torchmetrics library of two tensors with the batchsize 8 and the single…
CaipiDE
  • 93
  • 1
  • 10