Overview:
This document explains how to perform image classification using the Vit_B_Classification model in SambaStudio. Image classification is the process of assigning labels to images from a set of predefined classes.
Data Preparation:
To train a classification model, you need:
- Images:
- Supported formats: .jpg, .png
- Must be 3-channel RGB encoded as uint8
- Images with an alpha channel must have the alpha removed during preprocessing
-
labels.csv:
- A CSV file mapping image paths to class labels and splits.
-
class_to_idx.json (optional):
-
Maps readable class names to numerical indices
{code:json}
{
"cat": 0,
"dog": 1
}
{code}
Using SambaStudio:
- Log in to your on-prem SambaStudio instance
- Create a new project and choose Vit_B_Classification
- Upload your dataset (including labels.csv and optionally class_to_idx.json)
- Train, validate, and evaluate your model
Tips & Troubleshooting:
- Ensure all images are RGB and correctly formatted
- Double-check paths in labels.csv
- Use consistent class labels and file naming
Note - “This requires a purchased on-prem subscription to SambaNova Suite”