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

obtained some very strange depth maps #483

Open
lhx0416 opened this issue Oct 31, 2023 · 5 comments
Open

obtained some very strange depth maps #483

lhx0416 opened this issue Oct 31, 2023 · 5 comments

Comments

@lhx0416
Copy link

lhx0416 commented Oct 31, 2023

Thank you very much for your work!
I further trained the mono model you provided with my own dataset (79 indoor-collected images with a resolution of 1280*704, and I modified the camera parameters and resolution in the mono_dataset).
However, I obtained some strange images. From top to bottom, they are the input RGB original image, the depth map directly predicted by the model provided by the original author, and the depth map obtained after training the pre-trained model on my custom dataset (which doesn't seem to be a depth map :(
(HSBUMBPOP4NT6IC IBX8A

@RJH97
Copy link

RJH97 commented Jan 10, 2024

I got the same weird results. Have you solved this?

@lhx0416
Copy link
Author

lhx0416 commented Jan 10, 2024

I got the same weird results. Have you solved this?

I haven't resolved this issue yet. Initially, I thought it was due to the insufficient size of the data sample, but experiments later revealed it's unrelated to the quantity of training.
I speculate it might be due to the excessive continuity of the data captured by the phone (60 frames per second), or it could be an issue with the camera itself. The image resolution captured is 1920*1080 (perhaps this resolution is too high?).
I'm still actively working on resolving this problem, and I'll keep you updated on any progress. If you successfully tackle this issue, please do let me know too. Thank you.

@RJH97
Copy link

RJH97 commented Jan 11, 2024

Thank you, my custom dataset has about 25w samples, but the same problem still happened.
Reducing the frames sampled per second may be a solution, I 'll reach you if there is any progress.

@lhx0416
Copy link
Author

lhx0416 commented Jan 17, 2024

Thank you, my custom dataset has about 25w samples, but the same problem still happened. Reducing the frames sampled per second may be a solution, I 'll reach you if there is any progress.

I conducted another experiment and found that while the depth map obtained in the first training round is not accurate, it resembles a depth map. However, in subsequent epochs, the training results become peculiar, with the depth map exhibiting object textures.

The changes I made to the code are in Monodepth2/datasets/kitti_dataset.py:

Original

self.K = np.array([[0.58, 0, 0.5, 0],

[0, 1.92, 0.5, 0],

[0, 0, 1, 0],

[0, 0, 0, 1]], dtype=np.float32)

Modified

self.K = np.array([[0.607, 0.000, 0.502, 0],
[0.000, 0.809, 0.499, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]], dtype=np.float32)

Original

self.full_res_shape = (1242, 375)

Modified

self.full_res_shape = (640, 480)
I haven't made any other changes. It's also possible that my training data is insufficient, so I plan to drive tomorrow to collect more data.

@Linengyao
Copy link

请问一下您解决了这个问题吗?我也遇到了生成深度图很奇怪的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants