Problem in YOLOv2 training
I’m doing a YOLOv2 training and I came across the following error:
Error using
trainYOLOv2ObjectDetector>iParseInputsYolov2
(line 240)
Invalid network.
Error in
trainYOLOv2ObjectDetector
(line 174)
[trainingData, lgraph,
params, options] =
iParseInputsYolov2(…
Error in criando (line 13)
[detector,info] =
trainYOLOv2ObjectDetector(ds,lgraph,options);
Caused by:
Network: The input to
the YOLO v2 transform
layer must have 12
channels to support 2
anchor boxes and 1
classes. The number of
channels must equal
numAnchors * (5 +
numClasses). Update the
training data, the
number of anchor boxes
specified in the
yolov2Transform layer,
or the layers preceding
the transform layer.
My code:
clear, clc, close all;
vagem = load(‘RotulosVagem.mat’);
lgraph = load(‘lgraph.mat’);
lgraph = lgraph.lgraph;
gTruth = vagem.gTruth;
[imds, blds] = objectDetectorTrainingData(gTruth);
ds = combine(imds, blds);
options = trainingOptions(‘sgdm’);
[detector,info] = trainYOLOv2ObjectDetector(ds,lgraph,options);
I will attach the files. Thanks in advance.I’m doing a YOLOv2 training and I came across the following error:
Error using
trainYOLOv2ObjectDetector>iParseInputsYolov2
(line 240)
Invalid network.
Error in
trainYOLOv2ObjectDetector
(line 174)
[trainingData, lgraph,
params, options] =
iParseInputsYolov2(…
Error in criando (line 13)
[detector,info] =
trainYOLOv2ObjectDetector(ds,lgraph,options);
Caused by:
Network: The input to
the YOLO v2 transform
layer must have 12
channels to support 2
anchor boxes and 1
classes. The number of
channels must equal
numAnchors * (5 +
numClasses). Update the
training data, the
number of anchor boxes
specified in the
yolov2Transform layer,
or the layers preceding
the transform layer.
My code:
clear, clc, close all;
vagem = load(‘RotulosVagem.mat’);
lgraph = load(‘lgraph.mat’);
lgraph = lgraph.lgraph;
gTruth = vagem.gTruth;
[imds, blds] = objectDetectorTrainingData(gTruth);
ds = combine(imds, blds);
options = trainingOptions(‘sgdm’);
[detector,info] = trainYOLOv2ObjectDetector(ds,lgraph,options);
I will attach the files. Thanks in advance. I’m doing a YOLOv2 training and I came across the following error:
Error using
trainYOLOv2ObjectDetector>iParseInputsYolov2
(line 240)
Invalid network.
Error in
trainYOLOv2ObjectDetector
(line 174)
[trainingData, lgraph,
params, options] =
iParseInputsYolov2(…
Error in criando (line 13)
[detector,info] =
trainYOLOv2ObjectDetector(ds,lgraph,options);
Caused by:
Network: The input to
the YOLO v2 transform
layer must have 12
channels to support 2
anchor boxes and 1
classes. The number of
channels must equal
numAnchors * (5 +
numClasses). Update the
training data, the
number of anchor boxes
specified in the
yolov2Transform layer,
or the layers preceding
the transform layer.
My code:
clear, clc, close all;
vagem = load(‘RotulosVagem.mat’);
lgraph = load(‘lgraph.mat’);
lgraph = lgraph.lgraph;
gTruth = vagem.gTruth;
[imds, blds] = objectDetectorTrainingData(gTruth);
ds = combine(imds, blds);
options = trainingOptions(‘sgdm’);
[detector,info] = trainYOLOv2ObjectDetector(ds,lgraph,options);
I will attach the files. Thanks in advance. yolov2, neural network, neural networks, deep learning, machine learning, image, image processing, image analysis, image acquisition, image segmentation MATLAB Answers — New Questions