opencvsharp
opencvsharp copied to clipboard
Defect By YoloV5
Summary of your issue
Environment
opecvsharp4.5.5 yolov5s By PyTorch
What did you do when you faced the problem?
forward result is not correct
Example code:
net = CvDnn.ReadNet(confighParams.Model);
net.SetPreferableBackend(Backend.OPENCV);
net.SetPreferableTarget(Target.CPU);
Mat blob = CvDnn.BlobFromImage(resImage, 1 / 255.0, new Size(confighParams.ImgWidth, confighParams.ImgHeight), default, true, false);
net.SetInput(blob);
var outNames = net.GetUnconnectedOutLayersNames();
Mat[] outs = new Mat[] { };
net.Forward(outs, outNames);
Output: