Why I get "wrong use of 'reshape'" Error when running Yolov3 detection code?

조회 수: 3 (최근 30일)
Benjamin
Benjamin 2024년 11월 12일
편집: Pavl M. 2024년 11월 12일
I firstly ran YOLOV4 detection code smoothly and got good results,however when changing to YOLOV3 code using the same dataset and anchorBoxes setting, it appeared the ERROR "wrong use of reshape",detailed error is here:
the anchorBoxex setting is like :
Please, does anyone know what went wrong and how to corret the error,Why Yolov4 was all right but Yolov3 got this error?

답변 (1개)

Pavl M.
Pavl M. 2024년 11월 12일
편집: Pavl M. 2024년 11월 12일
This kind of questions actually require industry grade research on specific coded implementations within github and matlabcentral.
Most similar, highest likelihood:
https://fr.mathworks.com/matlabcentral/answers/2149304-yolov4-code-problem?s_tid=answers_rc1-2_p2_MLT
https://www.mathworks.com/matlabcentral/answers/2146179-how-i-can-fix-internal-change-in-number-of-elements-in-yolo-v4-network-while-training
https://fr.mathworks.com/matlabcentral/answers/480276-how-to-manually-implement-the-yolov3-object-detection-algorithm?s_tid=answers_rc1-3_p3_MLT
https://fr.mathworks.com/matlabcentral/answers/1886192-how-can-i-fix-this-error-about-yolov3deeplearningexample?s_tid=answers_rc1-1_p1_Topic
try with:
bbox = centerX:centerX+bboxHeigth,centerY:centerY+bboxHeight
bboxWidth, bboxHeight
Check your training data setup, most likely, ensure that the batch size used during training is consistent with the dimensions expected by the network.
While your question is relatively less problematic and deals with mainly dimensions subparametrization is aposite and pertinent to industrial similar problems, let's setup commercial workstream.
You need to adjust the parameters (h,w,c,maxOverlap, ... , etc.)
I do analysis of the algorithm.
What have you read from docs?
Anchor boxes may be applied to feature maps, and then they're refined into bounding boxes on top of feature maps to catch small and far objects, or big and nearby ones.
Anchor boxes setting may come from clustering algorithm ( what are the K number of clusters in your version ?)version of particular yolo version varying by aspect ratio and scale, N = Nscales*Naspectratios anchor boxes per sliding_position/region.
I estimate that your reshape function is called where they usually predict anchor boxes andkeep the one that has the highest Intersection over union (IOU) with the ground truth box, and finally refine it.
size(iou) = ?
size(maxOverlap) = ?
bx,by,bw,bh =?
h,w,c = ?
groundTruth = ?
These are the subparameters affected by the your anchor boxes pre-setting and which generates the boxed regions.
numAnchors doesn't impact the iGenerateTargets I correctly found out.
I also found that it is not displayed where you supply anchors array and anchorBoxes cell to trainYOLOv3ObjectDetector(...)
and in most particular their dimension sizes re-arrangement.
Have you changed the trainingDataForEstimation?
Assure the subparameters are consistent math. geometrically. Let validate simpler here and via Skype voice/video call is quite sufficient.
Suppress to remove some of the boxes based on IOU, only to keep a few remaining anchor boxes per class.
In YOLO, we're using grid-cell division, and each cell predicts a set of anchor boxes.
There are alternatives to anchor boxes, such as keypoints prediction, or grid-based detection, but anchor box prediction remains the standard in object detection.
You wrote: "the anchorBoxex setting is like :", I found the correction to the anchorBoxes setting is like ...
Why have you not shown where iGenerateTargets, modelGradients, trainYOLOv3ObjectDetector functions are invoked, iCalculateYOLOv3Loss (full parameters list = ?) your sequence of the d.l. operation methods calls?
Let's move on, go ahead enhancing the regression of the bounding boxes.
Interesting illustration as the correct mind map to continue this kind of elaboration:
There is strong, practically proven trend and demand modulated by recent crypto-assets value growth and exchange rates uptrend evolution, subject to reasons to continue this specific well-defined industry nich project scope of strategies, algorithms analysis and development, enterprise hardware and software for Control Systems Engineering, Deep Learning for production and services (for it I have not used 5G smartphone hardware, 1Gb NIC ethernet link, numerous hardware parts, good mind map to utilize within the trustworthy company etablishment offer), especially regression and clustring and I work to keep it proposing to contact me more, communicate privately to further Pitch Deck necessary investment to this well bouned work scope and continue again to work paid employed better within the enclosed tandem and market.

카테고리

Help CenterFile Exchange에서 Discriminant Analysis에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by