Skip to content

Review Comment: Incorrect Ordering of Classes in food101_classes #17

@XingzhiZhou

Description

@XingzhiZhou

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions