Conversation
| # print(np.mean(vec)) | ||
| sigma_sq = np.mean(vec**2) #-(np.mean(vec))**2 | ||
| sigma = np.sqrt(sigma_sq) | ||
| #sigma = np.sqrt(sigma_sq) |
There was a problem hiding this comment.
If sigma is not being used, let's remove these commented lines. Same on lines 42 and 43, and any other unnecessary comments.
| array_position = (np.abs(rho - r_gam)).argmin() | ||
| alphaparam = gam[array_position] | ||
| return alphaparam, sigma | ||
| return alphaparam, sigma_sq |
There was a problem hiding this comment.
Let's make sure that every function that uses estimateggdparam is updated to reflect this change.
There was a problem hiding this comment.
@avinabsaha in the MATLAB version was the second feature sigma^2 or sigma?
There was a problem hiding this comment.
sigma^2.
You can check here: https://github.com/utlive/BRISQUE/blob/bd088c3f6b745629caa02f663e4665cb51591ac0/MATLAB/brisque_feature.m#L21
In the Matlab code, estimateggdparam returns sigma but in the brisque_feature.m it is squared and added to the feature vector. Even the paper mentions using sigma^2.
I will check for compatibility with NIQE by the weekend and update the code.
There was a problem hiding this comment.
Thanks for catching that!
| array_position = (np.abs(rho - r_gam)).argmin() | ||
| alphaparam = gam[array_position] | ||
| return alphaparam, sigma | ||
| return alphaparam, sigma_sq |
There was a problem hiding this comment.
@avinabsaha in the MATLAB version was the second feature sigma^2 or sigma?
Summary of changes :