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

1 vue (au cours des 30 derniers jours)
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?

Réponse acceptée

Aneela
Aneela le 22 Mai 2024
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:

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by