nekhtiari / image-similarity-measures

:chart_with_upwards_trend: Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows: RMSE, PSNR, SSIM, ISSM, FSIM, SRE, SAM, and UIQ.
MIT License
589 stars 68 forks source link

Missing normalisation in _ehs for ISSM #61

Open Mominno opened 9 months ago

Mominno commented 9 months ago

Hi, I've noticed that function _ehs uses np.histogram2d to calculate H used in ISSM, which isn't normalised, its just a sum of values. https://github.com/up42/image-similarity-measures/blob/8328230be0ab45cf3c01db301db4064564298a5c/image_similarity_measures/quality_metrics.py#L165C1-L171C50 In original paper on ISSM authors use normalized joint histogram, the normalisation being number of pixels in image (MxN for image of dimension MxN).

seedlit commented 9 months ago

@Mominno thanks for raising the issue. We will take a look :)

Or, if you prefer to become a contributor as well, feel free to open a PR :)

Mominno commented 9 months ago

Sure, I'm currently playing around with ISSM trying to get it work. :)

Mominno commented 9 months ago

finally got around to creating PR. https://github.com/up42/image-similarity-measures/pull/63