Outputs
The example maps A to single-dish and B to multi-dish, and retains the raw model text. A response that does not start with either letter is reported as unknown.
Use
Run from this directory. The script loads the required Qwen base model and this PEFT LoRA adapter.
python -m pip install -r requirements.txtpython infer.py --image /path/to/food_crop.jpg --device cuda:0
CUDA inference uses one GPU in BF16. For CPU inference, use --device cpu (float32; more RAM required). Training photos are not included.
Project
Automating Dish-Level Annotation of Real Food-Diary Photos
License
Adapter weights and inference code: Apache-2.0. The Qwen base model is separately distributed under Apache-2.0.