-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Foreground Scale for Any V2 #255
Comments
Thanks for the info. |
where do l put this code in thank you |
This one is tricky because it need to be implemented at different places. The code above was just an example, but it's a replacer for softplus01 in mapper.py So, in mapper.py, comment the old function and put this:
In mapper.py again, inside the function resolve_mapper_function, you have to replace the bias and scale values. look for the condition
This is what I use currently after running some tests, but it could be improved. It's better than the former function because the background was flattened too much. However, I am running the app most of the time with foreground scale = 0, and even sometimes -1, but I crank up the 3D strength instead. I didn't find the flatter image on foreground with Anything Depth V2, but I know that the metric and the original model behave quite differently. I don't use the metric model. Regarding my method of using negative foreground scale and higher 3D strength: The problem with using high divergence is always caused by high pixel displacement, which always happen more on closer objects. This is how 3D vision work. Distant objects will not cause artefacts. Using a negative value until the closest image has the proper depth to compensate for high 3D strength can allow you to have the proper depth for popping objects, while also having deeper and far away backgrounds. |
thank you will try this |
@math-artist What value do you use for 3D strength? |
1.5 and l use row_flow_v3_sym works very good |
I was asking @math-artist since he said "I crank up the 3D strength instead". |
row_flow_v3_sym - i dont have this, why? |
First, thank you for this super useful app. I have only started using iw3 yesterday, and I already have over one hundred files converted (small files, many are samples for testing)
During my testing, I found annoying that the model Any_V2 seemed truncated when setting the foreground scale to 1. So, I have plot the curves to see what happens.
I use Any V2 in another project, and the depth maps close to 0 are the furthest, and the higher ones are closer. So, what foreground scale is doing, is it is flattening the background for a very small gain in the slope near 1. And that's exactly what I am seeing when I am using it. I think it's implemented backward.
I wrote this code derived from a function you made that has, I think, the correct transform for Any V2.
The text was updated successfully, but these errors were encountered: