Robust fine-grained food classification using a synergistic attention framework
摘要
Automated dish classification is crucial for the standardization of the catering industry, but it faces challenges such as small inter-class differences, large intra-class differences, and complex background interference. To address this, this paper proposes a new model, FEM-Swin. This model aims to systematically solve the dual problem of "first locate, then discriminate": it uses Focal Modulation to replace self-attention to robustly locate the target in complex scenes, and then embeds a multi-scale attention module to perform fine-grained discrimination on the target. On the public complex-scene dataset cnfood241, this model's accuracy improved by 2.34% and mAP improved by 2.93%, significantly outperforming the baseline. On a self-built simple-scene dataset, the accuracy was as high as 94.04%, validating its strong generalization ability. Overall, this study provides an efficient and accurate technical solution for automated dish classification.
Graphical AbstractThe proposed FEM-Swin framework follows a"Localize then Discriminate" paradigm. (Left) Complex food images enter the network. (Middle-Left) The Focal Modulation backbone utilizes a gated aggregation mechanism to filter out background clutter, robustly localizing the dish (visualized by the heatmap). (Middle-Right) The EMA Module operates on the localized features without channel dimensionality reduction, preserving critical high-frequency textural details. (Right) The synergistic framework achieves accuracy (75.51%) and real-time inference speed