yolov3 upsampleLayer problem.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I wanna follow "Object Detection Using YOLO v3 Deep Learning example.
But there is not funciton defining "upsampleLayer".
I tried to use "transposedConv2dLayer" with the following specs in the "addSecondDetectionHead.m"
>>>
weights = zeros(2,2,numFilters,numFilters);
bias = zeros(1,1,numFilters);
for i= 1:numFilters
weights(:,:,i,i) = 1;
end
transposedConv2dLayer([2,2],numFilters,'Stride',[2,2],...
'WeightLearnRateFactor',0,'BiasLearnRateFactor',0, 'Name', 'ups_2d', 'Weights', weights, 'Bias',bias );
<<<
But I get the following error:
***
Error using dlfeval (line 43)
Layer 'ups_2d': Invalid input data. Number of channels to convolve (18, specified by the size
of weights dimension number 4) must be equal to the size of the 'C' dimension of the input data
(256).
Any upsamplelayer function working ?
I also want to check each layer input and output size, is there any practical solution ?
2 Commenti
Aasim Khurshid
il 9 Feb 2021
Modificato: Aasim Khurshid
il 9 Feb 2021
This function is part of the example of object detection. You should go to the example in MATLAB (click the "View MATLAB Command" link in the box in the upper-right corner of the example or open it in MATLAB Online by clicking the button in that same box) and you will find that helper in the example's directory. Or you may click on the error, where it says, it is used in object detection example, Click there, Copy this file to your directory, and you are good to go.
Do the same for other missing files as well.
Indicated here for another file:
https://www.mathworks.com/matlabcentral/answers/608676-validateinputdata-in-yolo-v3-missing
Risposte (1)
SERDAR KIZILKAYA
il 6 Mag 2020
4 Commenti
Joon
il 29 Lug 2020
Thanks! I just gave up and have been using Yolov2 instead. But it is working after I installed 2020a as you suggested. Cool!
Joon-Hyuk Lee
il 29 Lug 2020
Modificato: Joon-Hyuk Lee
il 29 Lug 2020
I got another problem during the training. The value of bboxA (which is the predicted box, not truth box) seems to have infinite(?) value. Anyone had same problem before?
Error messages are here:=====================================
Error using bboxOverlapRatio
The value of 'bboxA' is invalid. Expected input to be finite.
Error in bboxOverlapRatio>validateAndParseInputs (line 195)
parser.parse(bboxA,bboxB,varargin{:});
Error in bboxOverlapRatio>iParseInputs (line 94)
[bboxA, bboxB, ratioType] = validateAndParseInputs(bboxA, bboxB, varargin{:});
Error in bboxOverlapRatio (line 55)
[bboxA, bboxB, ratioType, isUsingCodeGeneration] = iParseInputs(bboxA,bboxB,varargin{:});
Error in generateTargets>getMaxIOUPredictedWithGroundTruth (line 138)
overlap = bboxOverlapRatio(predb,truthBatch);
Error in generateTargets (line 45)
iou = getMaxIOUPredictedWithGroundTruth(bx,by,bw,bh,groundTruth);
Error in yolov3>modelGradients (line 354)
[boxTarget, objectnessTarget, classTarget, objectMaskTarget, boxErrorScale] = generateTargets(gatheredPredictions, YTrain, inputImageSize, anchors, mask, penaltyThreshold);
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{:});
==================================================
Vedere anche
Categorie
Scopri di più su Classification in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!