Error in YOLO v3 example code when attempting to train

1 visualización (últimos 30 días)
Yonathan Zarkovian
Yonathan Zarkovian el 28 de Oct. de 2021
Comentada: xy song el 7 de Abr. de 2023
Hi,
While running the code from this example, but with doTraining set to true, I get the following errors. I'd appreciate your help.
'generateTargets' is used in Object Detection Using YOLO v3 Deep Learning.
Error in modelGradients (line 11)
[boxTarget, objectnessTarget, classTarget, objectMaskTarget, boxErrorScale] = generateTargets(gatheredPredictions,...
Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});
Error in dlfeval (line 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
Error in yolov3_Copy (line 110)
[gradients, state, lossInfo] = dlfeval(@modelGradients, yolov3Detector, XTrain, YTrain, penaltyThreshold);

Respuestas (2)

Anshika Chaurasia
Anshika Chaurasia el 2 de Nov. de 2021
Hi,
On opening the example using following command in MATLAB window:
openExample('deeplearning_shared/ObjectDetectionUsingYOLOV3DeepLearningExample')
There is no error while training the network from the default location.
But if the ObjectDetectionUsingYOLOV3DeepLearningExample.mlx file is copied and run from some different location then it throws error as you have mentioned.
The solution to error is that on copying the ObjectDetectionUsingYOLOV3DeepLearningExample.mlx file, also copy all the files available in left side in current folder as shown below:
There is a file generateTargets.m which is missing while you are running the yolov2_Copy file and hence got the error.
Refer to documentaton for more information about supporting functions for object detection using YoloV3 Deep Learning.

xy song
xy song el 7 de Abr. de 2023
If you have the same question, you can try to update your software.
  1 comentario
xy song
xy song el 7 de Abr. de 2023
the key is copying these two files called generateYOLOv3Detections.m and generateTargets.m into your workspace

Iniciar sesión para comentar.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by