This page will describe how to configure Cognitive Services together with Digizuite.
- How to setup Computer Services from your Azure Portal.
- Pricing Details
- Find Endpoint and Subscription key in the Azure Portal
- Change the App settings in Digizuite to use the Endpoint and Subscription Key.
Note: This guide shows you how to configure the AI feature on the Azure portal: How to add AI tagging (on Azure hosted environment), APP service (Lasse Brønnum Brønsholt (Unlicensed) )
Configure Azure Portal
Add the Computer Vision service to your account through the Azure portal:
Select a pricing tier that fits your consumption. After adding the service it will appear in your dashboard.
Pricing Details
Pricing details can be found here: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/computer-vision/
"For Recognize Text each POST call counts as a transaction. All GET calls to see the results of the async service are counted as transactions but are free of charge. For all other operations, each feature call counts as a transaction, whether called independently or grouped through the Analyze call. Analyze calls are used to make calling the API easier, but each feature used counts as a transaction. For instance, an Analyze call containing Tag, Face, and Adult would count as three transactions."
The features that are supported are shown below here. The number of transactions is dependent on the number of visual features wanted. So if the system is configured with all, then it will be 7 transactions per asset.
ImageType = 0,
Faces = 1,
Adult = 2,
Categories = 3,
Color = 4,
Tags = 5,
Description = 6
The default configuration for the service is setup to only analyze for Tags. This will mean that we out of the box will have 1 transaction per asset.
Endpoint & Subscription Key
It's important for the Digizuite AI Service to have the endpoint and subscription key. These can be found when selecting the service in Azure as shown below:
Make sure that the resource you take the info from, is of the API type "Computer Vision" (See image above for more info)
Facial Recognition
In order to use the facial recognition features of the cognitive service, you must create a Faces resource in the Azure portal.
Once the services are created, go to the Quick start tab of the resource and locate the API Key (Key1) and the Endpoint:
These are the FacesKey and the FacesEndpointUrl in the app settings, respectively.
The FacesPersonGroup setting is a string that defines the name of the person group used for facial recognition.
It is not shown anywhere, but if there are multiple customers on the same Faces resource, they must each have a unique string here.
For customers with their own Face resources, simply use the name of the customer or similar. The string must be without spaces or special characters and must be all lowercase.
Make sure that the resource you take the info from, is of the API type "Face" (Can be found in the "Overview" of the resource under API type)
Video Transcription
In order to use the Video Transcription features of the cognitive services, a videoindexer subscription key must be acquired and configured.
To acquire the key, go to https://api-portal.videoindexer.ai/products, and sign in with a Microsoft account.
Then go to https://api-portal.videoindexer.ai/products/authorization and select the Product Authorization subscription.
Click 'Show' on the Primary Key and place that key in the VideoIndexerKey options of the Appsettings.json file.
The VideoIndexerWatcherInterval is used to configure how often the cognitive service checks for new progress on indexed videos. 180 represents checking every 180 seconds (3 minutes).
To entirely disable the Video service, please set the VideoIndexerWatcherInterval to 0.
Translation services
Translation services are available under the resource type "translation" in the azure portal. Once the resource has been created, the keys are available the same way as specified under Endpoint & Subscription Key above.
App settings in the Digizuite
These must be correctly added to app.settings under damcenter/DigizuiteCore/appsettings.json:
"subscriptionKey": "..................................",
"AzureEndpointUrl": "https://northeurope.api.cognitive.microsoft.com/",
"FacesKey": "..................................",,
"FacesEndpointUrl": "https://digi-faces-dev.cognitiveservices.azure.com/",
"FacesPersonGroup": "digipersons",
"VisualFeatures": "Tags",
"VideoIndexerKey": "..................................",,
"VideoIndexerWatcherInterval": 180
}
and
"TranslationApi": {
"EndpointUrl": "https://api.cognitive.microsofttranslator.com",
"SubscriptionKey": "..................................",
"ApiVersion": "3.0"
}
It is not a requirement to have "VideoIndexerKey" and "TranslationApi". Those subscription keys can be empty. But if you want to use AI translation for more languages that English, then the subscription key is required.
Important is to notice that the Visual Features are based on the list from Azure. The default is these 5 which can be configured. Changing it will impact pricing.
To enable more Visual Features, simply separate them by a comma. For example: VisualFeatures": "Tags,Adult,Description"
The SubscriptionKey for Translation is not the same as the one for computer vision.