-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
questionFurther information is requestedFurther information is requested
Description
public static void Retina(NcnnDotNet.OpenCV.Mat src)
{
// Model from https://github.com/nihui/ncnn-assets/tree/master/models
Net net = new Net();
net.Opt.UseVulkanCompute = false;
net.LoadParam(@"Models\mnet.25-opt.param");
net.LoadModel(@"Models\mnet.25-opt.bin");
var imgW = src.Cols;
var imgH = src.Rows;
NcnnDotNet.Mat @in = NcnnDotNet.Mat.FromPixelsResize(
pixel: src.Data,
type: PixelType.Bgr2Rgb,
width: src.Cols,
height: src.Rows,
targetWidth: imgW,
targetHeight: imgH
);
NcnnDotNet.Extractor ex = net.CreateExtractor();
ex.Input("data", @in);
var scoreBlob = new NcnnDotNet.Mat();
var bboxBlob = new NcnnDotNet.Mat();
var landmarkBlob = new NcnnDotNet.Mat();
ex.Extract("face_rpn_cls_prob_reshape_stride32", scoreBlob);
ex.Extract("face_rpn_bbox_pred_stride32", bboxBlob);
ex.Extract("face_rpn_landmark_pred_stride32", landmarkBlob);
}
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested