Skip to content

Review Comment: Incorrect Ordering of Classes in food101_classes #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
XingzhiZhou opened this issue Oct 26, 2024 · 0 comments
Open

Comments

@XingzhiZhou
Copy link

Review Comment: Incorrect Ordering of Classes in food101_classes


File: data/cls_to_names.py

Issue:
Within the food101_classes list, the entries for "cheesecake" and "cheese_plate" are mistakenly ordered. Currently, "cheesecake" precedes "cheese_plate".

Impact:
This misordering affects the alignment of class labels, leading to a decrease in model performance. Specifically, adjusting the order to place "cheese_plate" before "cheesecake" results in an improvement of the zero-shot accuracy for CLIP (ViT-B/16) from 83.67% to 85.27%.

Recommendation:
Reorder the food101_classes list to ensure that "cheese_plate" comes before "cheesecake". This adjustment will correct the class alignment and enhance the model's accuracy.

Proposed Change:

# Current ordering
food101_classes = [
    ...
    "cheesecake",
    "cheese_plate",
    ...
]

# Corrected ordering
food101_classes = [
    ...
    "cheese_plate",
    "cheesecake",
    ...
]

Rationale:
Proper class ordering is crucial for accurate label mapping, especially in zero-shot learning scenarios. By ensuring that each class is correctly positioned, the model can better associate inputs with their corresponding labels, thereby improving overall performance.


Please implement this change to enhance the accuracy of the CLIP model in your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant