Git Product home page Git Product logo

Comments (6)

WXinlong avatar WXinlong commented on May 25, 2024

@pvthuy What's your loss functions? I suggest using Focal Loss as mask prediction loss. And did you mean the class scores are low or mask prediction after sigmoid?

from solo.

pvthuy avatar pvthuy commented on May 25, 2024

@WXinlong Thanks for your reply.

I used similar settings as in this. It seemed that the loss function is FocalLoss?
My dataset has only two classes (foreground & background) so I set num_classes=2.

I attached the log and a sample prediction here:

log.txt
sample_prediction

from solo.

WXinlong avatar WXinlong commented on May 25, 2024

@pvthuy If you didn't change the loss part of that config file, then you were using dice loss for mask prediction. However, for your case, Focal Loss might be better. We extended SOLO to instance contour detection. You can refer to Section 7 of our paper.

BTW, for the current model, you can set a smaller mask threshold (e.g. 0.2 instead of 0.5 in default).

from solo.

pvthuy avatar pvthuy commented on May 25, 2024

@WXinlong Thank you very much!

I changed dice loss to focal loss, and mask threshold 0.5 to 0.2.
The predictions are slightly better, although not good as I expected. The prediction masks are very large compared to actual objects.
new

Anw, thanks for your help.

from solo.

xudongwang0828 avatar xudongwang0828 commented on May 25, 2024

I tried it for the text,i keep the origin para,and it looks good!

from solo.

omerbrandis avatar omerbrandis commented on May 25, 2024

hello ,

Can you please shed some light on how to change the loss function to focal-lossas suggested previously.
in the config files I've noticed the following :
loss_ins=dict(
type='DiceLoss',
use_sigmoid=True,
loss_weight=3.0),
loss_cate=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0)),

can you please explain exeactly what needs to be changed?

  • my case has both thin objects and "normal" objects, if changing the loss function should help for thin objects, won't it hurt the results for the normal objects? ( and if so , can you suggest an alternative ? )

thanks,
Omer

from solo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.