Skip to content

Commit c5fdbaa

Browse files
author
clams-bot
committed
adding metadata of simple-timepoints-stitcher.v3.0
1 parent 81b13a3 commit c5fdbaa

File tree

5 files changed

+285
-31
lines changed

5 files changed

+285
-31
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
layout: posts
3+
classes: wide
4+
title: "Simple Timepoints Stitcher (v3.0)"
5+
date: 2024-08-06T12:25:05+00:00
6+
---
7+
## About this version
8+
9+
- Submitter: [keighrim](https://github.com/keighrim)
10+
- Submission Time: 2024-08-06T12:25:05+00:00
11+
- Prebuilt Container Image: [ghcr.io/clamsproject/app-simple-timepoints-stitcher:v3.0](https://github.com/clamsproject/app-simple-timepoints-stitcher/pkgs/container/app-simple-timepoints-stitcher/v3.0)
12+
- Release Notes
13+
14+
> Now can filter overlapping time frames
15+
> - via `allowOverlap` parameter (default is true to keep the backward compatibility)
16+
> - the filtering algorithm (based on https://github.com/clamsproject/app-swt-detection/blob/5092274d1ead64f21e0e3c2bbb7aa3ad4db75cd4/modeling/stitch.py#L88-L104)
17+
> - sort collected positive TP sequences based on their mean scores, regardless of the labels
18+
> - loop through the sorted seqs, if a seq in the loop does not include any "seen" TP, mark the seq as "final" and mark all the underlying TPs as "seen", otherwise skip that one.
19+
> - return the "final" frames, re-sorted by the start TPs
20+
21+
## About this app (See raw [metadata.json](metadata.json))
22+
23+
**Stitches a sequence of `TimePoint` annotations into a sequence of `TimeFrame` annotations, performing simple smoothing of short peaks of positive labels.**
24+
25+
- App ID: [http://apps.clams.ai/simple-timepoints-stitcher/v3.0](http://apps.clams.ai/simple-timepoints-stitcher/v3.0)
26+
- App License: Apache 2.0
27+
- Source Repository: [https://github.com/clamsproject/app-simple-timepoints-stitcher](https://github.com/clamsproject/app-simple-timepoints-stitcher) ([source tree of the submitted version](https://github.com/clamsproject/app-simple-timepoints-stitcher/tree/v3.0))
28+
29+
30+
#### Inputs
31+
(**Note**: "*" as a property value means that the property is required but can be any value.)
32+
33+
One of the following is required: [
34+
- [http://mmif.clams.ai/vocabulary/AudioDocument/v1](http://mmif.clams.ai/vocabulary/AudioDocument/v1) (required)
35+
(of any properties)
36+
37+
- [http://mmif.clams.ai/vocabulary/VideoDocument/v1](http://mmif.clams.ai/vocabulary/VideoDocument/v1) (required)
38+
(of any properties)
39+
40+
41+
42+
]
43+
- [http://mmif.clams.ai/vocabulary/TimePoint/v4](http://mmif.clams.ai/vocabulary/TimePoint/v4) (required)
44+
- _timePoint_ = "*"
45+
- _classification_ = "*"
46+
47+
> TimePoint annotations to be stitched. Must be "exhaustive" in that it should cover an entire single time period in the input document, with a uniform sample rate.
48+
49+
50+
#### Configurable Parameters
51+
(**Note**: _Multivalued_ means the parameter can have one or more values.)
52+
53+
- `labelMap`: optional, defaults to `[]`
54+
55+
- Type: map
56+
- Multivalued: True
57+
58+
59+
> mapping of labels in the input annotations to new labels. 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 the negative label("-").
60+
- `minTFDuration`: optional, defaults to `1000`
61+
62+
- Type: integer
63+
- Multivalued: False
64+
65+
66+
> minimum duration of a TimeFrame in milliseconds
67+
- `minTPScore`: optional, defaults to `0.1`
68+
69+
- Type: number
70+
- Multivalued: False
71+
72+
73+
> minimum score of a TimePoint to be considered as positive
74+
- `minTFScore`: optional, defaults to `0.5`
75+
76+
- Type: number
77+
- Multivalued: False
78+
79+
80+
> minimum average score of TimePoints in a TimeFrame to be considered as positive
81+
- `labelMapPreset`: optional, defaults to `null`
82+
83+
- Type: string
84+
- Multivalued: False
85+
- Choices: **_`null`_**, `swt-v4-4way`, `swt-v4-6way`
86+
87+
88+
> preset of label mappings. If not `null`, this parameter will override the `labelMap` parameter. Available presets are:<br/>- `null`: `None`<br/>- `swt-v4-4way`: `['B:bars', 'S:slate', 'I:chyron', 'N:chyron', 'Y:chyron', 'C:credits', 'R:credits']`<br/>- `swt-v4-6way`: `['B:bars', 'S:slate', 'I:chyron', 'N:chyron', 'Y:chyron', 'C:credits', 'R:credits', 'E:other_text', 'K:other_text', 'G:other_text', 'T:other_text', 'F:other_text', 'W:other_opening', 'L:other_opening', 'O:other_opening', 'M:other_opening']`
89+
- `allowOverlap`: optional, defaults to `true`
90+
91+
- Type: boolean
92+
- Multivalued: False
93+
- Choices: `false`, **_`true`_**
94+
95+
96+
> Allow overlapping time frames
97+
- `pretty`: optional, defaults to `false`
98+
99+
- Type: boolean
100+
- Multivalued: False
101+
- Choices: **_`false`_**, `true`
102+
103+
104+
> The JSON body of the HTTP response will be re-formatted with 2-space indentation
105+
- `runningTime`: optional, defaults to `false`
106+
107+
- Type: boolean
108+
- Multivalued: False
109+
- Choices: **_`false`_**, `true`
110+
111+
112+
> The running time of the app will be recorded in the view metadata
113+
- `hwFetch`: optional, defaults to `false`
114+
115+
- Type: boolean
116+
- Multivalued: False
117+
- Choices: **_`false`_**, `true`
118+
119+
120+
> The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata
121+
122+
123+
#### Outputs
124+
(**Note**: "*" as a property value means that the property is required but can be any value.)
125+
126+
(**Note**: Not all output annotations are always generated.)
127+
128+
- [http://mmif.clams.ai/vocabulary/TimeFrame/v5](http://mmif.clams.ai/vocabulary/TimeFrame/v5)
129+
- _timeUnit_ = "milliseconds"
130+
- _label_ = "*"
131+
- _representatives_ = "*"
132+
133+
> Stitched TimeFrame annotations. Each TimeFrame annotation represents a continuous segment of timepoints and its `label` property is determined by the `labelMap` parameter (see `parameters` section). The `representatives` is a singleton list of the TimePoint annotation that has the highest score in the TimeFrame.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"name": "Simple Timepoints Stitcher",
3+
"description": "Stitches a sequence of `TimePoint` annotations into a sequence of `TimeFrame` annotations, performing simple smoothing of short peaks of positive labels.",
4+
"app_version": "v3.0",
5+
"mmif_version": "1.0.5",
6+
"app_license": "Apache 2.0",
7+
"identifier": "http://apps.clams.ai/simple-timepoints-stitcher/v3.0",
8+
"url": "https://github.com/clamsproject/app-simple-timepoints-stitcher",
9+
"input": [
10+
[
11+
{
12+
"@type": "http://mmif.clams.ai/vocabulary/AudioDocument/v1",
13+
"required": true
14+
},
15+
{
16+
"@type": "http://mmif.clams.ai/vocabulary/VideoDocument/v1",
17+
"required": true
18+
}
19+
],
20+
{
21+
"@type": "http://mmif.clams.ai/vocabulary/TimePoint/v4",
22+
"description": "TimePoint annotations to be stitched. Must be \"exhaustive\" in that it should cover an entire single time period in the input document, with a uniform sample rate.",
23+
"properties": {
24+
"timePoint": "*",
25+
"classification": "*"
26+
},
27+
"required": true
28+
}
29+
],
30+
"output": [
31+
{
32+
"@type": "http://mmif.clams.ai/vocabulary/TimeFrame/v5",
33+
"description": "Stitched TimeFrame annotations. Each TimeFrame annotation represents a continuous segment of timepoints and its `label` property is determined by the `labelMap` parameter (see `parameters` section). The `representatives` is a singleton list of the TimePoint annotation that has the highest score in the TimeFrame.",
34+
"properties": {
35+
"timeUnit": "milliseconds",
36+
"label": "*",
37+
"representatives": "*"
38+
}
39+
}
40+
],
41+
"parameters": [
42+
{
43+
"name": "labelMap",
44+
"description": "mapping of labels in the input annotations to new labels. 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 the negative label(\"-\").",
45+
"type": "map",
46+
"default": [],
47+
"multivalued": true
48+
},
49+
{
50+
"name": "minTFDuration",
51+
"description": "minimum duration of a TimeFrame in milliseconds",
52+
"type": "integer",
53+
"default": 1000,
54+
"multivalued": false
55+
},
56+
{
57+
"name": "minTPScore",
58+
"description": "minimum score of a TimePoint to be considered as positive",
59+
"type": "number",
60+
"default": 0.1,
61+
"multivalued": false
62+
},
63+
{
64+
"name": "minTFScore",
65+
"description": "minimum average score of TimePoints in a TimeFrame to be considered as positive",
66+
"type": "number",
67+
"default": 0.5,
68+
"multivalued": false
69+
},
70+
{
71+
"name": "labelMapPreset",
72+
"description": "preset of label mappings. If not `null`, this parameter will override the `labelMap` parameter. Available presets are:\n- `null`: `None`\n- `swt-v4-4way`: `['B:bars', 'S:slate', 'I:chyron', 'N:chyron', 'Y:chyron', 'C:credits', 'R:credits']`\n- `swt-v4-6way`: `['B:bars', 'S:slate', 'I:chyron', 'N:chyron', 'Y:chyron', 'C:credits', 'R:credits', 'E:other_text', 'K:other_text', 'G:other_text', 'T:other_text', 'F:other_text', 'W:other_opening', 'L:other_opening', 'O:other_opening', 'M:other_opening']`",
73+
"type": "string",
74+
"choices": [
75+
"null",
76+
"swt-v4-4way",
77+
"swt-v4-6way"
78+
],
79+
"default": "null",
80+
"multivalued": false
81+
},
82+
{
83+
"name": "allowOverlap",
84+
"description": "Allow overlapping time frames",
85+
"type": "boolean",
86+
"default": true,
87+
"multivalued": false
88+
},
89+
{
90+
"name": "pretty",
91+
"description": "The JSON body of the HTTP response will be re-formatted with 2-space indentation",
92+
"type": "boolean",
93+
"default": false,
94+
"multivalued": false
95+
},
96+
{
97+
"name": "runningTime",
98+
"description": "The running time of the app will be recorded in the view metadata",
99+
"type": "boolean",
100+
"default": false,
101+
"multivalued": false
102+
},
103+
{
104+
"name": "hwFetch",
105+
"description": "The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata",
106+
"type": "boolean",
107+
"default": false,
108+
"multivalued": false
109+
}
110+
]
111+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"time": "2024-08-06T12:25:05+00:00",
3+
"submitter": "keighrim",
4+
"image": "ghcr.io/clamsproject/app-simple-timepoints-stitcher:v3.0",
5+
"releasenotes": "Now can filter overlapping time frames\n\n- via `allowOverlap` parameter (default is true to keep the backward compatibility)\n- the filtering algorithm (based on https://github.com/clamsproject/app-swt-detection/blob/5092274d1ead64f21e0e3c2bbb7aa3ad4db75cd4/modeling/stitch.py#L88-L104)\n - sort collected positive TP sequences based on their mean scores, regardless of the labels\n - loop through the sorted seqs, if a seq in the loop does not include any \"seen\" TP, mark the seq as \"final\" and mark all the underlying TPs as \"seen\", otherwise skip that one.\n - return the \"final\" frames, re-sorted by the start TPs\n\n"
6+
}

docs/_data/app-index.json

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
{
2+
"http://apps.clams.ai/simple-timepoints-stitcher": {
3+
"description": "Stitches a sequence of `TimePoint` annotations into a sequence of `TimeFrame` annotations, performing simple smoothing of short peaks of positive labels.",
4+
"latest_update": "2024-08-06T12:25:05+00:00",
5+
"versions": [
6+
[
7+
"v3.0",
8+
"keighrim"
9+
],
10+
[
11+
"v2.1",
12+
"keighrim"
13+
],
14+
[
15+
"v2.0",
16+
"keighrim"
17+
],
18+
[
19+
"v1.3",
20+
"keighrim"
21+
],
22+
[
23+
"v1.2",
24+
"keighrim"
25+
],
26+
[
27+
"v1.1",
28+
"keighrim"
29+
],
30+
[
31+
"v1.0",
32+
"keighrim"
33+
]
34+
]
35+
},
236
"http://apps.clams.ai/swt-detection": {
337
"description": "Detects scenes with text, like slates, chyrons and credits.",
438
"latest_update": "2024-07-30T01:06:00+00:00",
@@ -151,36 +185,6 @@
151185
]
152186
]
153187
},
154-
"http://apps.clams.ai/simple-timepoints-stitcher": {
155-
"description": "Stitches a sequence of `TimePoint` annotations into a sequence of `TimeFrame` annotations, performing simple smoothing of short peaks of positive labels.",
156-
"latest_update": "2024-06-26T14:40:00+00:00",
157-
"versions": [
158-
[
159-
"v2.1",
160-
"keighrim"
161-
],
162-
[
163-
"v2.0",
164-
"keighrim"
165-
],
166-
[
167-
"v1.3",
168-
"keighrim"
169-
],
170-
[
171-
"v1.2",
172-
"keighrim"
173-
],
174-
[
175-
"v1.1",
176-
"keighrim"
177-
],
178-
[
179-
"v1.0",
180-
"keighrim"
181-
]
182-
]
183-
},
184188
"http://apps.clams.ai/east-textdetection": {
185189
"description": "OpenCV-based text localization app that used EAST text detection model. Please visit the source code repository for full documentation.",
186190
"latest_update": "2024-06-24T13:52:29+00:00",

docs/_data/apps.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)