{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/res-vmamba-fine-grained-food-category-visual","title":"Res-VMamba: Fine-Grained Food Category Visual Classification Using Selective State Space Models with Deep Residual Learning","arxiv_id":"2402.15761","date":"2024-02-24","proceeding":null,"authors":["Chi-Sheng Chen","Guan-Ying Chen","Dong Zhou","Di Jiang","Dai-Shi Chen"],"abstract":"Food classification is the foundation for developing food vision tasks and plays a key role in the burgeoning field of computational nutrition. Due to the complexity of food requiring fine-grained classification, recent academic research mainly modifies Convolutional Neural Networks (CNNs) and/or Vision Transformers (ViTs) to perform food category classification. However, to learn fine-grained features, the CNN backbone needs additional structural design, whereas ViT, containing the self-attention module, has increased computational complexity. In recent months, a new Sequence State Space (S4) model, through a Selection mechanism and computation with a Scan (S6), colloquially termed Mamba, has demonstrated superior performance and computation efficiency compared to the Transformer architecture. The VMamba model, which incorporates the Mamba mechanism into image tasks (such as classification), currently establishes the state-of-the-art (SOTA) on the ImageNet dataset. In this research, we introduce an academically underestimated food dataset CNFOOD-241, and pioneer the integration of a residual learning framework within the VMamba model to concurrently harness both global and local state features inherent in the original VMamba architectural design. The research results show that VMamba surpasses current SOTA models in fine-grained and food classification. The proposed Res-VMamba further improves the classification accuracy to 79.54\\% without pretrained weight. Our findings elucidate that our proposed methodology establishes a new benchmark for SOTA performance in food recognition on the CNFOOD-241 dataset. The code can be obtained on GitHub: https://github.com/ChiShengChen/ResVMamba.","url_abs":"https://arxiv.org/abs/2402.15761v3","url_pdf":"https://arxiv.org/pdf/2402.15761v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"res-vmamba-fine-grained-food-category-visual","repo_url":"https://github.com/chishengchen/resvmamba","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"fine-grained-image-recognition","task_name":"Fine-Grained Image Recognition"},{"task_slug":"food-recognition","task_name":"Food Recognition"},{"task_slug":"mamba","task_name":"Mamba"},{"task_slug":"nutrition","task_name":"Nutrition"},{"task_slug":"state-space-models","task_name":"State Space Models"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[{"slug":"cnfood-241-chen","name":"CNFOOD-241-Chen","full_name":"CNFOOD-241-Chen"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/fine-grained-image-recognition-on-cnfood-241","task":"Fine-Grained Image Recognition","dataset":"CNFOOD-241-Chen","model":"Res-VMamba-S","rank_in_archive_order":1,"of":2,"metrics":{"Top-1 accuracy":"79.54"},"uses_additional_data":false},{"leaderboard":"/sota/fine-grained-image-recognition-on-cnfood-241","task":"Fine-Grained Image Recognition","dataset":"CNFOOD-241-Chen","model":"VMamba-S","rank_in_archive_order":2,"of":2,"metrics":{"Top-1 accuracy":"79.17"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.15761","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.15761"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chishengchen/resvmamba","reach":null}],"summary":{"ran_honours":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":3,"samples":[{"code_sha256_prefix":"9349a926c58456ec","entry":"flops_selective_scan_fn","repo":"chishengchen/resvmamba","repo_kind":"official","path":"models/resvmamba.py","file_url":"https://github.com/chishengchen/resvmamba/blob/HEAD/models/resvmamba.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9349a926c58456ec"}},{"code_sha256_prefix":"91788abc3267bdda","entry":"flops_selective_scan_ref","repo":"chishengchen/resvmamba","repo_kind":"official","path":"models/resvmamba.py","file_url":"https://github.com/chishengchen/resvmamba/blob/HEAD/models/resvmamba.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"91788abc3267bdda"}},{"code_sha256_prefix":"f2c7f2bf0a898fcd","entry":"selective_scan_flop_jit","repo":"chishengchen/resvmamba","repo_kind":"official","path":"models/resvmamba.py","file_url":"https://github.com/chishengchen/resvmamba/blob/HEAD/models/resvmamba.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f2c7f2bf0a898fcd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}