コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }