public IList <string> ClassificarPorUrl(string idDoProjeto, string url) { var resultadoDaClassificacao = _servicoCognitivoDeVisaoPersonalizadaPredicao .ClassifyImageUrl( new Guid(idDoProjeto), UltimaIteracaoRealizada(idDoProjeto), new ImageUrl(url)); return(AnalisarResultadoDaClassificacao(resultadoDaClassificacao)); }
public void ClassifyImageUrl() { string testImageUrl = "https://raw.githubusercontent.com/Microsoft/Cognitive-CustomVision-Windows/master/Samples/Images/Test/test_image.jpg"; using (MockContext context = MockContext.Start(this.GetType())) { HttpMockServer.Initialize(this.GetType(), "ClassifyImageUrl", RecorderMode); ICustomVisionPredictionClient client = GetPredictionClientClient(); ImageUrl url = new ImageUrl(testImageUrl); ImagePrediction results = client.ClassifyImageUrl(ClassificationProjectId, ClassificationPublishedName, url); ValidateResults(results); } }