Quantitative evaluation of the images generated by GAN

3 views (last 30 days)
Hi,
and want to evaluate the similarity of the generated images with their originals.
I wan to use these quantitative metrics: SSIM, Mean Square Error (MSE), or Peak Signal to Noise Ratio (PSNR).
So, I need two images: 1)Generated image, 2) The original image to match with the generated image
I used the following code to get each generated image separately
I = extractdata( dlXGeneratedNew );
img = I (:,:,:,idx);
But I don't know which original image should be used with which generated image.
Could you please help, how to do this quantitative evaluation?

Answers (1)

Gayathri
Gayathri on 18 Sep 2024
Hello @S C.Carl,
Since standard GANs lack a one-to-one correspondence between input and output, “SSIM” is not an appropriate metric for evaluation.
Instead, we can use “Frechet Inception Distance (FID)” as a metric. The inception score estimates the quality of a collection of synthetic images based on how well the top-performing image classification model “inceptionv3” classifies them as one of 1,000 known objects. For calculating FID, you can use pre-trained “inceptionv3” model from the “Deep Learning Toolbox” as follows.
net = imagePretrainedNetwork("inceptionv3”)
original_features = activations(net, original_images, 'avg_pool');
generated_features = activations(net, generated_images, 'avg_pool');
fid_score = wassersteinDistance(original_features, generated_features);
You can read about the model in the following links.
The implementation of the “Wasserstein-distance” can be found below.
In addition to this, we can also use "No Reference Image Quality" metrics to assess the performance of GAN model like “BRISQUE”, “NIQE” or “PIQE”.
Please refer to the following MathWorks documentation for more information on the "No Reference Image Quality" metrics:
Hope you find this information helpful.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!