The official repository of Res-VMamba: Fine-Grained Food Category Visual Classification Using Selective State Space Models with Deep Residual Learning , the most part of code is modified from VMamba .
Please follw the installation flow on VMamba.
The Res-VMamba model best weight with VMamba-S as backbone trained on CNFOOD-241-Chen (CNFOOD-241 dataset with the random split in the paper) can be available on the HuggingFace .
The downloaded weight need to put under the folder path:
./ResVMamba/pretrained_model/vssm_small/default/ckpt_epoch_166.pth
For has only 1 GPU card:
python3 -m torch.distributed.launch --nnodes=1 --node_rank=0 --nproc_per_node=1 --master_addr="127.0.0.1" --master_port=29501 main.py --cfg configs/vssm/vssm_small_224.yaml --batch-size 16 --data-path <Your_data_path>/food_data/CNFOOD-241 --output ./ResVMamba/pretrained_model
The image list can be found in CNFOOD241_data_split
folder.
The original CNFOOD-241 data: https://data.mendeley.com/datasets/fspyss5zbb/1
Hope this code is helpful. I would appreciate you citing us in your paper. 😊
@article{chen2024res,
title={Res-vmamba: Fine-grained food category visual classification using selective state space models with deep residual learning},
author={Chen, Chi-Sheng and Chen, Guan-Ying and Zhou, Dong and Jiang, Di and Chen, Dai-Shi},
journal={arXiv preprint arXiv:2402.15761},
year={2024}
}