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

I try to use 3DP to obtain LDI data, and operate your model to stylize my onw image. Getting bad result #4

Open
shoutOutYangJie opened this issue Jul 19, 2022 · 4 comments

Comments

@shoutOutYangJie
Copy link

video_pred.mp4

First, the ratio of aspect is not correct.
Second, a black area exists in the boundary of image.
Third, the quality of stylization is not perfect as in your demo.

I want to know how to solve it, thank you.

@fmu2
Copy link
Owner

fmu2 commented Jul 19, 2022

It looks like either the LDI parameters or the test flags were not set correctly. I would suggest the following sanity checks one by one:

  • run ldi_render.py to see if you can get the right video without stylization. This makes sure that your LDI has the right format. You may also want to tune the x, y and z bounds if you observe any black margins. The default values generally work well but depend on the depth estimation model and the aspect ratio of your input image.
  • try different scales for your LDI using the -pc flag. As a rule of thumb, set it to round(max(h, w) / 500) where h and w are the height and width of your input image. Run ldi_model.py without a style image with your chosen -pc value. Make sure the video looks close to what you obtain from the first step.

You may want to experiment more advanced depth estimation models if the aforementioned steps do not fully solve the problem. As you may have noticed, the output quality strongly depends on depth accuracy. We recommend using DPT for the best depth estimation result.

Finally, some scenes are harder to stylize than others, and not all styles give equally good results, so try a handful of styles. My impression is that your scene is a hard one because it contains lots of thin structures (e.g., trees and fence). Even the best depth estimation models fail on this type of images.

@shoutOutYangJie
Copy link
Author

It looks like either the LDI parameters or the test flags were not set correctly. I would suggest the following sanity checks one by one:

  • run ldi_render.py to see if you can get the right video without stylization. This makes sure that your LDI has the right format. You may also want to tune the x, y and z bounds if you observe any black margins. The default values generally work well but depend on the depth estimation model and the aspect ratio of your input image.
  • try different scales for your LDI using the -pc flag. As a rule of thumb, set it to round(max(h, w) / 500) where h and w are the height and width of your input image. Run ldi_model.py without a style image with your chosen -pc value. Make sure the video looks close to what you obtain from the first step.

You may want to experiment more advanced depth estimation models if the aforementioned steps do not fully solve the problem. As you may have noticed, the output quality strongly depends on depth accuracy. We recommend using DPT for the best depth estimation result.

Finally, some scenes are harder to stylize than others, and not all styles give equally good results, so try a handful of styles. My impression is that your scene is a hard one because it contains lots of thin structures (e.g., trees and fence). Even the best depth estimation models fail on this type of images.

Can you share the preprocessing code. Your work is very great. If you can share your preprocessing code, the citation may be more and more increasing.

@fmu2
Copy link
Owner

fmu2 commented Jul 19, 2022

Thanks for the suggestion. The preprocessing code relies on multiple third-party tools. We will release it after some cleanup. Please check back in a few weeks.

@shoutOutYangJie
Copy link
Author

shoutOutYangJie commented Jul 20, 2022 via email

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