<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
{'fraction_non_alphanumeric': 0.16978193146417445, 'fraction_numerical': 0.10124610591900311, 'mean_word_length': 6.476744186046512, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '157368', 'license': 'MIT', 'n_tokens_mistral': 345, 'n_tokens_neox': 315, 'n_words': 47, 'path': '2DSRCNN.ipynb', 'repo_name': 'niazwazir/WAZIR_FIRST_PAPER', 'size': '642'}