Skip to content

Commit 190e9d7

Browse files
author
clams-bot
committed
adding metadata of swt-detection.v7.4
1 parent d147307 commit 190e9d7

File tree

5 files changed

+381
-2
lines changed

5 files changed

+381
-2
lines changed
+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
layout: posts
3+
classes: wide
4+
title: "Scenes-with-text Detection (v7.4)"
5+
date: 2025-02-03T22:07:54+00:00
6+
---
7+
## About this version
8+
9+
- Submitter: [keighrim](https://github.com/keighrim)
10+
- Submission Time: 2025-02-03T22:07:54+00:00
11+
- Prebuilt Container Image: [ghcr.io/clamsproject/app-swt-detection:v7.4](https://github.com/clamsproject/app-swt-detection/pkgs/container/app-swt-detection/v7.4)
12+
- Release Notes
13+
14+
> fixed rare rounding error with certain combo of sample_rate and video duration
15+
16+
## About this app (See raw [metadata.json](metadata.json))
17+
18+
**Detects scenes with text, like slates, chyrons and credits. This app can run in three modes, depending on `useClassifier`, `useStitcher` parameters. When `useClassifier=True`, it runs in the "TimePoint mode" and generates TimePoint annotations. When `useStitcher=True`, it runs in the "TimeFrame mode" and generates TimeFrame annotations based on existing TimePoint annotations -- if no TimePoint is found, it produces an error. By default, it runs in the 'both' mode and first generates TimePoint annotations and then TimeFrame annotations on them.**
19+
20+
- App ID: [http://apps.clams.ai/swt-detection/v7.4](http://apps.clams.ai/swt-detection/v7.4)
21+
- App License: Apache 2.0
22+
- Source Repository: [https://github.com/clamsproject/app-swt-detection](https://github.com/clamsproject/app-swt-detection) ([source tree of the submitted version](https://github.com/clamsproject/app-swt-detection/tree/v7.4))
23+
24+
25+
#### Inputs
26+
(**Note**: "*" as a property value means that the property is required but can be any value.)
27+
28+
- [http://mmif.clams.ai/vocabulary/VideoDocument/v1](http://mmif.clams.ai/vocabulary/VideoDocument/v1) (required)
29+
(of any properties)
30+
31+
32+
33+
#### Configurable Parameters
34+
(**Note**: _Multivalued_ means the parameter can have one or more values.)
35+
36+
- `useClassifier`: optional, defaults to `true`
37+
38+
- Type: boolean
39+
- Multivalued: False
40+
- Choices: `false`, **_`true`_**
41+
42+
43+
> Use the image classifier model to generate TimePoint annotations.
44+
- `tpModelName`: optional, defaults to `convnext_small`
45+
46+
- Type: string
47+
- Multivalued: False
48+
- Choices: **_`convnext_small`_**, `convnext_tiny`, `convnext_lg`
49+
50+
51+
> Model name to use for classification, only applies when `useClassifier=true`.
52+
- `tpUsePosModel`: optional, defaults to `true`
53+
54+
- Type: boolean
55+
- Multivalued: False
56+
- Choices: `false`, **_`true`_**
57+
58+
59+
> Use the model trained with positional features, only applies when `useClassifier=true`.
60+
- `tpStartAt`: optional, defaults to `0`
61+
62+
- Type: integer
63+
- Multivalued: False
64+
65+
66+
> Number of milliseconds into the video to start processing, only applies when `useClassifier=true`.
67+
- `tpStopAt`: optional, defaults to `9223372036854775807`
68+
69+
- Type: integer
70+
- Multivalued: False
71+
72+
73+
> Number of milliseconds into the video to stop processing, only applies when `useClassifier=true`.
74+
- `tpSampleRate`: optional, defaults to `1000`
75+
76+
- Type: integer
77+
- Multivalued: False
78+
79+
80+
> Milliseconds between sampled frames, only applies when `useClassifier=true`.
81+
- `useStitcher`: optional, defaults to `true`
82+
83+
- Type: boolean
84+
- Multivalued: False
85+
- Choices: `false`, **_`true`_**
86+
87+
88+
> Use the stitcher after classifying the TimePoints.
89+
- `tfMinTPScore`: optional, defaults to `0.5`
90+
91+
- Type: number
92+
- Multivalued: False
93+
94+
95+
> Minimum score for a TimePoint to be included in a TimeFrame. A lower value will include more TimePoints in the TimeFrame (increasing recall in exchange for precision). Only applies when `useStitcher=true`.
96+
- `tfMinTFScore`: optional, defaults to `0.9`
97+
98+
- Type: number
99+
- Multivalued: False
100+
101+
102+
> Minimum score for a TimeFrame. A lower value will include more TimeFrames in the output (increasing recall in exchange for precision). Only applies when `useStitcher=true`
103+
- `tfMinTFDuration`: optional, defaults to `5000`
104+
105+
- Type: integer
106+
- Multivalued: False
107+
108+
109+
> Minimum duration of a TimeFrame in milliseconds, only applies when `useStitcher=true`.
110+
- `tfAllowOverlap`: optional, defaults to `false`
111+
112+
- Type: boolean
113+
- Multivalued: False
114+
- Choices: **_`false`_**, `true`
115+
116+
117+
> Allow overlapping time frames, only applies when `useStitcher=true`
118+
- `tfDynamicSceneLabels`: optional, defaults to `['credit', 'credits']`
119+
120+
- Type: string
121+
- Multivalued: True
122+
123+
124+
> Labels that are considered dynamic scenes. For dynamic scenes, TimeFrame annotations contains multiple representative points to follow any changes in the scene. Only applies when `useStitcher=true`
125+
- `tfLabelMap`: optional, defaults to `[]`
126+
127+
- Type: map
128+
- Multivalued: True
129+
130+
131+
> (See also `tfLabelMapPreset`, set `tfLabelMapPreset=nopreset` to make sure that a preset does not override `tfLabelMap` when using this) Mapping of a label in the input TimePoint annotations to a new label of the stitched TimeFrame annotations. Must be formatted as IN_LABEL:OUT_LABEL (with a colon). To pass multiple mappings, use this parameter multiple times. When two+ TP labels are mapped to a TF label, it essentially works as a "binning" operation. If no mapping is used, all the input labels are passed-through, meaning no change in both TP & TF labelsets. However, when at least one label is mapped, all the other "unset" labels are mapped to the negative label (`-`) and if `-` does not exist in the TF labelset, it is added automatically. Only applies when `useStitcher=true`.
132+
- `tfLabelMapPreset`: optional, defaults to `relaxed`
133+
134+
- Type: string
135+
- Multivalued: False
136+
- Choices: `noprebin`, `nomap`, `strict`, `simpler`, `simple`, **_`relaxed`_**, `binary-bars`, `binary-slate`, `binary-chyron-strict`, `binary-chyron-relaxed`, `binary-credits`, `nopreset`
137+
138+
139+
> (See also `tfLabelMap`) Preset alias of a label mapping. If not `nopreset`, this parameter will override the `tfLabelMap` parameter. Available presets are:<br/>- `noprebin`: []<br/>- `nomap`: []<br/>- `strict`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron-person`', '`N`:`Chyron-person`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Main`', '`O`:`Opening`', '`W`:`Opening`', '`Y`:`Chyron-other`', '`U`:`Chyron-other`', '`K`:`Chyron-other`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']<br/>- `simpler`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron`', '`N`:`Chyron`', '`C`:`Credits`', '`R`:`Credits`']<br/>- `simple`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron-person`', '`N`:`Chyron-person`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Other-text`', '`O`:`Other-text`', '`W`:`Other-text`', '`Y`:`Other-text`', '`U`:`Other-text`', '`K`:`Other-text`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']<br/>- `relaxed`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`Y`:`Chyron`', '`U`:`Chyron`', '`K`:`Chyron`', '`I`:`Chyron`', '`N`:`Chyron`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Other-text`', '`O`:`Other-text`', '`W`:`Other-text`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']<br/>- `binary-bars`: ['`B`:`Bars`']<br/>- `binary-slate`: ['`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`']<br/>- `binary-chyron-strict`: ['`I`:`Chyron-person`', '`N`:`Chyron-person`']<br/>- `binary-chyron-relaxed`: ['`Y`:`Chyron`', '`U`:`Chyron`', '`K`:`Chyron`', '`I`:`Chyron`', '`N`:`Chyron`']<br/>- `binary-credits`: ['`C`:`Credits`', '`R`:`Credits`']<br/><br/> Only applies when `useStitcher=true`.
140+
- `pretty`: optional, defaults to `false`
141+
142+
- Type: boolean
143+
- Multivalued: False
144+
- Choices: **_`false`_**, `true`
145+
146+
147+
> The JSON body of the HTTP response will be re-formatted with 2-space indentation
148+
- `runningTime`: optional, defaults to `false`
149+
150+
- Type: boolean
151+
- Multivalued: False
152+
- Choices: **_`false`_**, `true`
153+
154+
155+
> The running time of the app will be recorded in the view metadata
156+
- `hwFetch`: optional, defaults to `false`
157+
158+
- Type: boolean
159+
- Multivalued: False
160+
- Choices: **_`false`_**, `true`
161+
162+
163+
> The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata
164+
165+
166+
#### Outputs
167+
(**Note**: "*" as a property value means that the property is required but can be any value.)
168+
169+
(**Note**: Not all output annotations are always generated.)
170+
171+
- [http://mmif.clams.ai/vocabulary/TimeFrame/v5](http://mmif.clams.ai/vocabulary/TimeFrame/v5)
172+
- _timeUnit_ = "milliseconds"
173+
174+
- [http://mmif.clams.ai/vocabulary/TimePoint/v4](http://mmif.clams.ai/vocabulary/TimePoint/v4)
175+
- _timeUnit_ = "milliseconds"
176+
- _labelset_ = a list of ["B", "S", "I", "C", "R", "M", "O", "W", "N", "Y", "U", "K", "L", "G", "F", "E", "T", "P"]
177+
+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"name": "Scenes-with-text Detection",
3+
"description": "Detects scenes with text, like slates, chyrons and credits. This app can run in three modes, depending on `useClassifier`, `useStitcher` parameters. When `useClassifier=True`, it runs in the \"TimePoint mode\" and generates TimePoint annotations. When `useStitcher=True`, it runs in the \"TimeFrame mode\" and generates TimeFrame annotations based on existing TimePoint annotations -- if no TimePoint is found, it produces an error. By default, it runs in the 'both' mode and first generates TimePoint annotations and then TimeFrame annotations on them.",
4+
"app_version": "v7.4",
5+
"mmif_version": "1.0.5",
6+
"app_license": "Apache 2.0",
7+
"identifier": "http://apps.clams.ai/swt-detection/v7.4",
8+
"url": "https://github.com/clamsproject/app-swt-detection",
9+
"input": [
10+
{
11+
"@type": "http://mmif.clams.ai/vocabulary/VideoDocument/v1",
12+
"required": true
13+
}
14+
],
15+
"output": [
16+
{
17+
"@type": "http://mmif.clams.ai/vocabulary/TimeFrame/v5",
18+
"properties": {
19+
"timeUnit": "milliseconds"
20+
}
21+
},
22+
{
23+
"@type": "http://mmif.clams.ai/vocabulary/TimePoint/v4",
24+
"properties": {
25+
"timeUnit": "milliseconds",
26+
"labelset": [
27+
"B",
28+
"S",
29+
"I",
30+
"C",
31+
"R",
32+
"M",
33+
"O",
34+
"W",
35+
"N",
36+
"Y",
37+
"U",
38+
"K",
39+
"L",
40+
"G",
41+
"F",
42+
"E",
43+
"T",
44+
"P"
45+
]
46+
}
47+
}
48+
],
49+
"parameters": [
50+
{
51+
"name": "useClassifier",
52+
"description": "Use the image classifier model to generate TimePoint annotations.",
53+
"type": "boolean",
54+
"default": true,
55+
"multivalued": false
56+
},
57+
{
58+
"name": "tpModelName",
59+
"description": "Model name to use for classification, only applies when `useClassifier=true`.",
60+
"type": "string",
61+
"choices": [
62+
"convnext_small",
63+
"convnext_tiny",
64+
"convnext_lg"
65+
],
66+
"default": "convnext_small",
67+
"multivalued": false
68+
},
69+
{
70+
"name": "tpUsePosModel",
71+
"description": "Use the model trained with positional features, only applies when `useClassifier=true`.",
72+
"type": "boolean",
73+
"default": true,
74+
"multivalued": false
75+
},
76+
{
77+
"name": "tpStartAt",
78+
"description": "Number of milliseconds into the video to start processing, only applies when `useClassifier=true`.",
79+
"type": "integer",
80+
"default": 0,
81+
"multivalued": false
82+
},
83+
{
84+
"name": "tpStopAt",
85+
"description": "Number of milliseconds into the video to stop processing, only applies when `useClassifier=true`.",
86+
"type": "integer",
87+
"default": 9223372036854775807,
88+
"multivalued": false
89+
},
90+
{
91+
"name": "tpSampleRate",
92+
"description": "Milliseconds between sampled frames, only applies when `useClassifier=true`.",
93+
"type": "integer",
94+
"default": 1000,
95+
"multivalued": false
96+
},
97+
{
98+
"name": "useStitcher",
99+
"description": "Use the stitcher after classifying the TimePoints.",
100+
"type": "boolean",
101+
"default": true,
102+
"multivalued": false
103+
},
104+
{
105+
"name": "tfMinTPScore",
106+
"description": "Minimum score for a TimePoint to be included in a TimeFrame. A lower value will include more TimePoints in the TimeFrame (increasing recall in exchange for precision). Only applies when `useStitcher=true`.",
107+
"type": "number",
108+
"default": 0.5,
109+
"multivalued": false
110+
},
111+
{
112+
"name": "tfMinTFScore",
113+
"description": "Minimum score for a TimeFrame. A lower value will include more TimeFrames in the output (increasing recall in exchange for precision). Only applies when `useStitcher=true`",
114+
"type": "number",
115+
"default": 0.9,
116+
"multivalued": false
117+
},
118+
{
119+
"name": "tfMinTFDuration",
120+
"description": "Minimum duration of a TimeFrame in milliseconds, only applies when `useStitcher=true`.",
121+
"type": "integer",
122+
"default": 5000,
123+
"multivalued": false
124+
},
125+
{
126+
"name": "tfAllowOverlap",
127+
"description": "Allow overlapping time frames, only applies when `useStitcher=true`",
128+
"type": "boolean",
129+
"default": false,
130+
"multivalued": false
131+
},
132+
{
133+
"name": "tfDynamicSceneLabels",
134+
"description": "Labels that are considered dynamic scenes. For dynamic scenes, TimeFrame annotations contains multiple representative points to follow any changes in the scene. Only applies when `useStitcher=true`",
135+
"type": "string",
136+
"default": [
137+
"credit",
138+
"credits"
139+
],
140+
"multivalued": true
141+
},
142+
{
143+
"name": "tfLabelMap",
144+
"description": "(See also `tfLabelMapPreset`, set `tfLabelMapPreset=nopreset` to make sure that a preset does not override `tfLabelMap` when using this) Mapping of a label in the input TimePoint annotations to a new label of the stitched TimeFrame annotations. Must be formatted as IN_LABEL:OUT_LABEL (with a colon). To pass multiple mappings, use this parameter multiple times. When two+ TP labels are mapped to a TF label, it essentially works as a \"binning\" operation. If no mapping is used, all the input labels are passed-through, meaning no change in both TP & TF labelsets. However, when at least one label is mapped, all the other \"unset\" labels are mapped to the negative label (`-`) and if `-` does not exist in the TF labelset, it is added automatically. Only applies when `useStitcher=true`.",
145+
"type": "map",
146+
"default": [],
147+
"multivalued": true
148+
},
149+
{
150+
"name": "tfLabelMapPreset",
151+
"description": "(See also `tfLabelMap`) Preset alias of a label mapping. If not `nopreset`, this parameter will override the `tfLabelMap` parameter. Available presets are:\n- `noprebin`: []\n- `nomap`: []\n- `strict`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron-person`', '`N`:`Chyron-person`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Main`', '`O`:`Opening`', '`W`:`Opening`', '`Y`:`Chyron-other`', '`U`:`Chyron-other`', '`K`:`Chyron-other`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']\n- `simpler`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron`', '`N`:`Chyron`', '`C`:`Credits`', '`R`:`Credits`']\n- `simple`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`I`:`Chyron-person`', '`N`:`Chyron-person`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Other-text`', '`O`:`Other-text`', '`W`:`Other-text`', '`Y`:`Other-text`', '`U`:`Other-text`', '`K`:`Other-text`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']\n- `relaxed`: ['`B`:`Bars`', '`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`', '`Y`:`Chyron`', '`U`:`Chyron`', '`K`:`Chyron`', '`I`:`Chyron`', '`N`:`Chyron`', '`C`:`Credits`', '`R`:`Credits`', '`M`:`Other-text`', '`O`:`Other-text`', '`W`:`Other-text`', '`L`:`Other-text`', '`G`:`Other-text`', '`F`:`Other-text`', '`E`:`Other-text`', '`T`:`Other-text`']\n- `binary-bars`: ['`B`:`Bars`']\n- `binary-slate`: ['`S`:`Slate`', '`S:H`:`Slate`', '`S:C`:`Slate`', '`S:D`:`Slate`', '`S:B`:`Slate`', '`S:G`:`Slate`']\n- `binary-chyron-strict`: ['`I`:`Chyron-person`', '`N`:`Chyron-person`']\n- `binary-chyron-relaxed`: ['`Y`:`Chyron`', '`U`:`Chyron`', '`K`:`Chyron`', '`I`:`Chyron`', '`N`:`Chyron`']\n- `binary-credits`: ['`C`:`Credits`', '`R`:`Credits`']\n\n Only applies when `useStitcher=true`.",
152+
"type": "string",
153+
"choices": [
154+
"noprebin",
155+
"nomap",
156+
"strict",
157+
"simpler",
158+
"simple",
159+
"relaxed",
160+
"binary-bars",
161+
"binary-slate",
162+
"binary-chyron-strict",
163+
"binary-chyron-relaxed",
164+
"binary-credits",
165+
"nopreset"
166+
],
167+
"default": "relaxed",
168+
"multivalued": false
169+
},
170+
{
171+
"name": "pretty",
172+
"description": "The JSON body of the HTTP response will be re-formatted with 2-space indentation",
173+
"type": "boolean",
174+
"default": false,
175+
"multivalued": false
176+
},
177+
{
178+
"name": "runningTime",
179+
"description": "The running time of the app will be recorded in the view metadata",
180+
"type": "boolean",
181+
"default": false,
182+
"multivalued": false
183+
},
184+
{
185+
"name": "hwFetch",
186+
"description": "The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata",
187+
"type": "boolean",
188+
"default": false,
189+
"multivalued": false
190+
}
191+
]
192+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"time": "2025-02-03T22:07:54+00:00",
3+
"submitter": "keighrim",
4+
"image": "ghcr.io/clamsproject/app-swt-detection:v7.4",
5+
"releasenotes": "fixed rare rounding error with certain combo of sample_rate and video duration\n\n"
6+
}

docs/_data/app-index.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"http://apps.clams.ai/swt-detection": {
33
"description": "Detects scenes with text, like slates, chyrons and credits.",
4-
"latest_update": "2025-01-28T00:35:32+00:00",
4+
"latest_update": "2025-02-03T22:07:54+00:00",
55
"versions": [
6+
[
7+
"v7.4",
8+
"keighrim"
9+
],
610
[
711
"v7.3",
812
"keighrim"

docs/_data/apps.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)