This document describes how to configure AWS Rekognition features in Accurate Video.
For rekognition to work, the source file must be located in a bucket whose region supports the rekognition service, i.e if we have an S3 bucket in Ireland (eu-west-1) we need to make sure that the rekognition job is started in Ireland as well. Make sure that rekognition is available at your intended region.
In the context of Accurate Video this means that the storage containing the asset to be analyzed must be in the same region as the
job runner
. To control the region of the runner there are two options:
The runner needs permissions to read the S3 bucket and to start rekognition jobs. This means that the IAM role associated with the
runner must have permissions AmazonRekognitionFullAccess
and AmazonS3ReadOnlyAccess
. More details on how to configure IAM roles for
rekognition can be found in the AWS documentation.
A user can start an analysis job from Accurate Video if the user has one of the roles analysis_write
or super_user
. The user also
needs write
access to the asset to be analyzed.
The result from an analysis job will be stored on the asset as timespan metadata
. Depending on the job that was run, these
timespans will either be of type REKOGNITION_SHOT
, REKOGNITION_TECHNICAL_CUE
, REKOGNITION_CONTENT_MODERATION
,
REKOGNITION_LABEL_DETECTION
, REKOGNITION_CELEBRITY_DETECTION
or
REKOGNITION_TEXT_DETECTION
and will have metadata fields:
source
- will always be set to REKOGNITION
for rekognition jobsconfidence
- a number [0, 100]type
- the detected type e.g. Shot
, BlackFrames
, Graphics
, Violence
or WORD
.To view the new markers in the UI you will need some additional settings in the frontend settings, see example:
markers: {
groups: [
...
{
match: marker => marker?.metadata.get("source") === "REKOGNITION",
title: "Rekognition",
id: "Rekognition",
readOnly: true,
rows: [
{
match: () => true, // Default
track: ({metadata}) => metadata.get("name"),
title: ({metadata}) => metadata.get("name"),
tooltip: ({metadata}) =>
`${metadata.get("name")} ${metadata.get(
"description"
)}% confidence`
}
],
markerStyle: _ => ({backgroundColor: "#ff9900"})
},
...
],
}
,
markersMetadataSettings: [
....
{
match: type => type.startsWith("REKOGNITION_"),
mappings
:
{
name: "type",
description
:
"confidence",
trackId
:
"trackId"
}
}
,
...