Can't I use datastore and trinnet function when training pre-trained cellpose model?

1 回表示 (過去 30 日間)
Hello!
I am trying to use the cellpose model to track irregularly shaped cells.
But before that, I want to fine-tune the pre-trained model because it is not very accurate.
I've read the matlab documentation on this, and it looks like I need to prepare the images and ground truth for training in a folder in advance.
I only have 14 images, so I would like to train it with real-time augmentation and use ground truth to terminate early.
When I used other models before, I used the trainnet function in matlab, which was easy to adapt.
However, there doesn't seem to be an option for this in the trainCellpose function.
Do I have no choice but to create my own training function?

採用された回答

Aneela
Aneela 2024 年 5 月 22 日
Hi Junhyeon,
“trainCellpose” does not directly support for real-time augmentation. Having a pre-augmented dataset is essential.
  • To apply augmentations on-the-fly during training, you might consider implementing a custom datastore by subclassing “matlab.io.Datastore”.
“trainCellpose” does not support early stopping in a way that “trainnet” supports. To achieve early stopping using “trainCellpose”, here’s a workaround:
  • Ensure validation dataset is separate from training dataset.
  • Train the model for a small number of epochs at a time, manually checking the performance on the validation set after each iteration.
  • If the validation performance does not improve over successive iterations, stop the training process.
For more information, please refer to the following MathWorks documentation links:
  1 件のコメント
Junhyeon
Junhyeon 2024 年 5 月 23 日
Thank you for your reply. I'll try the methods you suggested.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by