Vision Tasks
Train models for image classification, object detection, and vision-language tasks.Image Classification
Quick Start
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 |
Data Format
Folder structure:Example: Custom Classifier
Image Regression
For predicting continuous values from images.Quick Start
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 |
Example: Age Prediction
Object Detection
Quick Start
Data Format
COCO-style format:Parameters
| Parameter | Description | Default |
|---|---|---|
--image-column | Image column | image |
--objects-column | Objects column | objects |
--image-square-size | Square size for images | 600 |
Example: Custom Detection
Vision-Language Models (VLM)
Train models that understand both images and text.Quick Start
Data Format
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 |
Example: Image Captioning
Common Models
Image Classification
| 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 |
Object Detection
| Model | Parameters | Best For |
|---|---|---|
facebook/detr-resnet-50 | 41M | General detection |
facebook/detr-resnet-101 | 60M | Higher accuracy |
Vision-Language
| Model | Parameters | Best For |
|---|---|---|
Qwen/Qwen2-VL-2B-Instruct | 2B | Balanced |
llava-hf/llava-1.5-7b-hf | 7B | High quality |
GPU Memory Tips
- Use smaller batch sizes for large images
- Enable gradient checkpointing for VLMs
- Use LoRA for VLM training: