use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class DetectLabelsS3 method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <bucket> <image>\n\n" + "Where:\n" + " bucket - the name of the Amazon S3 bucket that contains the image (for example, ,ImageBucket)." + " image - the name of the image located in the Amazon S3 bucket (for example, Lake.png). \n\n";
if (args.length != 2) {
System.out.println(USAGE);
System.exit(1);
}
String bucket = args[0];
String image = args[1];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
getLabelsfromImage(rekClient, bucket, image);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class CelebrityInfo method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + "CelebrityInfo <id>\n\n" + "Where:\n" + "id - the id value of the celebrity. You can use the RecognizeCelebrities example to get the ID value. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String id = args[0];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
getCelebrityInfo(rekClient, id);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class DeleteCollection method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + " <collectionId> \n\n" + "Where:\n" + " collectionId - the id of the collection to delete. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String collectionId = args[0];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
System.out.println("Deleting collection: " + collectionId);
deleteMyCollection(rekClient, collectionId);
rekClient.close();
}
use of software.amazon.awssdk.services.rekognition.RekognitionClient in project aws-doc-sdk-examples by awsdocs.
the class DetectCustomLabels method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage: " + "DetectLabels <project arn> <S3 bucket> <S3 key>\n\n" + "Where:\n" + "project arn - the arn of the model in Rekognition Custom Labels to the image (for example, arn:aws:rekognition:us-east-1:XXXXXXXXXXXX:project/YOURPROJECT/version/YOURPROJECT.YYYY-MM-DDT00.00.00/1234567890123). \n" + "S3 bucket - the bucket where your image is stored (for example, my-bucket-name \n" + "S3 key - the path of the image inside your bucket (for example, myfolder/pic1.png). \n\n";
if (args.length != 3) {
System.out.println(USAGE);
System.exit(1);
}
String arn = args[0];
String bucket = args[1];
String key = args[2];
Region region = Region.US_EAST_1;
RekognitionClient rekClient = RekognitionClient.builder().region(region).build();
detectImageCustomLabels(rekClient, arn, bucket, key);
rekClient.close();
}
Aggregations