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

image size problem #1

Closed
zmh0510 opened this issue May 28, 2018 · 12 comments
Closed

image size problem #1

zmh0510 opened this issue May 28, 2018 · 12 comments

Comments

@zmh0510
Copy link

zmh0510 commented May 28, 2018

hello, it is a wonderful project! But i am wondering that i must input a fixed image to the project? say 6363? How can i input a 600480 image to the project? thanks a lot !

@yuke93
Copy link
Owner

yuke93 commented May 29, 2018

@zmh0510 Thanks for your comment! Yes, currently it only supports 63x63 input. We have tried a simple extension to support arbitrary size input. Specifically, we crop a large image into 63x63 patches and let each patch vote for a tool, then conducts the tool with most votes on the whole image. I plan to release this feature after updating training code.

@zmh0510
Copy link
Author

zmh0510 commented May 29, 2018

OK!looking forward to it, especially the training code!

@hernan3009
Copy link

@yuke93 It looks very interesting. Before see this issue I think in the following simple idea:

1 - Generate many patches sharing (in some way) common pixels.
I thought in something like: If a patch cover a 63*63 pixel square from (x_0,y_0) to (x_0+62,y_0+62), the next horizontal patch going from (x_0+31,y_0+31) to (x_0+31+62,y_0+31+62) ... And something analogous for the y coordinate.
2 - Then reconstruct the image using some kind of interpolation. For example, weighting the patch contribution depending on the distance to the patch center.

In your experience, do you think that this could work? If it is plausible, how can I choose "the best" output image for the patch? I see in the output something like:

mano_in_11_13_13.png mano_in_11_13.png mano_in_11.png
8_in_5_11_13.png 8_in_5_11.png 8_in_5.png

but I am unsure about the naming convention.

Regards

@yuke93
Copy link
Owner

yuke93 commented Jul 20, 2018

Hi @hernan3009 ,

I have tried some similar interpolation approaches as you said but the results are sometimes not pleasant because there is not any constraint about the selected toolchains between adjacent patches. When the selected toolchains are different, the interpolated image might look strange, and the PSNR is not as good as the voting method as I described above.

The number after '_in_' stands for the indices of sequentially selected tools. Please see the table below:

Index Distortion Type Distortion Level Interval
1 Gaussian blur [0, 1.25]
2 Gaussian blur [1.25, 2.5]
3 Gaussian blur [2.5, 3.75]
4 Gaussian blur [3.75, 5]
5 Gaussian noise [0, 12.5]
6 Gaussian noise [12.5, 25]
7 Gaussian noise [25, 37.5]
8 Gaussian noise [37.5, 50]
9 JPEG compression [60, 100]
10 JPEG compression [35, 60]
11 JPEG compression [20, 35]
12 JPEG compression [10, 20]
13 None N/A

@lvzhengyi0204
Copy link

Hello, it is a exciting work, I want to know whether the test stage have the ability of arbitrary size input.
In the code, I don't see the related features. I am looking forward to your reply.

@yuke93
Copy link
Owner

yuke93 commented Aug 22, 2018

Hi @lvzhengyi0204,

I haven't added this feature yet. I will implement the heuristic method, as discussed above, to support arbitrary size input, by the end of this week.

@yuke93
Copy link
Owner

yuke93 commented Aug 25, 2018

Dear all,

Thanks for your advice and comments. Now we support arbitrary input size while inference. Put your images in data/test/mine/ and then run

python main.py --dataset mine

@hernan3009
Copy link

Thank you! Works here under Python3.

@lvzhengyi0204
Copy link

Thank you very much! It helps a lot for my research work.

@yuke93
Copy link
Owner

yuke93 commented Aug 27, 2018

I am very glad that you like it 😃

@yuke93 yuke93 closed this as completed Aug 27, 2018
@s-sanyal
Copy link

I really liked this project. I recently faced an issue while using this project in Google Colab. absl.flags._exceptions.DuplicateFlagError: The flag 'log_dir' is defined twice. First from absl.logging, Second from /content/RL-Restore/main.py. Description from first occurrence: directory to write logfiles into
Could you please explain how to get rid of this issue. Thanks in advance :) @yuke93

@JialinKang
Copy link

I really liked this project. I recently faced an issue while using this project in Google Colab. absl.flags._exceptions.DuplicateFlagError: The flag 'log_dir' is defined twice. First from absl.logging, Second from /content/RL-Restore/main.py. Description from first occurrence: directory to write logfiles into
Could you please explain how to get rid of this issue. Thanks in advance :) @yuke93

I also have the same question, hope to get a reply! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants