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

GoPro Dataset Inconsistencies #65

Open
shekshaa opened this issue Aug 31, 2022 · 7 comments
Open

GoPro Dataset Inconsistencies #65

shekshaa opened this issue Aug 31, 2022 · 7 comments

Comments

@shekshaa
Copy link

Hi,
First of all, thank you for this great work!
I have downloaded both versions of GoPro dataset: GOPRO_Large and GOPRO_Large_all. I see following inconsistencies:

  1. When I load the middle sharp image from GOPRO_Large_all and compare it with the correspond sharp image provided in GOPRO_Large, I see that they are different, although their difference is less than 1 at gray-level. For instance, I expected that GOPRO_Large/train/GOPR0372_07_00/sharp/000047.png be equal to GOPRO_Large_all/train/GOPR0372_07_00/000326.png (the middle frame in the sequence from 000323.png to 00329.png), but it was not the case.
  2. When I follow the procedure mentioned in Provide the blurring generation code? #13 and generate a blurry frame from GOPRO_Large_all, the result is close but does not exactly match the corresponding image in blur_gamma. The steps I take are as follows:
    • Open all frames in the sequence using PIL.Image
    • Convert them to numpy arrays and then normalize to range (0, 1)
    • Decode gamma (pow(img, 2.2))
    • Average all frames and re-apply gamma (pow(img, 1/2.2))
    • Clip and quantize to 8-bits.

I was wondering whether you took same steps to generate blurry images (I suspect that you have used ffmpeg to obtain blurry frames of the video). Also, I would appreciate it if you elaborate on the discrepancy between the sharp frames of two versions.

@SeungjunNah
Copy link
Owner

Hi @shekshaa
I am aware I had this issue before and I corrected the frames in GOPRO_Large_all a while ago.
When did you download the datasets?
Could you download the file again and check if it still suffers from misalignment?

The links are here (same as the public ones):

Best,
Seungjun

@shekshaa
Copy link
Author

shekshaa commented Sep 4, 2022

Previously, I downloaded the data on the first week of this August. Now, I use your link to download GOPRO_Large_all and it seems there is still misalignment, namely I loaded GOPRO_Large_all/train/GOPR0372_07_00/000326.png and GOPRO_Large/train/GOPR0372_07_00/sharp/000047.png are slightly different. I think I had the latest version.
Here is the code I am using to check if sharp images match:

import os
from PIL import Image
import numpy as np
path1 = '/path/to/GOPRO_Large_all/train/GOPR0372_07_00/000326.png'
path2 = '/path/to/GOPRO_Large/train/GOPR0372_07_00/sharp/000047.png'
img1 = np.asarray(Image.open(path1)).astype(float)
img2 = np.asarray(Image.open(path2)).astype(float)
print(np.allclose(img1, img2))
print(np.mean(np.abs(img2 - img1)))

The first and second prints return False and 0.303.., respectively.

@shekshaa
Copy link
Author

Hi @SeungjunNah, Is there any update on this? This issue is hindering comparison with previous work which are trained on inconsistent data.

@SeungjunNah
Copy link
Owner

SeungjunNah commented Sep 18, 2022

@shekshaa
I checked the frames and they look good to me.
It seems like the problem you mentioned is not the issue I thought.

  1. GOPRO_Large/train/GOPR0372_07_00/sharp/000047.png and GOPRO_Large_all/train/GOPR0372_07_00/000326.png are exactly identical.
    I read the images and computed the sum of absolute differences over all pixels in fp32 precision. It is 0.
import imageio
import numpy

img1 = imageio.imread('000047.png').astype(np.float32)
img2 = imageio.imread('000326.png').astype(np.float32)

diff = np.abs(img1 - img2).sum()
print(diff)
  1. There could be slight numerical differences by tools and packages. When I generated the images in 2016, I used MATLAB. I no longer have access to MATLAB license.
    No blurry frame is extracted from the video itself. Only the sharp images are obtained from the video. All blurry frames in GOPRO dataset is synthesized from the sharp frames.

@shekshaa
Copy link
Author

Strange! I just redowloaded the data (both GOPRO_Large and GOPRO_Large_all), ran exactly the above code you have shared, but obtained a non-zero value! I suspect that your data might be different from the one you shared here: https://seungjunnah.github.io/Datasets/gopro
I am using SNU servers link.

@SeungjunNah
Copy link
Owner

Did you try the data on Google Drive?

@shekshaa
Copy link
Author

shekshaa commented Oct 9, 2022

No. As I am downloading data within another server which has banned google drive, I used SNU server links. Do you mean that the one in SNU is not the same as the one in google drive?

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

2 participants