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

Loss when training with my own data #177

Open
Sissi-lu opened this issue Nov 6, 2024 · 0 comments
Open

Loss when training with my own data #177

Sissi-lu opened this issue Nov 6, 2024 · 0 comments

Comments

@Sissi-lu
Copy link

Sissi-lu commented Nov 6, 2024

Hi, thank you for sharing the code and data you used in Metric3D. It helps me a lot to understand your work. But when I trained with my own data with RGB-Depth-Normal label following by #105 , I felt confused about what kind of loss I should apply.

In the picture, I saw you mainly use three losses, .i.e $L_d$ for supervising the depth, $L_n$ for supervising normal, and $L_{d-n}$ to align the predicted depth:
image
Specifically, the $L_{d}$ is composed by:
image
but it seems that $L_{PWN}$ and $L_{VNL}$ are the normal loss?

When I tried to understand this loss in your code, I found they are hard to correspond to. This brings me these main questions:
1、Can you tell me the specific meaning of the loss in your paper, as well as their corresponding sense? And what do they correspond to the code?
2、When I want to fine-tune the model with my own data with GT of depth and normal, which loss should I apply? I'm just too confused about the loss in code. Now I use the configuration loss of vit.raft5.giant2.nyu.py, .i.e,

losses=dict( 
    decoder_losses=[
        dict(type='VNLoss', sample_ratio=0.2, loss_weight=1.0),
        dict(type='GRUSequenceLoss', loss_weight=1.0, loss_gamma=0.9, stereo_sup=0),
        dict(type='NormalBranchLoss', loss_weight=1.5, loss_fn='NLL_ours_GRU'),
        dict(type='DeNoConsistencyLoss', loss_weight=0.001, loss_fn='CEL', scale=2), 
        dict(type='HDNRandomLoss', loss_weight=0.5, random_num=10), 
        dict(type='HDSNRandomLoss', loss_weight=0.5, random_num=20, batch_limit=4),  
        dict(type='PWNPlanesLoss', loss_weight=1),  
    ], 
)

I find some of them equal to zero or never reduce, just as follows:
image

Thanks a lot!

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

1 participant