From a3df90e12ee69b8fc44b1d673c7cc2227df739a3 Mon Sep 17 00:00:00 2001 From: Keigh Rim Date: Wed, 26 Jun 2024 09:31:35 -0400 Subject: [PATCH] this commit does two things 1. removes "subtyped" labels from model labelset (from final softmax space) 1. removes `:` characters from subtyped labels - they are NOT used at the moment, it's just a future-proof action (see https://github.com/clamsproject/clams-python/issues/197#issuecomment-2139245438) --- metadata.py | 4 ++-- modeling/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/metadata.py b/metadata.py index 5d8bfb6..58d8169 100644 --- a/metadata.py +++ b/metadata.py @@ -30,11 +30,11 @@ def appmetadata() -> AppMetadata: # which had default mappings for each model. labelMap = [ "B:bars", - "S:slate", "S-H:slate", "S-C:slate", "S-D:slate", "S-G:slate", + "S:slate", "W:other_opening", "L:other_opening", "O:other_opening", "M:other_opening", "I:chyron", "N:chyron", "Y:chyron", "C:credit", "R:credit", - "E:other_text", "K:other_text", "G:other_text", "T:other_text", "F:other_text" ] + "E:other_text", "K:other_text", "G:other_text", "T:other_text", "F:other_text"] metadata = AppMetadata( name="Scenes-with-text Detection", diff --git a/modeling/__init__.py b/modeling/__init__.py index 41c04a0..ca04cba 100644 --- a/modeling/__init__.py +++ b/modeling/__init__.py @@ -2,8 +2,10 @@ positive_label = 'POS' # full typology from https://github.com/clamsproject/app-swt-detection/issues/1 -FRAME_TYPES = ["B", "S", "S:H", "S:C", "S:D", "S:B", "S:G", "W", "L", "O", +FRAME_TYPES = ["B", "S", "W", "L", "O", "M", "I", "N", "E", "P", "Y", "K", "G", "T", "F", "C", "R"] +FRAME_TYPES_WITH_SUBTYPES = ["B", "SH", "SC", "SD", "SB", "SG", "W", "L", "O", + "M", "I", "N", "E", "P", "Y", "K", "G", "T", "F", "C", "R"] # These are time frames that are typically static (that is, the text does not # move around or change as with rolling credits). These are frame names after