-
Notifications
You must be signed in to change notification settings - Fork 47
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
Confusing results of custom fine-tuned models #837
Comments
Hi @aloboa, I see the obvious confusion here, and a possible improvement in storing model checkpoints from our side. To clarify:
Now coming to your question:
From what I understand with the context provided, these seem to be two different finetuning runs (one finetuned with the additional segmentation decoder, and one without). Since they are two different models, it is possible that the results could be different (because of two separate training runs). PS: However, I do see one point which I think I would like to improve in the GUI:
PPS. I've created a follow-up on a running feature request here: #836 (comment). |
I understand that we should expect fine_01.pt and fine_02.pt, and their respective results imaout1.tif and imaout2.tif, to be not identical. However, the problem is that I think that they are too different: Autosegmentation using a SAM-backbone model created "with segmentation decoder": Autosegmentation using a SAM-backbone model created "without segmentation decoder": Maybe you could run a test on your own, with your own data? Simply fine-tune with and without segmentation decoder and autosegment with the respective *.pt models. Just to make sure the problem is not on my side. |
Interesting. The thing is, we haven't experimented much with different hyperparameters for AMG-based segmentation (I am assuming the screenshots above are from AMG since that's the one we have talked about the most). Out of curiousity, which of the above segmentation quality matches closest to your expectations? (the one in blue / red / neither)
The data we work with (biological images), it would be hard to observe these changes as AMG did not really improve the segmentation quality with further finetuning (it worked fine on sparsely distributed objects, but that's less likely to assume this in microscopy images).
I still don't think there is any issue from your side. The heuristic with which AMG is supported (by putting a grid of points and then estimating valid segmentations using post-processing and NMS) is quite sensitive. In addition, we introduce another stochastic factor here: two different finetuned models. I can suggest the following: finetune two models with the exact same training setup (for simplicity, let's say without the additional instance segmentation decoder), export the two different paths with two separate names and then validate your observation. If the difference in segmentations still exists, you can make this a part of your study (as this is often encountered in training / finetuning deep learning models) PS. @constantinpape Let me know if I am missing something obvious here! |
The blue one (without) is a bit better, but neither is really good. The one from a
Ok, we'll do it. |
Thanks for the context. I think I understand the details a bit better. Maybe this will all piece in together if you could share with me some ground-truth for this data? (which you use to finetune your custom models?) (if that's okay with you) Seeing some image and corresponding ground-truth would help us understand the details a bit better! |
In section "2.Input information" you can see the 3 original, enhanced and labeled images, just by selecting the tabs. But I can send you the actual data if you need them. |
I understand it better now. Thanks for sharing the report! |
This is what I have done:
Custom finetuned Models (with the GUI):
According to your explanations:
If both *.pt models are only SAM backbones, they should not be affected by the "With segmentation decoder" option. Therefore, fine_01.pt and fine_02.pt should be the same, and thus results imaout1.tif and imaout2.tif should also be the same. But, actually, they are very different.
The text was updated successfully, but these errors were encountered: