concepts.benchmark.clevr.dataset.annotate_scene#

annotate_scene(scene)[source]#

Annotate the scene with the attribute and relational concepts. This function will add the following fields to the scene annotations:

  • attribute_{attr_name}: the attribute concept id for each object.

  • attribute_relation_{attr_name}: the attribute relation concept id for each pair of objects.

  • relation_{attr_name}: the relational concept id for each pair of objects.

Parameters:

scene (dict) – the scene annotations.

Returns:

a dict of annotations of the attributes and relations.

Return type:

dict