Skip to content

Incorrect Class and Concept list for imagenet #2

@raeudigerRaeffi

Description

@raeudigerRaeffi

Hi,

Thanks for open sourcing the code for your paper. I am working on a paper to mitigate Information Leakage and want to benchmark it using your concept annotated datasets. However I noticed that the files imagenet_per_class and imagenet_classes only contain 998 unique classes instead of the 1000 from imagenet. I was sofar unable to verify whether this extends to the provided concepts annotations aswell. To reproduce my findings you can run

`import json

with open(f"VLG-CBM/concept_files/imagenet_per_class.json") as f:
class_concept_data = json.load(f)

with open(f"VLG-CBM/concept_files/imagenet_classes.txt") as f:
classes = (f.read()).split('\n')

print(len(classes))
print(len(set(classes)))
print(len(class_concept_data))
test_counter = {}
for i in classes:
if i not in test_counter:
test_counter[i] = 0
else:
print(i)
`

Output:
1000
998
998
missile
sunglasses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions