public virtual async Task <Face[]> DetectAsync(Stream imageStream, bool returnFaceId = true, bool returnFaceLandmarks = false, IEnumerable <FaceAttributeType> returnFaceAttributes = null) { var qs = GetDetectQS(returnFaceId, returnFaceLandmarks, returnFaceAttributes); var response = await RepositoryClient.SendOctetStreamPostAsync(ApiKeys.Face, $"{ApiKeys.FaceEndpoint}detect{qs}", imageStream); return(JsonConvert.DeserializeObject <Face[]>(response)); }
public virtual async Task <Emotion[]> RecognizeAsync(Stream imageStream, Rectangle[] faceRectangles) { var qs = GetRectangleQS(faceRectangles); var response = await RepositoryClient.SendOctetStreamPostAsync(ApiKeys.Emotion, $"{ApiKeys.EmotionEndpoint}recognize{qs}", imageStream); return(JsonConvert.DeserializeObject <Emotion[]>(response)); }
public virtual async Task <AnalysisResult> AnalyzeImageAsync(Stream imageStream, IEnumerable <VisualFeature> visualFeatures = null, IEnumerable <string> details = null) { var qs = GetAnalyzeQuerystring(visualFeatures, details); var response = await RepositoryClient.SendOctetStreamPostAsync(ApiKeys.ComputerVision, $"{ApiKeys.ComputerVisionEndpoint}analyze{qs}", imageStream); return(JsonConvert.DeserializeObject <AnalysisResult>(response)); }
public virtual async Task <UploadCatalogFileResponse> UploadCatalogFileAsync(string modelId, string catalogDisplayName, Stream stream) { var response = await RepositoryClient.SendOctetStreamPostAsync(ApiKeys.Recommendations, $"{ApiKeys.RecommendationsEndpoint}{modelsUrl}{modelId}/catalog?catalogDisplayName={catalogDisplayName}", stream); return(JsonConvert.DeserializeObject <UploadCatalogFileResponse>(response)); }
public virtual async Task <Verification> VerifyAsync(Stream audioStream, Guid id) { var response = await RepositoryClient.SendOctetStreamPostAsync(ApiKeys.SpeakerRecognition, $"{ApiKeys.SpeakerRecognition}verify?verificationProfileId={id.ToString("D")}", audioStream); return(JsonConvert.DeserializeObject <Verification>(response)); }