cszhilu1998/SelfDZSR

data preprocessing

Closed this issue · 6 comments

I try the demo image(from Nikon) you provided, it works well, which produces right Ref, LR and GT.

But I instead pick random images from original CameraFusion (images are shown in your CameraFusion), specifically, LR(wide) CameraFusion\train\LR\x1\IMG_2280.jpg(3024 * 4032) and Ref(telephoto) CameraFusion\train\Ref\x1(3024 * 4032) .

It didn't warp well.

Which configuartion should I modify?or something wrong with me?
camera_warp_HR

This may be due to the problem with the alignment method (PWC-Net). You can use x2~x8 downsampled images to calculate optical flow, which may be more stable. More advanced or robust alignment methods can also be tried.
Besides, the data pre-processing code is only for x4 zoom, some changes may be needed for other zooms.

Hi, having done what I know, : (

Before, keep all defalut settings, because I have no idea to do changes for other zoom, for Nikon(85/18), for CameraFusion(6.0/4.25), how to make changes?

Firstly, I take x2 image in original CameraFusion dataset, specically LR(wide) CameraFusion\train\LR\x2\IMG_2280.jpg(1512 * 2016) and Ref(telephoto) CameraFusion\train\Ref\x2(1512*2016) . It produces much more better result, yet still cannot produce LR,HR,REF, it warns me needs to be removed more boundaries, I don't know how to do that.Here is the image.
image

Secondly, inspired by this, I use matlab(imresize) to produce x2,x4,x8 corresponding images.Unfortunately, they all work bad, like this.
image

Thirdly, it seems that origial CameraFusion dataset do not produce x2 via matlab, otherwise it shoule be the same.

Have you followed this readme? Maybe you should first crop out the center areas of short-focus images.
Additionally, in the Line 340 of alignment code, in order to make the size ratio of the generated telephoto and short-focus images to be an integral multiple, we resize the telephoto image. You can try to change this to meet your own needs.

And you can change 'down_sampling_factor' in the Line 334 of alignment code for adjusting the downsampling ratio.

I make a mistake in imresize of matlab, saving .jpg instead of .png, and I correct it.

In your article, The focal length ratio between the telephoto and short-focal images is ∼2. Thus, it can constitute a ×2 DZSR dataset. Do you mean that you take x2 CameraFusion images(1512 * 2016) to preprocess instead of x1(3024 * 4032).

If so(I take the x2 CameraFusion images)

I follow your readme to crop out the center areas of short-focus images, for CameraFusion the focal length is
image

Those are for Nikon, x4 dataset. What number should I change for CameraFusion, I try a few number, they fails.
image
image

And there seems to have a variant in color_alignment, What should I change for this?
image

I’m sorry for ignoring you. I just discovered this problem when I checked the code. Please let me know if there are still problems now.