SOLOV2 Validation Loss Warning

2 Ansichten (letzte 30 Tage)
Brian MacDonald
Brian MacDonald am 28 Aug. 2024
Kommentiert: Gayathri am 5 Sep. 2024
Hi,
I'm attempting to deploy a SOLOV2 instance segmentation network, but am encountering a pretty lengthy warning/error about validation metrics during trainging (see the full warning at the end of my message). As a result, the validation loss will not plot along side training loss during a training stage. I believe this warning arises from the way I prepared my training data, but to the best of my knowledge, its alligned with what is presented here: https://www.mathworks.com/help/vision/ug/getting-started-with-solov2-for-instance-segmentation.html.
I've succesfully deployed a Mask RCNN model in the past, which seems to require the same training data format, but perhaps I am overlooking something. Below is a exerpt of my combined data store (RGB image, boxes, box labels, and binary masks):
Warning: Error occurred while executing the listener callback for event IterationEnd defined for class images.dltrain.internal.SerialTrainer:
Undefined function 'finddim' for input arguments of type 'cell'.
Error in images.dltrain.internal.LossMetricAdapter/update (line 26)
dim = finddim(Yexample,'B');
Error in images.dltrain.internal.MetricLogger/evaluateValidationMetrics (line 252)
self.Metrics{idx} = update(metric,outputs{:},targets{:});
Error in images.dltrain.internal.MetricLogger/evaluateMetrics (line 187)
logEntry = evaluateValidationMetrics(self,evtData,logEntry);
Error in images.dltrain.internal.dltrain>@(~,evtData)logger.evaluateMetrics(evtData) (line 59)
addlistener(networkTrainer,'IterationEnd',@(~,evtData) logger.evaluateMetrics(evtData));
Error in images.dltrain.internal.SerialTrainer/fit (line 97)
notify(self,'IterationEnd',data);
Error in images.dltrain.internal.dltrain (line 114)
net = fit(networkTrainer);
Error in trainSOLOV2 (line 164)
[network,info] = images.dltrain.internal.dltrain(mbqTrain,network,options,lossFcn,metrics,'Loss',
'ExperimentMonitor',params.ExperimentMonitor);
Error in SOLOTraining (line 77)
[detector, info] = trainSOLOV2(trainingData, pretrainedNet, options);
> In images.dltrain.internal/SerialTrainer/fit (line 97)
In images.dltrain.internal.dltrain (line 114)
In trainSOLOV2 (line 164)
In SOLOTraining (line 77)
---------------
I can provide code if necessary, but I would like to see if anyone has encountered this problem and, if so, what have they done to fix it.
Thank you,
Brian

Antworten (1)

Gayathri
Gayathri am 2 Sep. 2024
I understand that you are not able to get the plot for validation loss due to the error mentioned. Please refer to the below mentioned link, which has a similar example in training a SOLOv2 model.
You can also open the example using the command below.
openExample('deeplearning_shared/PerformInstanceSegmentationUsingSOLOv2Example')
This code has input data format same as mentioned in the question.
I have executed the code and I am able to obtain train and validation loss plots. Hope this will help resolve the issue.
  2 Kommentare
Brian MacDonald
Brian MacDonald am 3 Sep. 2024
Thank you for your answer. Initially, the example wouldn't plot the validation loss, even following it verbatim.
However, I reviewed other (albeit, very limited number of) forum posts on the SOLOV2 model, and I noticed that other issues users were facing were resolved by downgrading their version of MATLAB. Thus, I switched from 2024a to 2023b, and the validation loss function was plotted as expected.
It seems as if embedded training functions were updated with MATLAB from 2023b to 2024a, which conflicted with the SOLOV2 training process.
Hopefully, this will also help others attempting to train the network on 2024a.
Gayathri
Gayathri am 5 Sep. 2024
May I know which OS version you are using?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by