Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super resolution - Direct comparison of the selected region, magnified image 1:1 output #11

Closed
Faberman opened this issue Jun 30, 2021 · 13 comments
Assignees
Labels
enhancement New feature or request good issue Good feedback

Comments

@Faberman
Copy link
Collaborator

Faberman commented Jun 30, 2021

Hello.
Thank you for this useful tool, but I can't figure out if it is possible to compare a part of multiple very similar images on the original scale (100%).

For example, I have 8 high resolution output images from 8 super-resolution GANs.
click for original image
original-multi

They are very similar, yet I'd like to spot the differences. So, I would like to select a region and view that region from all the images at 100% scale.
selection

Just like this - only the selected region, without the original images (because they are huge).

@nachifur
Copy link
Owner

nachifur commented Jun 30, 2021

Thank you for your interest in MulimgViewer. I understand what you want to do. I am considering solving your problem. Can you wait for me for a few minutes? If the picture does not involve privacy, you can send a few test images to my email. liujiawei@sia.cn

@nachifur nachifur added enhancement New feature or request good issue Good feedback labels Jun 30, 2021
@Faberman
Copy link
Collaborator Author

I can provide the real images if you need them, but I think they are a bit heavy for debugging purposes. Just use those lightweight test images I used for my examples: test_images.zip

@nachifur
Copy link
Owner

nachifur commented Jun 30, 2021

Now, I can give you an imperfect solution.

  • Select all pictures for comparison, show scale can be set to 0.2, 0.2, output scale can be set to 1,1.
  • Then save image, Output mode can be set to 7.
  • Find the magnifier_images folder in the save directory, then compare the pictures in the magnifier_images folder and set an appropriate show scale to avoid distortion.

Unfortunately, after these operations, there is no guarantee that magnifier_images is on the original scale (100%).
Your question is very good, I will try to solve it in the next version!

@nachifur
Copy link
Owner

nachifur commented Jun 30, 2021

At present, for the output of the magnifier image, I forcibly resize it, which is the reason why magnifier images on the original scale (100%) cannot be obtained. This is unreasonable and I will modify it. Thank you for pointing this out!

def magnifier_preprocessing(self, img, img_mode=0):

@Faberman
Copy link
Collaborator Author

Thank you! Yes, unfortunately, at the moment the magnifier_images are getting resized. Upscaling with a subsequent downscaling is not that good for a pixel-perfect comparison.

By the way, here is an updated pack of test images - easier to test multi-region options.
test_images_multi.zip

@nachifur
Copy link
Owner

Yes, this is very challenging, I will think of a perfect way to solve it. Thank you!

@nachifur
Copy link
Owner

If there are any improvements or bugs, please call me, and I will try my best to improve MulimgViewer.
You can recommend MulimgViewer to those around you who need it. My personal propaganda power is seriously insufficient. Thanks you!

@Faberman
Copy link
Collaborator Author

Faberman commented Jun 30, 2021

Your tool is really unique and I will definitely recommend it to anyone. Now there is only one option for an image comparison - FastStone Image Viewer. But it's able to compare only 4 images. Probably sufficient for an average user, but it's not enough for those who deal with GANs.

@nachifur
Copy link
Owner

nachifur commented Jul 1, 2021

I am not a native speaker, but I hope MulimgViewer has a fluent and readable English version of the readme. I don't know if you are willing to maintain the English version of the readme. If you want to do this, I sincerely appreciate you.

@nachifur nachifur changed the title Direct comparison of the selected region Direct comparison of the selected region, magnified image 1:1 output Jul 1, 2021
@Faberman
Copy link
Collaborator Author

Faberman commented Jul 2, 2021

I can't edit wiki directly and GitHub doesn't support pull requests for the wiki, but I've edited some confusing parts, so here is an updated Readme: https://gist.github.com/Faberman/e7533e7bab499ebddaca7f27f86609a9

@nachifur
Copy link
Owner

nachifur commented Jul 2, 2021

Thank you for your polish of the English readme. In order to have greater rights to contribute to MulimgViewer, I have invited you to be a collaborator.

@nachifur
Copy link
Owner

Sorry, due to my busy schedule recently, I may not be able to update the functions in time in the recent period. You now have the right to commit directly, if you want, you can try to create a new branch to complete this function. Thank you for any contributions.
Besides, I also hope that we will become in-depth collaborators, both in this project or an academic article.

@nachifur
Copy link
Owner

nachifur commented Aug 16, 2021

I have implemented this feature, you need to use python script to run.
image

Process Flow:

  1. Show original=True, input mode=Sequential, Num per img=-1, 🔍️Scale=1,1. Use multi-box zoom mode. Then refresh GUI by ctrl+r.
  2. Show original=False, Then refresh GUI by ctrl+r.
  3. If you only have one box, by setting Show box in 🔍️=False, you can eliminate the box of the enlarged image.

In addition, you can set 🔍️Scale=1,1 to achieve saving on the original scale (100%) for the output of the magnifier image.

test file:
https://github.com/nachifur/MulimgViewer/files/6742637/test_images_multi.zip

pip installation:

pip install wxpython pillow pytest-shutil

run:

python3 MulimgViewer.py

Has your problem been solved?
Finally, sincerely thank you for your contribution to MulimgViewer.

@nachifur nachifur changed the title Direct comparison of the selected region, magnified image 1:1 output Super resolution - Direct comparison of the selected region, magnified image 1:1 output Sep 7, 2021
@nachifur nachifur self-assigned this Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good issue Good feedback
Projects
None yet
Development

No branches or pull requests

2 participants