SPICE Score Calculator
Calculate the SPICE score for evaluating semantic content in image captions.
Inputs
SPICE Score
0.7273
Precision
0.8000
Recall
0.6667
Step by step
Precision: matched ÷ candidate tuples
12 ÷ 15
= 0.8000
Recall: matched ÷ reference tuples
12 ÷ 18
= 0.6667
SPICE (F1): 2PR/(P+R)
2×0.8000×0.6667/(0.8000+0.6667)
= 0.727273
How it works
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.
Formula
SPICE
SPICE = F1(matched_tuples, candidate_tuples, reference_tuples)
- tuples
- Scene graph tuples: (object, attribute) or (subject, relation, object)
Frequently Asked Questions
How does SPICE differ from CIDEr?
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.
What are scene graph tuples?
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.