hmorimitsu / ptlflow

PyTorch Lightning Optical Flow models, scripts, and pretrained weights.
Apache License 2.0
250 stars 33 forks source link

The loss function of LiteFlowNet* #50

Closed ChenYizhenCN closed 1 year ago

ChenYizhenCN commented 1 year ago

Hi Henrique, thanks for this great repo!

I tried to train the model by running "!python train.py liteflownet3", as indicated in liteflownet3.py (with loss_fn=None), it will be reported that

" assert self.lossfn is not None, f'Model {self.__class__. \_name__} cannot be trained. It does not have loss function.' AssertionError: Model LiteFlowNet3 cannot be trained. it does not have loss function. "

However, L2 loss is used in training as mentioned in the liteflownet3 paper.

This means that liteflownet3 does not support training in ptlflow for now? And

would you have plans to add support for liteflownet3?

Thanks again for your great work.

hmorimitsu commented 1 year ago

Hello,

Unfortunately I don't have time to implement and test the loss functions for the missing models for now.

If you want to implement the loss by yourself, don't forget liteflownet 3 also has an additional confidence map loss term.

Best.

On Tue, May 30, 2023, 01:21 ChenYizhenCN @.***> wrote:

Hi Henrique, thanks for this great repo!

I tried to train the model by running "!python train.py liteflownet3", as indicated in liteflownet3.py (with loss_fn=None), it will be reported that

" assert self.loss_fn is not None, f'Model {self.class. name} cannot be trained. It does not have loss function.' AssertionError: Model LiteFlowNet3 cannot be trained. it does not have loss function. "

However, L2 loss is used in training as mentioned in the liteflownet3 paper.

This means that liteflownet3 does not support training in ptlflow for now? And

would you have plans to add support for liteflownet3?

Thanks again for your great work.

— Reply to this email directly, view it on GitHub https://github.com/hmorimitsu/ptlflow/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2KE3PSRNKXNB6ONPKPVMLXITLKRANCNFSM6AAAAAAYTAKR74 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ChenYizhenCN commented 1 year ago

Thank you for responding!

Many thanks for your generous contribution.

I gladly try to implement the loss and it will be first shared once progress has been made.

Best regards.