AWS SDK 또는 CLI와 함께 GetCelebrityInfo 사용 - Amazon Rekognition

AWS SDK 또는 CLI와 함께 GetCelebrityInfo 사용

다음 코드 예시는 GetCelebrityInfo의 사용 방법을 보여 줍니다.

.NET
SDK for .NET
참고

GitHub에 더 많은 내용이 있습니다. AWS 코드 예제 리포지토리에서 전체 예제를 찾고 설정 및 실행하는 방법을 배워보세요.

using System; using System.Threading.Tasks; using Amazon.Rekognition; using Amazon.Rekognition.Model; /// <summary> /// Shows how to use Amazon Rekognition to retrieve information about the /// celebrity identified by the supplied celebrity Id. /// </summary> public class CelebrityInfo { public static async Task Main() { string celebId = "nnnnnnnn"; var rekognitionClient = new AmazonRekognitionClient(); var celebrityInfoRequest = new GetCelebrityInfoRequest { Id = celebId, }; Console.WriteLine($"Getting information for celebrity: {celebId}"); var celebrityInfoResponse = await rekognitionClient.GetCelebrityInfoAsync(celebrityInfoRequest); // Display celebrity information. Console.WriteLine($"celebrity name: {celebrityInfoResponse.Name}"); Console.WriteLine("Further information (if available):"); celebrityInfoResponse.Urls.ForEach(url => { Console.WriteLine(url); }); } }
  • API 세부 정보는 AWS SDK for .NET API 참조GetCelebrityInfo를 참조하세요.

CLI
AWS CLI

유명 인사에 대한 정보를 가져오는 방법

다음 get-celebrity-info 명령은 지정된 유명인의 정보를 표시합니다. id 파라미터는 이전 recognize-celebrities 직접 호출에서 가져온 것입니다.

aws rekognition get-celebrity-info --id nnnnnnn

결과:

{ "Name": "Celeb A", "Urls": [ "www.imdb.com/name/aaaaaaaaa" ] }

자세한 내용은 Amazon Rekognition 개발자 안내서유명인의 정보 가져오기를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조GetCelebrityInfo를 참조하세요.

AWS SDK 개발자 가이드 및 코드 예시의 전체 목록은 AWS SDK와 함께 Rekognition 사용 섹션을 참조하세요. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.