Calculate the SPICE score for evaluating semantic content in image captions.
SPICE (Semantic Propositional Image Caption Evaluation) evaluates caption quality by parsing both candidate and reference captions into scene graphs (objects, attributes, relations), then computing F1 over matched tuples. Unlike n-gram metrics, SPICE directly evaluates semantic content regardless of wording.
SPICE
SPICE = F1(matched_tuples, candidate_tuples, reference_tuples)
CIDEr uses TF-IDF n-gram overlap (lexical matching), while SPICE parses captions into semantic scene graphs and matches meaning directly. SPICE better captures whether the caption correctly describes objects, attributes, and their relationships.
Scene graph tuples represent semantic content: objects ('dog', 'ball'), attributes ('red', 'large'), and relations ('chasing', 'on top of'). They're extracted by parsing captions using dependency parsing and semantic role labeling.