luca-medeiros / lightning-sam

Fine-tune Segment-Anything Model with Lightning Fabric.
Apache License 2.0
496 stars 55 forks source link

Use FocalLoss from fvcore #18

Open luca-medeiros opened 1 year ago

luca-medeiros commented 1 year ago

As mentioned https://github.com/luca-medeiros/lightning-sam/issues/16#issuecomment-1541319552 here, the current focal loss is not consistent with fvcore one.

Re-implementing and running tests would be needed.

wiekern commented 1 year ago

Probably we could refer to sigmoid_focal_loss on huggingface/transformers.