コード例 #1
0
        public CustomVisionHelper(string trainingKey, string predictionKey, string iterationName, string activeProjectID)
        {
            PredictionKey = predictionKey;
            TrainingKey   = trainingKey;
            ActiveProject = new CustomVisionProject
            {
                Id = activeProjectID
            };

            //
            // TODO: Add constructor logic here
            //
        }
コード例 #2
0
        public async void SetActiveProject(string ProjectName)
        {
            var projects = await GetProjectsAsync();

            for (int i = 0; i < projects.Count; i++)
            {
                if (projects[i].Name.Equals(ProjectName))
                {
                    ActiveProject = projects[i];
                    projectTags   = await GetTagsAsync(ActiveProject.Id);

                    break;
                }
            }
        }
コード例 #3
0
        public CustomVisionProject GetCustomVisionProject(string trainingKey, string projectName)
        {
            var projects = GetProjects(trainingKey);
            CustomVisionProject returnProject = new CustomVisionProject();

            for (int i = 0; i < projects.Count; i++)
            {
                if (projects[i].Name.Equals(projectName))
                {
                    returnProject      = projects[i];
                    returnProject.tags = GetTags(returnProject.Id);
                }
            }

            return(returnProject);
        }
コード例 #4
0
        public void SetActiveProject(string ProjectName)
        {
            var projects = GetProjects();

            for (int i = 0; i < projects.Count; i++)
            {
                if (projects[i].Name.Equals(ProjectName))
                {
                    ActiveProject = projects[i];
                    projectTags   = GetTags(ActiveProject.Id);
                    break;
                }
            }

            //throw new KeyNotFoundException("Project not found");
        }
コード例 #5
0
        public async Task <CustomVisionProject> GetCustomVisionProjectAsync(string trainingKey, string projectName)
        {
            var projects = await GetProjectsAsync(trainingKey);

            CustomVisionProject returnProject = new CustomVisionProject();

            for (int i = 0; i < projects.Count; i++)
            {
                if (projects[i].Name.Equals(projectName))
                {
                    returnProject      = projects[i];
                    returnProject.tags = await GetTagsAsync(returnProject.Id);
                }
            }

            return(returnProject);
        }