Beispiel #1
0
 private ImageDetectResult MakeResult(YoloPrediction prediction)
 {
     return(new ImageDetectResult
     {
         Rect = new Rectangle
         {
             X = (int)prediction.Rectangle.X,
             Y = (int)prediction.Rectangle.Y,
             Width = (int)prediction.Rectangle.Width,
             Height = (int)prediction.Rectangle.Height
         },
         Tag = prediction.Label.Name,
         Service = "ML.Net",
         ServiceModel = "ONNX/Yolo"
     });
 }
Beispiel #2
0
        public IHttpActionResult LocalPrediction([FromBody] ImageViewModel image)
        {
            var result = YoloPrediction.ObtainBoundingBoxes(image.EncodedImage);

            return(Ok(result));
        }