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

Question about custom depth dataset depth-scale. #99

Open
supremewu11 opened this issue Oct 31, 2024 · 4 comments
Open

Question about custom depth dataset depth-scale. #99

supremewu11 opened this issue Oct 31, 2024 · 4 comments

Comments

@supremewu11
Copy link

Thanks to your contribution in depth estimation aera. I have a question—— how to define depth-scale in my own custom depth dasaset.

@zhyever
Copy link
Owner

zhyever commented Nov 19, 2024

Thanks! Sorry for the late reply and I just finished some work. As far as I see, you can loop over the entire dataset and simply look for the max value in your depth dataset. Note that you might need to convert the raw depth value correctly.

@supremewu11
Copy link
Author

It's OK, thanks for your reply , I'll have a try for the max value in my depth dataset. If I define the depth-scale as the max value in my dataset, then the depth ground-truth is between 0 to 1, in this case, the calculation of the depth metrics would be wrong in order of magnitudes. Do I need to let the predition depth values multiply depth-scale to recover original depth?
And how to convert the raw depth value correctly, what do I need to do.
Looking forward to your reply, these questions confuse me for a long time.

@zhyever
Copy link
Owner

zhyever commented Nov 22, 2024

Suppose the depth range of your dataset is from 0 to 5m. What you need to do is to set the max_depth in model config to 5. For example, this line defines the max prediction depth for binsformer model. Moreover, please also check the dataset process pipeline to ensure the depth fed to the loss function is in the right range.

The idea is simple. Suppose you are supervising the model with a gt from range of a to b. The model will predict depth from a to b. If you have construct a map from the real depth to the gt (a to b), you can simply convert the prediction depth back to the real depth range from the inversed map function.

For loading the raw depth, it depends on your file format.

@supremewu11
Copy link
Author

Got it. I'll try it immediately. Thank you so much.

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