public async Task <MultiObjectDetectionModelv8Output> EvaluateAsync(ImageFeatureValue image) { binding.Bind("image", image); var result = await session.EvaluateAsync(binding, "0"); var output = new MultiObjectDetectionModelv8Output(); output.Grid = result.Outputs["grid"] as TensorFloat; return(output); }
public async Task <MultiObjectDetectionModelv8Output> EvaluateAsync(MultiObjectDetectionModelv8Input input) { var output = new MultiObjectDetectionModelv8Output(); if (input != null) { binding.Bind("image", input.Image); var result = await session.EvaluateAsync(binding, "0"); output.Grid = result.Outputs["grid"] as TensorFloat; } else { throw new NullReferenceException(); } return(output); }