Three sample projects for Amazon Rekognition:
- LabelDetectionDemo —
DetectLabelsto identify objects and concepts within an image - CustomLabelDetectionDemo —
DetectCustomLabelsto identify objects using a custom-trained model - ContentModerationDemo —
DetectModerationLabelsto detect potentially unsuitable content
All three share the same pattern: load an image, call the relevant Rekognition method, and visualise the results with bounding box overlays.
LClient := TRekognitionClient.Create;
LResponse := LClient.DetectLabels(TRekognitionImage.FromFile('photo.jpg'));
if LResponse.IsSuccessful then
for var LLabel in LResponse.Labels do
WriteLn(Format('%s (%.1f%%)', [LLabel.Name, LLabel.Confidence.Value]));- Open "Rekognition Demos.groupproj" in Delphi or RAD Studio.
- Activate the LabelDetectionDemo.exe project.
- Select "Run > Run" from the menu or press F9.
- Click the "Open Image..." button and choose an image file.
- Click "Detect Labels".
- Once the list of detected labels is populated on the left, you can select an item to highlight on the image. Note that some items listed won't have instances within the image as they are general scene information.
Note: You will need a pre-trained Amazon Rekognition Custom Labels project running in your account.
- Open "Rekognition Demos.groupproj" in Delphi or RAD Studio.
- Activate the CustomLabelDetectionDemo.exe project.
- Select "Run > Run" from the menu or press F9.
- Select a model from the list of running models on the left. This list will be empty if there are no running models in your AWS account.
- Click the "Open Image..." button and choose an image file.
- Click "Detect Custom Labels".
- Once the list of detected labels is populated on the right, you can select an item to highlight on the image.
- Open "Rekognition Demos.groupproj" in Delphi or RAD Studio.
- Activate the "ContentModerationDemo.exe" project.
- Select "Run > Run" from the menu or press F9.
- Click the "Open Image..." button and choose an image.
- Click "Detect Moderation Labels". If no content moderation labels are detected, the image will be revealed automatically.
- When an image remains blurred, it means content moderation labels were detected. Inspect the detected moderation labels in the list on the left. If you wish to reveal the image, you can select the "Reveal" checkbox on the top-right.
rekognition:DetectLabels(Label Detection)rekognition:DetectCustomLabels(Custom Label Detection)rekognition:DetectModerationLabels(Content Moderation)


