JiawangBian / sc_depth_pl

SC-Depth (V1, V2, and V3) for Unsupervised Monocular Depth Estimation Webpage:https://jiawangbian.github.io/sc_depth_pl/
GNU General Public License v3.0
438 stars 70 forks source link

Training error with index_anchors variable #32

Closed gabrielebaris closed 1 year ago

gabrielebaris commented 1 year ago

Hi, I am trying to train the network on my own dataset. I don't have ground-truth depth, but following the instructions I've generated pseudo-depth with LeReS. I am training with --val_mode photo. However, during training the following error arises (I've just pasted the most representing part of the stack trace):

[...]
File "/home/gabriele/development/sc_depth_pl/losses/normal_ranking_loss.py", line 286, in forward
    ) = edgeGuidedSampling(
  File "/home/gabriele/development/sc_depth_pl/losses/normal_ranking_loss.py", line 73, in edgeGuidedSampling
    index_anchors = torch.randint(
RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=0

This happens either with or without the --use_frame_index flag. What am I doing wrong? Thank you!

JiawangBian commented 1 year ago

I didn't meet this issue, and I guess that it is because of your data. I mean that image or pseudo-depth is very strange that the edge-based sampling fails. You may need to debug yourself because I can't reproduce it.

gabrielebaris commented 1 year ago

ok, thanks