Scenes-with-text Detection (v7.1)
About this version
- Submitter: keighrim
- Submission Time: 2024-12-02T17:48:12+00:00
- Prebuilt Container Image: ghcr.io/clamsproject/app-swt-detection:v7.1
-
Release Notes
Release with newly trained models:
- training data is expanded with new annotations: https://github.com/clamsproject/aapb-annotations/pull/98 and https://github.com/clamsproject/aapb-annotations/pull/104 .
- label
Uis added, total number of βrawβ labels is now 18. - in additional to
convnext_lgandconvnext_tiny,convnext_small-based models are added. The default is nowconvnext_smallmodel.
About this app (See raw metadata.json)
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.
- App ID: http://apps.clams.ai/swt-detection/v7.1
- App License: Apache 2.0
- Source Repository: https://github.com/clamsproject/app-swt-detection (source tree of the submitted version)
Inputs
(Note: β*β as a property value means that the property is required but can be any value.)
- http://mmif.clams.ai/vocabulary/VideoDocument/v1 (required) (of any properties)
Configurable Parameters
(Note: Multivalued means the parameter can have one or more values.)
-
useClassifier: optional, defaults totrue- Type: boolean
- Multivalued: False
- Choices:
false,true
Use the image classifier model to generate TimePoint annotations.
-
tpModelName: optional, defaults toconvnext_small- Type: string
- Multivalued: False
- Choices:
convnext_lg,convnext_tiny,convnext_small
Model name to use for classification, only applies when
useClassifier=true. -
tpUsePosModel: optional, defaults totrue- Type: boolean
- Multivalued: False
- Choices:
false,true
Use the model trained with positional features, only applies when
useClassifier=true. -
tpStartAt: optional, defaults to0- Type: integer
- Multivalued: False
Number of milliseconds into the video to start processing, only applies when
useClassifier=true. -
tpStopAt: optional, defaults to9223372036854775807- Type: integer
- Multivalued: False
Number of milliseconds into the video to stop processing, only applies when
useClassifier=true. -
tpSampleRate: optional, defaults to1000- Type: integer
- Multivalued: False
Milliseconds between sampled frames, only applies when
useClassifier=true. -
useStitcher: optional, defaults totrue- Type: boolean
- Multivalued: False
- Choices:
false,true
Use the stitcher after classifying the TimePoints.
-
tfMinTPScore: optional, defaults to0.5- Type: number
- Multivalued: False
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. -
tfMinTFScore: optional, defaults to0.9- Type: number
- Multivalued: False
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 -
tfMinTFDuration: optional, defaults to5000- Type: integer
- Multivalued: False
Minimum duration of a TimeFrame in milliseconds, only applies when
useStitcher=true. -
tfAllowOverlap: optional, defaults tofalse- Type: boolean
- Multivalued: False
- Choices:
false,true
Allow overlapping time frames, only applies when
useStitcher=true -
tfDynamicSceneLabels: optional, defaults to['credit', 'credits']- Type: string
- Multivalued: True
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 -
tfLabelMap: optional, defaults to[]- Type: map
- Multivalued: True
(See also
tfLabelMapPreset, settfLabelMapPreset=nopresetto make sure that a preset does not overridetfLabelMapwhen 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 whenuseStitcher=true. -
tfLabelMapPreset: optional, defaults torelaxed- Type: string
- Multivalued: False
- Choices:
noprebin,nomap,strict,simpler,simple,relaxed,binary-bars,binary-slate,binary-chyron-strict,binary-chyron-relaxed,binary-credits
(See also
tfLabelMap) Preset alias of a label mapping. If notnopreset, this parameter will override thetfLabelMapparameter. Available presets are:
-noprebin: []
-nomap: []
-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β]
-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β]
-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β]
-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β]
-binary-bars: [βB:Barsβ]
-binary-slate: [βS:Slateβ, βS:H:Slateβ, βS:C:Slateβ, βS:D:Slateβ, βS:B:Slateβ, βS:G:Slateβ]
-binary-chyron-strict: [βI:Chyron-personβ, βN:Chyron-personβ]
-binary-chyron-relaxed: [βY:Chyronβ, βU:Chyronβ, βK:Chyronβ, βI:Chyronβ, βN:Chyronβ]
-binary-credits: [βC:Creditsβ, βR:Creditsβ]
Only applies whenuseStitcher=true. -
pretty: optional, defaults tofalse- Type: boolean
- Multivalued: False
- Choices:
false,true
The JSON body of the HTTP response will be re-formatted with 2-space indentation
-
runningTime: optional, defaults tofalse- Type: boolean
- Multivalued: False
- Choices:
false,true
The running time of the app will be recorded in the view metadata
-
hwFetch: optional, defaults tofalse- Type: boolean
- Multivalued: False
- Choices:
false,true
The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata
Outputs
(Note: β*β as a property value means that the property is required but can be any value.)
(Note: Not all output annotations are always generated.)
- http://mmif.clams.ai/vocabulary/TimeFrame/v5
- timeUnit = βmillisecondsβ
- http://mmif.clams.ai/vocabulary/TimePoint/v4
- timeUnit = βmillisecondsβ
- labelset = a list of [βBβ, βSβ, βIβ, βCβ, βRβ, βMβ, βOβ, βWβ, βNβ, βYβ, βUβ, βKβ, βLβ, βGβ, βFβ, βEβ, βTβ, βPβ]