private async void BDescribe_Click(object sender, RoutedEventArgs e)
        {
            if (_currentImage == null)
            {
                return;
            }
            var image = ImageHelper.ToImage(_currentImage);

            string description = "Analyze...";

            Description.Text = description;
            if (ServiceGeneric.IsChecked ?? false)
            {
                description = await _visionClient.Analyze(image);
            }
            else if (ServiceCustom.IsChecked ?? false)
            {
                description = await _customVisionClient.Analyze(image, _currentProjectId);
            }
            else if (ServiceLocal.IsChecked ?? false)
            {
                var tensorResult = await _localCustomVisionClient.Analyze(image, _currentProjectId);

                description = tensorResult.Result.Label;
            }
            Description.Text = description;
        }
Exemple #2
0
        private async void BDescribe_Click(object sender, RoutedEventArgs e)
        {
            if (_currentImage == null)
            {
                return;
            }
            var image = ImageHelper.ToImage(_currentImage);

            string description = "Analyze...";

            Description.Text = description;
            description      = await _localCustomVisionClient.Analyze(image, _projectName);

            Description.Text = description;
        }