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

Flickering problem in 3-exposure-3stop video #15

Open
xliuk opened this issue Oct 6, 2022 · 12 comments
Open

Flickering problem in 3-exposure-3stop video #15

xliuk opened this issue Oct 6, 2022 · 12 comments

Comments

@xliuk
Copy link

xliuk commented Oct 6, 2022

Hi,
i'm testing your code on my own datasets, captured with a Canon and preprocessed as required.
In particular i'm using sequences of three alternating exposures.
When i have a configuration {EV-2, EV+0, EV+2, ...} your code works fine.
Instead, when i have a configuration {EV-3, EV+0, EV+3, ...}, i get 'periodically' flickering: i.e., if H_i is a HDR frame, it doesn't match with H_{i+1} and H_{i+2} (flickering), but it matches with H_{i+3}.
Why do i get this flickering problem?
I attach two hdr video of a static scene to show this. Below I specify exposure times (in seconds). Aperture and iso are constant in both (ISO 800, f3.5).
1- First HDR video: {EV-2, EV+0, EV+2, ...}, exposure times {1/320, 1/80, 1/20}
2- Second HDR video: {EV-3, EV+0, EV+3, ...}, exposure times {1/640, 1/80, 1/10}

3expo_2stop.mov
3expo_3stop.mov
@guanyingc
Copy link
Owner

Hi, may I ask the following questions?

  1. What is the configuration for the three-stop exposure? Are you using {EV-3, EV+0, EV+3, EV-3, EV+0...} or {EV-3, EV+0, EV+3, EV+0, EV-3...}. Make sure you are using the first one.
  2. What is the testing command? Please make sure you are using the three-exposure model, and you should also set the exposure order in the exposures.txt in the dataset directory. You may follow the data organization of TOG13 dataset or the introduced dataset in https://github.com/guanyingc/DeepHDRVideo-Dataset/.

I think this problem might come from the inaccurate data organization. Hope this help.

@xliuk
Copy link
Author

xliuk commented Oct 7, 2022

(Sorry i closed this issue accidentally)
Thank you for your reply! I rechecked data organization and it seems good. I used for
{EV-3, EV+0, EV+3, EV-3, EV+0...} the same data organization of {EV-2, EV+0, EV+2, EV-2, EV+0...}, but the first one still doesn't work. I also made a try with {EV-1, EV+0, EV+1, EV-1, EV+0...}, and this seems to work fine.
I reply to your questions:

  1. The configuration is {EV-3, EV+0, EV+3, EV-3, EV+0...}. I attach a screenshot video to show this. I also attach the img_list.txt and Exposures.txt.
3expo_3stop.mov

img_list

Exposures

  1. This is the testing command i used:

python run_model.py --gpu_ids 0 --model hdr3E_flow2s_model --benchmark Liuk_Dataset --bm_dir data/Liuk_Dataset --test_scene lamp_3expo_3stop --mnet_name weight_net --mnet_checkp data/models/CoarseToFine_3Exp/weight_net.pth --fnet_checkp data/models/CoarseToFine_3Exp/flow_net.pth --mnet2_checkp data/models/CoarseToFine_3Exp/refine_net.pth

As you can see I created a dataloader for my own dataset (Liuk_Dataset), that is the same of TOG13 dataloader, except for the part where LDRs are loaded:

img = iutils.apply_gamma(iutils.read_16bit_tif(img_paths[i], crf=self.crf), gamma=2.2)

I didn't need to apply CRF and gamma, because i preprocessed raw frames as you did for your real benchmark dataset (white balance, demosaicing, gamma correction). So i used the part of code from real_benchmark dataset loader:

for i in range(ldr_start, ldr_end):
if img_paths[i][-4:] == '.tif':
img = iutils.read_16bit_tif(img_paths[i])
else:
img = imread(img_paths[i]) / 255.0
item['ldr_%d' % i] = img

@xliuk xliuk closed this as completed Oct 7, 2022
@xliuk xliuk reopened this Oct 7, 2022
@guanyingc
Copy link
Owner

Hi, I understand you question now. When using 3-exposure-2stop or 3-exposure-1stop videos, the results are reasonable. But if tested with 3-exposure-3stop video, the results are flickering.

This observation is interesting, if you confirm the data organization. In fact, I have not tested with 3-exposure-3stop video.

Could you also check the coarse reconstruction results? Let's first see which stage goes wrong.

@xliuk
Copy link
Author

xliuk commented Oct 7, 2022

Yes, that's exactly what i meant. I think data organization is ok, because i used the same organization for 3-exposure-3stop, 3-exposure-2stop, 3-exposure-1stop videos.
Honestly, i don't know how the code works and so i don't know how to check each part of the network. I just tested its results on several datasets.
If you want, i can share you my 3-exposure-3stop datasets, so we can see which stage goes wrong.

@guanyingc
Copy link
Owner

Ok, you could send me the dataset (e.g., a google drive link to [email protected]). I will have a check when I have time. Thanks.

@xliuk
Copy link
Author

xliuk commented Oct 8, 2022

Ok i sent you a google drive link. Let me know. Thanks!

@guanyingc
Copy link
Owner

Hi, it seems that I haven't received the link.

@xliuk
Copy link
Author

xliuk commented Oct 10, 2022 via email

@guanyingc
Copy link
Owner

Hi, I have tested the code and the results are similar to yours. I think there is a bug in the code, which might be the thresholds used for determining the masks. Previous, we don't experimented with such a large stop in the three-exposure scene.

Since I haven't play with this code for a long time and I am busy in other matters, I am afraid I have no time to look into this problem. Sorry.

@guanyingc guanyingc changed the title Flickering problem Flickering problem in 3-exposure-3stop video Oct 12, 2022
@xliuk
Copy link
Author

xliuk commented Oct 12, 2022 via email

@syujung
Copy link

syujung commented Oct 21, 2022

Dear xliuk,
I also have a Canon camera ,I wonder how did you adjust the camera to capture a scene in alternating exposures way?Or you just manually adjust exposure time when you capture a scene?Can you share the way to capture a scene in alternating exposures way (Canon camera)?
Looking forward to your reply!

@syujung
Copy link

syujung commented Oct 21, 2022

@xliuk

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

3 participants