shacharBD / LightFieldRefocusing

Code for our paper "Deep Sparse Light Field Refocusing", BMVC 2020
MIT License
7 stars 2 forks source link

Values of the parameter pixels #4

Open sky-fly97 opened 2 years ago

sky-fly97 commented 2 years ago

Hello, in the article, The values of the parameter pixels were chosen empirically in the range **[-1.50,1.30] with spaces of 0.05**. These values were selected to match the existing range in the Lytro dataset. This refocused coefficient is for Lytro dataset, but in the current python code it is mentioned that the coefficient range is only half of the article, how should I set this range if I want to train for Lytro dataset? What does "an additional resizing step" mean? Will it have a critical impact on the training?

sky-fly97 commented 2 years ago

Is there anyone, please?

shacharBD commented 2 years ago

Hello! First, let me apologize for not responding to your first mail. I have busy times at work lately and I simply missed it. Originally I trained the network using data that was interpolated. That means that I used a synthesis network to generate the in-between views of a 9x9 light field grid, to get a field of 17x17. Then I computed one ground truth refocused image for each focus using the 17x17 grid, by shifting and averaging (traditional refocusing method). The interpolation was needed in order to smooth the ground truth refocused image.

I am not sure I understand your question. Are you trying to re-train on the data? Do you have a code for training?

Regards, Shachar

בתאריך שבת, 8 בינו׳ 2022, 13:56, מאת sky-fly97 @.***>:

Is there anyone, please?

— Reply to this email directly, view it on GitHub https://github.com/shacharBD/LightFieldRefocusing/issues/4#issuecomment-1007969802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5EZZKMCNUACYYEVN7LUVAQ53ANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

sky-fly97 commented 2 years ago

Hello! First, let me apologize for not responding to your first mail. I have busy times at work lately and I simply missed it. Originally I trained the network using data that was interpolated. That means that I used a synthesis network to generate the in-between views of a 9x9 light field grid, to get a field of 17x17. Then I computed one ground truth refocused image for each focus using the 17x17 grid, by shifting and averaging (traditional refocusing method). The interpolation was needed in order to smooth the ground truth refocused image. I am not sure I understand your question. Are you trying to re-train on the data? Do you have a code for training? Regards, Shachar בתאריך שבת, 8 בינו׳ 2022, 13:56, מאת sky-fly97 @.>: Is there anyone, please? — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5EZZKMCNUACYYEVN7LUVAQ53ANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.>

Thank you very much for your reply.I am not understanding the different ranges of Matlab and python code that you mentioned. [-1.50,1.30] or [-0.75, 0.65]? Note: Original code for shifting and refocusing was written in Matlab, and was using an additional resizing step. The current python code does not include this step and therefore the parameter "focus" should be half of the range that was mentioned in the paper **(-0.75 instead of -1.50, etc.).**

I currently want to retrain the network and improve its performance, but I don't have the training code yet, could you share the training code with me? I would appreciate it if you could!

shacharBD commented 2 years ago

Hi!

Regarding the training code - I do not have it available. I only released the inference code. Regarding the refocusing range: originally I added another resizing step to the code, which was written in matlab. In this release, I transferred this code to python, so it would be more compatible with the rest of the code. I adjusted the code without the resizing step, so the focus parameter needs to be halved for the same dataset. However, if you use a different dataset, the focus parameter will probably be different anyway. In this case, you can run with different focus ranges and find the correct parameter empirically. Please let me know if you have any questions! You can also send me a direct email if it's easier for you. Regards, Shachar

On Sun, Jan 9, 2022 at 5:55 PM sky-fly97 @.***> wrote:

Hello! First, let me apologize for not responding to your first mail. I have busy times at work lately and I simply missed it. Originally I trained the network using data that was interpolated. That means that I used a synthesis network to generate the in-between views of a 9x9 light field grid, to get a field of 17x17. Then I computed one ground truth refocused image for each focus using the 17x17 grid, by shifting and averaging (traditional refocusing method). The interpolation was needed in order to smooth the ground truth refocused image. I am not sure I understand your question. Are you trying to re-train on the data? Do you have a code for training? Regards, Shachar בתאריך שבת, 8 בינו׳ 2022, 13:56, מאת sky-fly97 @.

>: … <#m4743825262422078394> Is there anyone, please? — Reply to this email directly, view it on GitHub <#4 (comment) https://github.com/shacharBD/LightFieldRefocusing/issues/4#issuecomment-1007969802>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5EZZKMCNUACYYEVN7LUVAQ53ANCNFSM5KC5ANDQ https://github.com/notifications/unsubscribe-auth/AHWWK5EZZKMCNUACYYEVN7LUVAQ53ANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.>

Thank you very much for your reply.I am not understanding the different ranges of Matlab and python code that you mentioned. [-1.50,1.30] or [-0.75, 0.65]? Note: Original code for shifting and refocusing was written in Matlab, and was using an additional resizing step. The current python code does not include this step and therefore the parameter "focus" should be half of the range that was mentioned in the paper (-0.75 instead of -1.50, etc.).

I currently want to retrain the network and improve its performance, but I don't have the training code yet, could you share the training code with me? I would appreciate it if you could!

— Reply to this email directly, view it on GitHub https://github.com/shacharBD/LightFieldRefocusing/issues/4#issuecomment-1008323776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5AGJKZAK7XWH3K46ETUVGVXZANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

sky-fly97 commented 2 years ago

Hello, sorry to interrupt again, I have a new problem in the reproduction process~ Refocusnet is implemented in the paper, compared with the traditional algorithm, but the traditional method generally uses a continuous 5D matrix (u,v,h,w,c) to input and achieve refocusing. But now if we use 2 * 2 discrete views in the shape of a rhomboid , how can we achieve refocusing by the traditional refocusing algorithm? Is it by arranging these four views into *2 2 (2,2,h,w,c)** for input?

sky-fly97 commented 2 years ago

Can I get your email, maybe it will be easier to ask for advice?

shacharBD commented 2 years ago

Hi, of course! Please send me your email so we can discuss :)

בתאריך יום ה׳, 3 בפבר׳ 2022, 4:48, מאת sky-fly97 @.***

:

Can I get your email, maybe it will be easier to ask for advice?

— Reply to this email directly, view it on GitHub https://github.com/shacharBD/LightFieldRefocusing/issues/4#issuecomment-1028551856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5EXKJEDSUAYMEEQS4TUZHUGRANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

sky-fly97 commented 2 years ago

Hi, of course! Please send me your email so we can discuss :) בתאריך יום ה׳, 3 בפבר׳ 2022, 4:48, מאת sky-fly97 @. : Can I get your email, maybe it will be easier to ask for advice? — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWWK5EXKJEDSUAYMEEQS4TUZHUGRANCNFSM5KC5ANDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.>

Thanks, my email is: sky_fly@sjtu.edu.cn

sky-fly97 commented 2 years ago

Hello, sorry to interrupt again, I have a new problem in the reproduction process~ Refocusnet is implemented in the paper, compared with the traditional algorithm, but the traditional method generally uses a continuous 5D matrix (u,v,h,w,c) to input and achieve refocusing. But now if we use 2 * 2 discrete views in the shape of a rhomboid , how can we achieve refocusing by the traditional refocusing algorithm? Is it by arranging these four views into *2 2 (2,2,h,w,c)** for input?

Maybe this problem needs your help too, thanks~