Skip to content

Commit f2debeb

Browse files
authored
Merge pull request #163 from clamsproject/register/0-swt-detection.v5.1
App Submitted - swt-detection.v5.1
2 parents 7ae0c67 + 336e366 commit f2debeb

File tree

5 files changed

+340
-47
lines changed

5 files changed

+340
-47
lines changed
+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
layout: posts
3+
classes: wide
4+
title: "Scenes-with-text Detection (v5.1)"
5+
date: 2024-06-28T00:20:16+00:00
6+
---
7+
## About this version
8+
9+
- Submitter: [keighrim](https://github.com/keighrim)
10+
- Submission Time: 2024-06-28T00:20:16+00:00
11+
- Prebuilt Container Image: [ghcr.io/clamsproject/app-swt-detection:v5.1](https://github.com/clamsproject/app-swt-detection/pkgs/container/app-swt-detection/v5.1)
12+
- Release Notes
13+
14+
> Fixed [subtype-label bug](https://github.com/clamsproject/app-swt-detection/issues/102) and ...
15+
> - updating to clams-python 1.2.5,
16+
> - replaced cli.py with the one in the SDK to ensure consistency with other CLAMS apps
17+
> - added "full train" mode for trainer script to use all available data for training, without any validation at the train time
18+
> - refactor to declutter inter-dependency between app.py, Classifier, and Stitcher classes
19+
> - removed CLI in classifier.py, since app.py and cli.py can complete replace its functionality
20+
21+
## About this app (See raw [metadata.json](metadata.json))
22+
23+
**Detects scenes with text, like slates, chyrons and credits.**
24+
25+
- App ID: [http://apps.clams.ai/swt-detection/v5.1](http://apps.clams.ai/swt-detection/v5.1)
26+
- App License: Apache 2.0
27+
- 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/v5.1))
28+
29+
30+
#### Inputs
31+
(**Note**: "*" as a property value means that the property is required but can be any value.)
32+
33+
- [http://mmif.clams.ai/vocabulary/VideoDocument/v1](http://mmif.clams.ai/vocabulary/VideoDocument/v1) (required)
34+
(of any properties)
35+
36+
37+
38+
#### Configurable Parameters
39+
(**Note**: _Multivalued_ means the parameter can have one or more values.)
40+
41+
- `startAt`: optional, defaults to `0`
42+
43+
- Type: integer
44+
- Multivalued: False
45+
46+
47+
> Number of milliseconds into the video to start processing
48+
- `stopAt`: optional, defaults to `9223372036854775807`
49+
50+
- Type: integer
51+
- Multivalued: False
52+
53+
54+
> Number of milliseconds into the video to stop processing
55+
- `sampleRate`: optional, defaults to `1000`
56+
57+
- Type: integer
58+
- Multivalued: False
59+
60+
61+
> Milliseconds between sampled frames
62+
- `minFrameScore`: optional, defaults to `0.01`
63+
64+
- Type: number
65+
- Multivalued: False
66+
67+
68+
> Minimum score for a still frame to be included in a TimeFrame
69+
- `minTimeframeScore`: optional, defaults to `0.5`
70+
71+
- Type: number
72+
- Multivalued: False
73+
74+
75+
> Minimum score for a TimeFrame
76+
- `minFrameCount`: optional, defaults to `2`
77+
78+
- Type: integer
79+
- Multivalued: False
80+
81+
82+
> Minimum number of sampled frames required for a TimeFrame
83+
- `modelName`: optional, defaults to `20240626-205715.convnext_lg`
84+
85+
- Type: string
86+
- Multivalued: False
87+
- Choices: `20240626-205803.convnext_tiny`, **_`20240626-205715.convnext_lg`_**
88+
89+
90+
> model name to use for classification
91+
- `useStitcher`: optional, defaults to `true`
92+
93+
- Type: boolean
94+
- Multivalued: False
95+
- Choices: `false`, **_`true`_**
96+
97+
98+
> Use the stitcher after classifying the TimePoints
99+
- `allowOverlap`: optional, defaults to `true`
100+
101+
- Type: boolean
102+
- Multivalued: False
103+
- Choices: `false`, **_`true`_**
104+
105+
106+
> Allow overlapping time frames
107+
- `map`: optional, defaults to `['B:bars', 'S:slate', 'I:chyron', 'N:chyron', 'Y:chyron', 'C:credits', 'R:credits', 'W:other_opening', 'L:other_opening', 'O:other_opening', 'M:other_opening', 'E:other_text', 'K:other_text', 'G:other_text', 'T:other_text', 'F:other_text']`
108+
109+
- Type: map
110+
- Multivalued: True
111+
112+
113+
> Mapping of a label in the input annotations to a new label. Must be formatted as IN_LABEL:OUT_LABEL (with a colon). To pass multiple mappings, use this parameter multiple times. By default, all the input labels are passed as is, including any negative labels (with default value being no remapping at all). However, when at least one label is remapped, all the other "unset" labels are discarded as a negative label.
114+
- `pretty`: optional, defaults to `false`
115+
116+
- Type: boolean
117+
- Multivalued: False
118+
- Choices: **_`false`_**, `true`
119+
120+
121+
> The JSON body of the HTTP response will be re-formatted with 2-space indentation
122+
123+
124+
#### Outputs
125+
(**Note**: "*" as a property value means that the property is required but can be any value.)
126+
127+
(**Note**: Not all output annotations are always generated.)
128+
129+
- [http://mmif.clams.ai/vocabulary/TimeFrame/v5](http://mmif.clams.ai/vocabulary/TimeFrame/v5)
130+
- _timeUnit_ = "milliseconds"
131+
132+
- [http://mmif.clams.ai/vocabulary/TimePoint/v4](http://mmif.clams.ai/vocabulary/TimePoint/v4)
133+
- _timeUnit_ = "milliseconds"
134+
- _labelset_ = a list of ["B", "S", "W", "L", "O", "M", "I", "N", "E", "P", "Y", "K", "G", "T", "F", "C", "R"]
135+
+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"name": "Scenes-with-text Detection",
3+
"description": "Detects scenes with text, like slates, chyrons and credits.",
4+
"app_version": "v5.1",
5+
"mmif_version": "1.0.5",
6+
"app_license": "Apache 2.0",
7+
"identifier": "http://apps.clams.ai/swt-detection/v5.1",
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+
"W",
30+
"L",
31+
"O",
32+
"M",
33+
"I",
34+
"N",
35+
"E",
36+
"P",
37+
"Y",
38+
"K",
39+
"G",
40+
"T",
41+
"F",
42+
"C",
43+
"R"
44+
]
45+
}
46+
}
47+
],
48+
"parameters": [
49+
{
50+
"name": "startAt",
51+
"description": "Number of milliseconds into the video to start processing",
52+
"type": "integer",
53+
"default": 0,
54+
"multivalued": false
55+
},
56+
{
57+
"name": "stopAt",
58+
"description": "Number of milliseconds into the video to stop processing",
59+
"type": "integer",
60+
"default": 9223372036854775807,
61+
"multivalued": false
62+
},
63+
{
64+
"name": "sampleRate",
65+
"description": "Milliseconds between sampled frames",
66+
"type": "integer",
67+
"default": 1000,
68+
"multivalued": false
69+
},
70+
{
71+
"name": "minFrameScore",
72+
"description": "Minimum score for a still frame to be included in a TimeFrame",
73+
"type": "number",
74+
"default": 0.01,
75+
"multivalued": false
76+
},
77+
{
78+
"name": "minTimeframeScore",
79+
"description": "Minimum score for a TimeFrame",
80+
"type": "number",
81+
"default": 0.5,
82+
"multivalued": false
83+
},
84+
{
85+
"name": "minFrameCount",
86+
"description": "Minimum number of sampled frames required for a TimeFrame",
87+
"type": "integer",
88+
"default": 2,
89+
"multivalued": false
90+
},
91+
{
92+
"name": "modelName",
93+
"description": "model name to use for classification",
94+
"type": "string",
95+
"choices": [
96+
"20240626-205803.convnext_tiny",
97+
"20240626-205715.convnext_lg"
98+
],
99+
"default": "20240626-205715.convnext_lg",
100+
"multivalued": false
101+
},
102+
{
103+
"name": "useStitcher",
104+
"description": "Use the stitcher after classifying the TimePoints",
105+
"type": "boolean",
106+
"default": true,
107+
"multivalued": false
108+
},
109+
{
110+
"name": "allowOverlap",
111+
"description": "Allow overlapping time frames",
112+
"type": "boolean",
113+
"default": true,
114+
"multivalued": false
115+
},
116+
{
117+
"name": "map",
118+
"description": "Mapping of a label in the input annotations to a new label. Must be formatted as IN_LABEL:OUT_LABEL (with a colon). To pass multiple mappings, use this parameter multiple times. By default, all the input labels are passed as is, including any negative labels (with default value being no remapping at all). However, when at least one label is remapped, all the other \"unset\" labels are discarded as a negative label.",
119+
"type": "map",
120+
"default": [
121+
"B:bars",
122+
"S:slate",
123+
"I:chyron",
124+
"N:chyron",
125+
"Y:chyron",
126+
"C:credits",
127+
"R:credits",
128+
"W:other_opening",
129+
"L:other_opening",
130+
"O:other_opening",
131+
"M:other_opening",
132+
"E:other_text",
133+
"K:other_text",
134+
"G:other_text",
135+
"T:other_text",
136+
"F:other_text"
137+
],
138+
"multivalued": true
139+
},
140+
{
141+
"name": "pretty",
142+
"description": "The JSON body of the HTTP response will be re-formatted with 2-space indentation",
143+
"type": "boolean",
144+
"default": false,
145+
"multivalued": false
146+
}
147+
]
148+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"time": "2024-06-28T00:20:16+00:00",
3+
"submitter": "keighrim",
4+
"image": "ghcr.io/clamsproject/app-swt-detection:v5.1",
5+
"releasenotes": "Fixed [subtype-label bug](https://github.com/clamsproject/app-swt-detection/issues/102) and ...\n\n- updating to clams-python 1.2.5,\n- replaced cli.py with the one in the SDK to ensure consistency with other CLAMS apps\n- added \"full train\" mode for trainer script to use all available data for training, without any validation at the train time\n- refactor to declutter inter-dependency between app.py, Classifier, and Stitcher classes\n- removed CLI in classifier.py, since app.py and cli.py can complete replace its functionality\n\n"
6+
}

0 commit comments

Comments
 (0)