Esempio n. 1
0
        public async Task <TinyYOLOModelModelOutput> EvaluateAsync(TinyYOLOModelModelInput input)
        {
            TinyYOLOModelModelOutput    output  = new TinyYOLOModelModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel);

            binding.Bind("image", input.image);
            binding.Bind("grid", output.grid);
            LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }
        public async Task <IMachineLearningOutput> EvaluateAsync(IMachineLearningInput input)
        {
            var modelInput = input as TinyYOLOModelModelInput;
            TinyYOLOModelModelOutput    output  = new TinyYOLOModelModelOutput();
            LearningModelBindingPreview binding = new LearningModelBindingPreview(LearningModel);

            binding.Bind("image", modelInput.image);
            binding.Bind("grid", output.grid);
            LearningModelEvaluationResultPreview evalResult = await LearningModel.EvaluateAsync(binding, string.Empty);

            return(output);
        }