TRI-ML / packnet-sfm

TRI-ML Monocular Depth Estimation Repository
https://tri-ml.github.io/packnet-sfm/
MIT License
1.24k stars 243 forks source link

Simple overfitting test error #50

Closed tonytu16 closed 3 years ago

tonytu16 commented 4 years ago

Screen Shot 2020-07-21 at 1 19 23 PM I am getting this ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() error. How should I fix this? Thanks!

VitorGuizilini-TRI commented 4 years ago

Did you do any modifications to the configuration file? Which one are you using?

tonytu16 commented 4 years ago

Hello, thank you for your reply. I used configs/overfit_kitti.yaml.

VitorGuizilini-TRI commented 4 years ago

Did you change the code in any way? From your error log the issue is on line 83 of augmentations.py (if intrinsics:), but our code does not make this check there (or anywhere). In any case, the error makes sense, because intrinsics is not a boolean, so you should be more specific when creating the if condition.

tonytu16 commented 4 years ago

I see. I was able to resolve the issue and train the model. Could you let me know where the checkpoint file is saved to after training? I don't see that indicated anywhere. Thank you!

MingYang-buaa commented 4 years ago

@tonytu16 Hey, you may look in default_config.py and the line 22 is all you need.

tonytu16 commented 4 years ago
Screen Shot 2020-07-26 at 11 30 48 AM

Thank you for your response! I am getting the following error after training. I am a bit confused since the self-supervised monocular depth estimation only trains on RGB data, but why is read_npz_depth returning error since depth images are not required for training? Thank you!

VitorGuizilini-TRI commented 4 years ago

This error is showing up during validation (see the first line of your log), where depth maps are necessary. Although I am not sure why it is failing to load the .npz depth map.

tonytu16 commented 4 years ago

I see. so my understanding is that depth maps (npz for kitti) are not required for training but are required for validation so it must be present in the data file? What if I am training on my own custom dataset and all I have is the RGB frames? Is there a flag which I can change to train and save my model without error? Or is there a way to skip validation because I only want to see the inference results using the model I train on my custom dataset.

VitorGuizilini-TRI commented 3 years ago

That is a very interesting feature request, I'll add support to that soon!