modelscope / ms-swift

Use PEFT or Full-parameter to finetune 350+ LLMs or 100+ MLLMs. (LLM: Qwen2.5, Llama3.2, GLM4, Internlm2.5, Yi1.5, Mistral, Baichuan2, DeepSeek, Gemma2, ...; MLLM: Qwen2-VL, Qwen2-Audio, Llama3.2-Vision, Llava, InternVL2, MiniCPM-V-2.6, GLM4v, Xcomposer2.5, Yi-VL, DeepSeek-VL, Phi3.5-Vision, ...)
https://swift.readthedocs.io/zh-cn/latest/Instruction/index.html
Apache License 2.0
4.01k stars 355 forks source link

Customized Image Data Augmentation #2345

Open Li-Jicheng opened 2 days ago

Li-Jicheng commented 2 days ago

你好,我想在data loading 阶段加一些图像增强方法,可能是torch本身支持的比如crop,flip这种,也有自己想定义的。请问我要再哪里添加修改呢?谢谢

Jintao-Huang commented 2 days ago

可以在template._encode的时候进行图像增强