|
| 1 | +--- |
| 2 | +layout: posts |
| 3 | +classes: wide |
| 4 | +title: "Scenes-with-text Detection (v7.3)" |
| 5 | +date: 2025-01-28T00:35:32+00:00 |
| 6 | +--- |
| 7 | +## About this version |
| 8 | + |
| 9 | +- Submitter: [keighrim](https://github.com/keighrim) |
| 10 | +- Submission Time: 2025-01-28T00:35:32+00:00 |
| 11 | +- Prebuilt Container Image: [ghcr.io/clamsproject/app-swt-detection:v7.3](https://github.com/clamsproject/app-swt-detection/pkgs/container/app-swt-detection/v7.3) |
| 12 | +- Release Notes |
| 13 | + |
| 14 | + > minor bugfix in the second (`TimeFrame`) view metadata. |
| 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.3](http://apps.clams.ai/swt-detection/v7.3) |
| 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.3)) |
| 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_lg`, `convnext_tiny`, **_`convnext_small`_** |
| 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 | + |
0 commit comments