Skip to content

Commit

Permalink
add scialom ImageNet mapping labels (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlonnqvist authored May 8, 2024
1 parent fd1ee35 commit 16a4842
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions brainscore_vision/model_helpers/brain_transformation/behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,25 @@ class LabelToImagenetIndices:
motorbike_indices = [670, 665]
bus_indices = [779, 874, 654]

# added from the Scialom2024 benchmark:
banana_indices = [954]
beanie_indices = [439, 452, 515, 808]
binoculars_indices = [447]
boot_indices = [514]
bowl_indices = [659, 809]
cup_indices = [968]
glasses_indices = [837]
lamp_indices = [470, 607, 818, 846]
pan_indices = [567]
sewingmachine_indices = [786]
shovel_indices = [792]
# truck indices used as defined by Geirhos et al., 2021.

@classmethod
def label_to_indices(cls, label):
# for handling multi-word labels given by models or benchmarks
label = label.lower().replace(" ", "")

synset_indices = getattr(cls, f"{label}_indices")
return synset_indices

Expand Down

0 comments on commit 16a4842

Please sign in to comment.