SOLOV2 Validation Loss Warning

조회 수: 2 (최근 30일)
Brian MacDonald
Brian MacDonald 2024년 8월 28일
댓글: Gayathri 2024년 9월 5일
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
  댓글 수: 1
Gayathri
Gayathri 2024년 9월 2일
Can you please share your code

댓글을 달려면 로그인하십시오.

답변 (1개)

Gayathri
Gayathri 2024년 9월 2일
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
Brian MacDonald
Brian MacDonald 2024년 9월 3일
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 2024년 9월 5일
May I know which OS version you are using?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by