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

NAN appears when training #54

Open
JesseZZZZZ opened this issue May 24, 2024 · 8 comments
Open

NAN appears when training #54

JesseZZZZZ opened this issue May 24, 2024 · 8 comments

Comments

@JesseZZZZZ
Copy link

Hi @lahavlipson , have you tried training DPVO on other datasets beside TartanAir? I tried to train it on TUM (using _build_dataset from raw RGB and depth maps), but all values became NAN, do you know the issue? (t1[0] and t2[0] are all NANs). Thank you so much!
Uploading image.png…

@JesseZZZZZ
Copy link
Author

Hi, dear authors, it turns out that the nomalization step will cause NANs in poses
image
After I delete the two lines of codes like I did in the picture, the issue disappeared. Do you think that simply deleting the codes is available? Or are there any other ways to solve this issue? THANKS!

@markinruc
Copy link

markinruc commented Oct 3, 2024

@JesseZZZZZ Hello! I met the same problem. Have you solved it?

@JesseZZZZZ
Copy link
Author

@markinruc Well, for the NAN in the image it was because some values in my depth maps are 0, and the inverse depth calculation results in NAN (1/0). Another NAN in inference is that my model was so bad....After I trained it for some epochs the NAN disappeared

@JingruiYu
Copy link

Hello, have you successfully fine-tuned DPVO?
I have tried fine-tuning it, but the results are quite strange.
Would you be willing to give me some guidance?

@JesseZZZZZ
Copy link
Author

JesseZZZZZ commented Feb 1, 2025 via email

@JingruiYu
Copy link

I trained it on my own data, nan appears when I didn't normalize my gt data.maybe you can try normalizing everything to tartanair's distribution?

Wow, that's sound advice. I'd like to try it. Do you know what the distribution of tartan looks like?

@JesseZZZZZ
Copy link
Author

JesseZZZZZ commented Feb 3, 2025 via email

@JingruiYu
Copy link

tartan's range is about -10 to 10. I think the absolute value of gt should be less than 20 ...?

Thanks for your kindly repley.
I checked the Tartan dataset but didn’t quite understand what the range of -10 to 10 and the ground truth (GT) being less than 20 refer to. Are these values related to the variable stored in the .npy depth files? Or are they referring to a specific column in pose_left.txt, such as t_z (which is scaled in here)? But I checked both of them is not -10 to 10?

I have a few additional questions about preparing fine-tuning data, and I would greatly appreciate your help:

  1. When preparing training data, we need to generate a pickle file. I followed a function mentioned in one of the author’s responses in another issue and only modified the paths without making any other code changes. I assume this is sufficient and no further modifications are needed—am I correct?

  2. Does the resolution of my own dataset images need to match the resolution of TartanAir images? Or can they be mixed during training?

  3. Another thing that has confused me is the format of pose_left.txt. Since I see that there’s a reordering operation when reading it in the code, I assume the format should be tz, tx, ty, qz, qx, qy, qw. However, this seems a bit odd—am I misunderstanding something?

  4. Lastly, I’d like to ask how you prepared your own dataset when training on it. Is there anything different from what I’ve done? Specifically, here’s what I’ve prepared:

  • image_left folder containing .jpg image files.
  • depth_left folder containing .npy depth files.
  • pose_left.txt file storing ground truth poses.
    Then, I used build_dataset funciton to construct a pickle file.

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

3 participants