<jupyter_start><jupyter_text>PSNR and SSIM for test image.<jupyter_code>img = nib.load('drive/My Drive/Scans/108525_3T_T1w_MPR1.nii.gz')
img_data = img.get_fdata()
img_data /= img_data.max()
img_data *= 255
img_data = np.array(img_data, dtype='uint8')

img_data_lr = fft_lr(img_data, 2)
img_data_lr = np.array(img_data_lr, dtype='uint8')

hr1 = img_data[113,:,:]
lr1 = img_data_lr[113,:,:]
lr1_1 = np.reshape(lr1, (1, hr1.shape[0], hr1.shape[1], 1))
lr1_1.shape

sr1 = model.predict(lr1_1)
sr1 = np.reshape(sr1,hr1.shape)

print(psnr(hr1, sr1))
s, d = measure.compare_ssim(hr1, sr1, full=True)
print(s)<jupyter_output>31.904
0.922699534593078
StarcoderdataJupyterStructuredCleanDedup