视觉任务
训练用于图像分类、目标检测和视觉-语言任务的模型。图像分类
快速开始
Parameters
| Parameter | Description | Default |
|---|---|---|
--model | Base model | google/vit-base-patch16-224 |
--data-path | Path to image folder | None (required) |
--project-name | Output directory | project-name |
--image-column | Image column name | image |
--target-column | Label column name | target |
--epochs | Training epochs | 3 |
--batch-size | Batch size | 8 |
--lr | Learning rate | 5e-5 |
数据格式
文件夹结构:示例:自定义分类器
图像回归
用于从图像预测连续值。快速开始
Parameters
| Parameter | Description | Default |
|---|---|---|
--model | Base model | google/vit-base-patch16-224 |
--data-path | Path to data | None (required) |
--project-name | Output directory | project-name |
--image-column | Image column name | image |
--target-column | Target value column | target |
--epochs | Training epochs | 3 |
--batch-size | Batch size | 8 |
--lr | Learning rate | 5e-5 |
示例:年龄预测
目标检测
快速开始
数据格式
COCO 风格格式:Parameters
| Parameter | Description | Default |
|---|---|---|
--image-column | Image column | image |
--objects-column | Objects column | objects |
--image-square-size | Square size for images | 600 |
示例:自定义检测
视觉-语言模型(VLM)
训练能够理解图像和文本的模型。快速开始
数据格式
Parameters
| Parameter | Description | Default |
|---|---|---|
--model | Base model | google/paligemma-3b-pt-224 |
--image-column | Image column | image |
--text-column | Text/answer column | text |
--prompt-text-column | Prompt/prefix column | prompt |
--trainer | Training mode (vqa, captioning, segmentation, detection) | vqa |
--epochs | Training epochs | 3 |
--batch-size | Batch size | 2 |
--lr | Learning rate | 5e-5 |
--gradient-accumulation | Gradient accumulation steps | 4 |
--peft | Enable LoRA | False |
--lora-r | LoRA rank | 16 |
--lora-alpha | LoRA alpha | 32 |
示例:图像字幕
常用模型
图像分类
| Model | Parameters | Best For |
|---|---|---|
google/vit-base-patch16-224 | 86M | General purpose |
microsoft/resnet-50 | 25M | Fast inference |
facebook/convnext-base-224 | 89M | High accuracy |
目标检测
| Model | Parameters | Best For |
|---|---|---|
facebook/detr-resnet-50 | 41M | General detection |
facebook/detr-resnet-101 | 60M | Higher accuracy |
视觉-语言
| Model | Parameters | Best For |
|---|---|---|
Qwen/Qwen2-VL-2B-Instruct | 2B | Balanced |
llava-hf/llava-1.5-7b-hf | 7B | High quality |
GPU 内存提示
- 对于大图像使用较小的批次大小
- 为 VLM 启用梯度检查点
- 使用 LoRA 进行 VLM 训练: