You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I visualize the img2 in max_ssim.py, but it is not the gif shown in the home page. what mistake do I make? The following is the code, modified in max_ssim.py.
#22
Open
THHHomas opened this issue
Aug 12, 2019
· 1 comment
You haven't explained what kind of results you get, but I guess you are looking at a noisy white image. After you multiply the array by 255 you also need to convert it to a byte type.
while ssim_value < 0.95:
optimizer.zero_grad()
ssim_out = -ssim_loss(img1, img2)
ssim_value = - ssim_out.item()
print(ssim_value)
ssim_out.backward()
optimizer.step()
ii = np.transpose(img2[0].detach().cpu().numpy(), (1,2,0))
cv2.imshow("pre", ii255)
print(np.max(ii255))
cv2.waitKey(100)
The text was updated successfully, but these errors were encountered: