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

Does anyone try the SOLO model for thin, dotted line? #43

Open
pvthuy opened this issue May 11, 2020 · 6 comments
Open

Does anyone try the SOLO model for thin, dotted line? #43

pvthuy opened this issue May 11, 2020 · 6 comments

Comments

@pvthuy
Copy link

pvthuy commented May 11, 2020

Does anyone try the SOLO model for thin, dotted line like this?

images

For the above image with one object (line), assume that I have many small polygons for that line.
I observed that the SOLO model did not perform well (the scores are very low).

Any suggestions on improving the data, or modifying the hyper-parameters?
Thanks in advance!

@WXinlong
Copy link
Owner

@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?

@pvthuy
Copy link
Author

pvthuy commented May 13, 2020

@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

@WXinlong
Copy link
Owner

@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).

@pvthuy
Copy link
Author

pvthuy commented May 20, 2020

@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.

@xudongwang0828
Copy link

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

@omerbrandis
Copy link

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

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

4 participants