Skip to content

Classification Mode

In classification mode, the model assigns one label to an entire image. The label identifies the main object or scene, allowing the model to group images by their content.

Dataset Creation

To create a classification dataset, place the images in separate folders. Each folder name is a class label.

For example, if you are building a material classification dataset, you might create folders such as wool, cotton, and silk, and place the corresponding images inside each folder.

The dataset structure should look like this:

DatasetName/
│
├── wool/
│   ├── img1.jpg
│   ├── img2.jpg
│
├── cotton/
│   ├── img3.jpg
│   ├── img4.jpg
│
└── silk/
    ├── img5.jpg
    └── img6.jpg

If no train/validation split is provided, the platform will automatically split the dataset into 70% training and 30% validation samples.

Providing a Pre-Split Dataset

If you prefer to define the training and validation sets yourself, organize the dataset using separate train and val directories:

DatasetName/
│
├── train/
│   ├── wool/
│   │   ├── img1.jpg
│   │   └── img2.jpg
│   │
│   ├── cotton/
│   │   ├── img3.jpg
│   │   └── img4.jpg
│   │
│   └── silk/
│       ├── img5.jpg
│       └── img6.jpg
│
└── val/
    ├── wool/
    │   ├── img7.jpg
    │   └── img8.jpg
    │
    ├── cotton/
    │   ├── img9.jpg
    │   └── img10.jpg
    │
    └── silk/
        ├── img11.jpg
        └── img12.jpg

Annotation Process

Once the dataset is organized, compress it into a .zip file and upload it to the platform. The platform reads the folder structure to register the dataset.

After the upload, the dataset appears on the Collections page with its image count.

Training Initiation

After uploading the dataset, you can train a classification model. Follow these steps:

  1. Navigate to the Train an ML model page.
  2. Select the Classification mode.

There are two main fields that need to be filled:

  • Select Model: Choose the model architecture you want to use for training.
  • Select Collection: Choose the dataset to use for training.

To learn about the available architectures, expand Available models. Use a model's information icon to read its description.

Inference Process

Once the model is trained, you can use it for inference on new images. To perform inference, follow these steps:

  1. Navigate to the Inference page.
  2. Select a trained classification model from the list.
  3. Upload the image you want to perform inference on.
  4. Click Start Inference to see the classification result.

When inference finishes, the same page shows the original image, predicted class, and confidence score.

CVAT

Evaluation Metric

Accuracy measures how often the model assigns the correct class. For each sample, the predicted class is compared with its true class. The number of correct predictions is then divided by the total number of samples, giving the proportion classified correctly.