opencvsharp icon indicating copy to clipboard operation
opencvsharp copied to clipboard

Defect By YoloV5

Open BZP1122 opened this issue 2 years ago • 0 comments

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:


What did you intend to be?

BZP1122 avatar May 16 '22 03:05 BZP1122