Error in YOLO v3 example code when attempting to train

조회 수: 9 (최근 30일)
Yonathan Zarkovian
Yonathan Zarkovian 2021년 10월 28일
댓글: xy song 2023년 4월 7일
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);

답변 (2개)

Anshika Chaurasia
Anshika Chaurasia 2021년 11월 2일
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 2023년 4월 7일
If you have the same question, you can try to update your software.
  댓글 수: 1
xy song
xy song 2023년 4월 7일
the key is copying these two files called generateYOLOv3Detections.m and generateTargets.m into your workspace

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by