FOOD SCIENCE ›› 2024, Vol. 45 ›› Issue (10): 1-8.doi: 10.7506/spkx1002-6630-20231231-270

• Machine Learning •     Next Articles

Hash Food Image Retrieval Based on Enhanced Vision Transformer

CAO Pindan, MIN Weiqing, SONG Jiajun, SHENG Guorui, YANG Yancun, WANG Lili, JIANG Shuqiang   

  1. (1. School of Information and Electrical Engineering, Ludong University, Yantai 264025, China;2. Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China;3. School of Agricultural Economics and Rural Development, Renmin University of China, Beijing 100872, China)
  • Online:2024-05-25 Published:2024-06-08

Abstract: Food image retrieval, a major task in food computing, has garnered extensive attention in recent years. However, it faces two primary challenges. First, food images exhibit fine-grained characteristics, implying that visual differences between different food categories may be subtle and often can only be observable in local regions of the image. Second, food images contain abundant semantic information, such as ingredients and cooking methods, whose extraction and utilization are crucial for enhancing the retrieval performance. To address these issues, this paper proposes an enhanced ViT hash network (EVHNet) based on a pre-trained Vision Transformer (ViT) model. Given the fine-grained nature of food images, a local feature enhancement module enabling the network to learn more representative features was designed in EVHNet based on convolutional structure. To better leverage the semantic information in food images, an aggregated semantic feature module aggregating the information based on class token features was designed in EVHNet. The proposed EVHNet model was evaluated under three popular hash image retrieval frameworks, namely greedy hash (GreedyHash), central similarity quantization (CSQ), and deep polarized network (DPN), and compared with four mainstream network models, AlexNet, ResNet50, ViT-B_32, and ViT-B_16. Experimental results on the Food-101, Vireo Food-172, and UEC Food-256 food datasets demonstrated that the EVHNet model outperformed other models in terms of comprehensive retrieval accuracy.

Key words: food image retrieval; food computing; hash retrieval; Vision Transformer network; deep hash learning

CLC Number: