Skip to content

Commit ffe418b

Browse files
authored
Merge pull request #224647 from Juliako/logo
added logo
2 parents 739f462 + 1ba3955 commit ffe418b

File tree

10 files changed

+243
-1
lines changed

10 files changed

+243
-1
lines changed
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
---
2+
title: Detect textual logo with Azure Video Indexer
3+
description: This article gives an overview of Azure Video Indexer textual logo detection.
4+
ms.topic: how-to
5+
ms.date: 01/22/2023
6+
ms.author: juliako
7+
---
8+
9+
# How to detect textual logo (preview)
10+
11+
> [!NOTE]
12+
> Textual logo detection (preview) creation process is currently available through API. The result can be viewed through the Azure Video Indexer [website](https://www.videoindexer.ai/).
13+
14+
**Textual logo detection** insights are based on the OCR textual detection, which matches a specific predefined text.
15+
16+
For example, if a user would create a textual logo: “Microsoft”, different appearances of the word ‘Microsoft’ will be detected as the ‘Microsoft’ logo. A logo can have different variations, these variations can be associated with the main logo name. For example, user might have under the ‘Microsoft’ logo the following variations: ‘MS’, ‘MSFT’ etc.
17+
18+
```json
19+
{
20+
"name": "Microsoft",
21+
"wikipediaSearchTerm": "Microsoft",
22+
"textVariations": [{
23+
"text": "Microsoft",
24+
"caseSensitive": false
25+
}, {
26+
"text": "MSFT",
27+
"caseSensitive": true
28+
}]
29+
}
30+
```
31+
32+
> [!div class="mx-imgBorder"]
33+
> :::image type="content" source="./media/textual-logo-detection/microsoft-example.png" alt-text="Diagram of logo detection.":::
34+
35+
## Prerequisite
36+
37+
The Azure Video Index account must have (at the very least) the `contributor` role assigned to the resource.
38+
39+
## How to use
40+
41+
In order to use textual logo detection, follow these steps, described in this article:
42+
43+
1. Create a logo instance using with the [Create logo](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Create-Logo) API (with variations).
44+
45+
* Save the logo ID.
46+
1. Create a logo group using the [Create Logo Group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Create-Logo-Group) API.
47+
48+
* Associate the logo instance with the group when creating the new group (by pasting the ID in the logos array).
49+
1. Upload a video using: **Advanced video** or **Advance video + audio** preset, use the `logoGroupId` parameter to specify the logo group you would like to index the video with.
50+
51+
## Create a logo instance
52+
53+
Use the [Create logo](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Create-Logo) API to create your logo. You can use the **try it** button.
54+
55+
> [!div class="mx-imgBorder"]
56+
> :::image type="content" source="./media/textual-logo-detection/logo-api.png" alt-text="Diagram of logo API.":::
57+
58+
In this tutorial we use the example supplied as default:
59+
60+
Insert the following:
61+
62+
* `Location`: The location of the Azure Video Indexer account.
63+
* `Account ID`: The ID of the Azure Video Indexer account.
64+
* `Access token`: The token, at least at a contributor level permission.
65+
66+
The default body is:
67+
68+
```json
69+
{
70+
"name": "Microsoft",
71+
"wikipediaSearchTerm": "Microsoft",
72+
"textVariations": [{
73+
"text": "Microsoft",
74+
"caseSensitive": false
75+
}, {
76+
"text": "MSFT",
77+
"caseSensitive": true
78+
}]
79+
}
80+
```
81+
82+
|Key|Value|
83+
|---|---|
84+
|Name|Name of the logo, would be used in the Azure Video Indexer website.|
85+
|wikipediaSearchTerm|Used to create a description in the Video Indexer website.|
86+
|text|The text the model will compare too, make sure to add the obvious name as part of the variations. (e.g Microsoft)|
87+
|caseSensitive| true/false according to the variation.|
88+
89+
The response should return **201 Created**.
90+
91+
```
92+
HTTP/1.1 201 Created
93+
94+
content-type: application/json; charset=utf-8
95+
96+
{
97+
"id": "id"
98+
"creationTime": "2023-01-15T13:08:14.9518235Z",
99+
"lastUpdateTime": "2023-01-15T13:08:14.9518235Z",
100+
"lastUpdatedBy": "Jhon Doe",
101+
"createdBy": "Jhon Doe",
102+
"name": "Microsoft",
103+
"wikipediaSearchTerm": "Microsoft",
104+
"textVariations": [{
105+
"text": "Microsoft",
106+
"caseSensitive": false,
107+
"creationTime": "2023-01-15T13:08:14.9518235Z",
108+
"createdBy": "Jhon Doe"
109+
}, {
110+
"text": "MSFT",
111+
"caseSensitive": true,
112+
"creationTime": "2023-01-15T13:08:14.9518235Z",
113+
"createdBy": "Jhon Doe"
114+
}]
115+
}
116+
```
117+
## Create a new textual logo group
118+
119+
Use the [Create Logo Group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Create-Logo-Group) API to create a logo group. Use the **try it** button.
120+
121+
Insert the following:
122+
123+
* `Location`: The location of the Azure Video Indexer account.
124+
* `Account ID`: The ID of the Azure Video Indexer account.
125+
* `Access token`: The token, at least at a contributor level permission.
126+
127+
> [!div class="mx-imgBorder"]
128+
> :::image type="content" source="./media/textual-logo-detection/logo-group-api.png" alt-text="Diagram of logo group API.":::
129+
130+
In the **Body** paste the logo ID from the previous step.
131+
132+
```json
133+
{
134+
"logos": [{
135+
"logoId": "id"
136+
}],
137+
"name": "Technology",
138+
"description": "A group of logos of technology companies."
139+
}
140+
```
141+
142+
* The default example has two logo IDs, we have created the first group with only one logo ID.
143+
144+
The response should return **201 Created**.
145+
146+
```
147+
HTTP/1.1 201 Created
148+
149+
content-type: application/json; charset=utf-8
150+
151+
{
152+
"id": "id",
153+
"creationTime": "2023-01-15T14:41:11.4860104Z",
154+
"lastUpdateTime": "2023-01-15T14:41:11.4860104Z",
155+
"lastUpdatedBy": "Jhon Doe",
156+
"createdBy": "Jhon Doe",
157+
"logos": [{
158+
"logoId": " e9d609b4-d6a6-4943-86ff-557e724bd7c6"
159+
}],
160+
"name": "Technology",
161+
"description": "A group of logos of technology companies."
162+
}
163+
```
164+
165+
## Upload from URL
166+
167+
Use the upload API call:
168+
169+
Specify the following:
170+
171+
* `Location`: The location of the Azure Video Indexer account.
172+
* `Account`: The ID of the Azure Video Indexer account.
173+
* `Name`: The name of the media file you're indexing.
174+
* `Language`: `en-US`. For more information, see [Language support](language-support.md)
175+
* `IndexingPreset`: Select **Advanced Video/Audio+video**.
176+
* `Videourl`: The url.
177+
* `LogoGroupID`: GUID representing the logo group (you got it in the response when creating it).
178+
* `Access token`: The token, at least at a contributor level permission.
179+
180+
## Inspect the output
181+
182+
Assuming the textual logo model has found a match, you'll be able to view the result in the [Azure Video Indexer website](https://www.videoindexer.ai/).
183+
184+
### Insights
185+
186+
A new section would appear in the insights panel showing the number of custom logos that were detected. One representative thumbnail will be displayed representing the new logo.
187+
188+
> [!div class="mx-imgBorder"]
189+
> :::image type="content" source="./media/textual-logo-detection/logo-insight.png" alt-text="Diagram of logo insight.":::
190+
191+
### Timeline
192+
193+
When switching to the Timeline view, under the **View**, mark the **Logos** checkbox. All detected thumbnails will be displayed according to their time stamp.
194+
195+
> [!div class="mx-imgBorder"]
196+
> :::image type="content" source="./media/textual-logo-detection/logo-timeline.png" alt-text="Diagram of logo timeline.":::
197+
198+
All logo instances that were recognized with a certainty above 80% present will be displayed, the extended list of detection including low certainty detection are available in the [Artifacts](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Video-Artifact-Download-Url) file.
199+
200+
## Next steps
201+
202+
### Adding a logo to an existing logo group
203+
204+
In the first part of this article, we had one instance of a logo and we have associated it to the right logo group upon the creation of the logo group. If all logo instances are created before the logo group is created, they can be associated with logo group on the creation phase. However, if the group was already created, the new instance should be associated to the group following these steps:
205+
206+
1. Create the logo.
207+
208+
1. Copy the logo ID.
209+
1. [Get logo groups](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Logo-Groups).
210+
211+
1. Copy the logo group ID of the right group.
212+
1. [Get logo group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Logo-Group).
213+
214+
1. Copy the response the list of logos IDs:
215+
216+
Logo list sample:
217+
218+
```json
219+
"logos": [{
220+
"logoId": "id"
221+
}],
222+
```
223+
1. [Update logo group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Update-Logo-Group).
224+
225+
1. Logo group ID is the output received at step 2.
226+
1. At the ‘Body’ of the request, paste the existing list of logos from step 3.
227+
1. Then add to the list the logo ID from step 1.
228+
1. Validate the response of the [Update logo group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Logo-Groups) making sure the list contains the previous IDs and the new.
229+
230+
### Additional information and limitations
231+
232+
* A logo group can contain up to 50 logos.
233+
* One logo can be linked to more than one group.
234+
* Use the [Update logo group](https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Logo-Groups) to add the new logo to an existing group.

articles/azure-video-indexer/insights-overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Here some common insights:
1818
|Scenes, shots, and keyframes|Selects the frame(s) that best represent each shot. Keyframes are the representative frames selected from the entire video based on aesthetic properties (for example, contrast and stableness). Scenes, shots, and keyframes are merged into one insight for easier consumption and navigation. When you select the desired scene you can see what shots and keyframes it consists of. For more information, see [Scenes, shots, and keyframes](scenes-shots-keyframes.md).|
1919
|Emotions|Identifies emotions based on speech and audio cues.|
2020
|Faces|For more information, see [Faces detection](/legal/azure-video-indexer/face-detection-transparency-note?context=/azure/azure-video-indexer/context/context).|
21+
|Textual logo detection|Matches a specific predefined text using Azure Video Indexer OCR. For example, if a user created a textual logo: "Microsoft", different appearances of the word *Microsoft* will be detected as the "Microsoft" logo. For more information, see [Detect textual logo](detect-textual-logo.md).
2122
|Keywords|For more information, see [Keywords extraction](/legal/azure-video-indexer/keywords-transparency-note?context=/azure/azure-video-indexer/context/context).|
2223
|Labels|For more information, see [Labels identification](/legal/azure-video-indexer/labels-identification-transparency-note?context=/azure/azure-video-indexer/context/context)|
2324
|Named entities|For more information, see [Named entities](/legal/azure-video-indexer/named-entities-transparency-note?context=/azure/azure-video-indexer/context/context).|
117 KB
Loading
112 KB
Loading
311 KB
Loading
356 KB
Loading
188 KB
Loading

articles/azure-video-indexer/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ To stay up-to-date with the most recent Azure Video Indexer developments, this a
2525

2626
## January 2023
2727

28+
### Textual logo detection
29+
30+
A **textual logo detection** insight is an OCR-based textual detection which matches a specific predefined text. For example, if a user created a textual logo: "Microsoft", different appearances of the word *Microsoft* will be detected as the "Microsoft" logo. For more information, see [Detect textual logo](detect-textual-logo.md).
31+
2832
### Language support
2933

3034
* New languages are now supported: Irish, Bulgarian, Catalan, Greek, Estonian, Croatian, Latvian, Romanian, Slovak, Slovenian, Telugu, Malayalam, Kannada, Icelandic, Armenian, Gujarati, Malay, and Tamil.

articles/azure-video-indexer/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
- name: Using at scale
6969
href: considerations-when-use-at-scale.md
7070
- name: Insights
71-
href: insights-overview.md
71+
href: insights-overview.md
7272
- name: Customizing content models
7373
items:
7474
- name: Overview
@@ -114,6 +114,8 @@
114114
href: odrv-download.md
115115
- name: Use insights
116116
items:
117+
- name: Detect textual logo
118+
href: detect-textual-logo.md
117119
- name: View and edit insights
118120
href: video-indexer-view-edit.md
119121
- name: Find exact moments within videos

articles/azure-video-indexer/video-indexer-overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Unless specified otherwise, a model is generally available.
6464
* Textless slate detection, including scene matching.
6565

6666
For details, see [Slate detection](slate-detection-insight.md).
67+
* **Textual logo detection** (preview): Matches a specific predefined text using Azure Video Indexer OCR. For example, if a user created a textual logo: "Microsoft", different appearances of the word *Microsoft* will be detected as the "Microsoft" logo. For more information, see [Detect textual logo](detect-textual-logo.md).
6768

6869
### Audio models
6970

0 commit comments

Comments
 (0)