2026-02-09 12:50:10 +05:30

970 B

Dataset Structure Guide

This folder contains the structure required for YOLOv8 training.

What goes where?

  1. Images:

    • Put your training images (80% of data) in: train/images/
    • Put your validation images (20% of data) in: val/images/
    • Supported formats: .jpg, .png, .bmp.
  2. Labels:

    • For every image image1.jpg, you need a text file image1.txt in the corresponding labels/ folder.
    • Example:
      • train/images/road_01.jpg
      • train/labels/road_01.txt
  3. data.yaml:

    • This file configures the dataset paths and class names.
    • It is the entry point for the training script.

Label Format

YOLO expects a .txt file with one line per object: <class_id> <x_center> <y_center> <width> <height>

  • class_id: Integer (0, 1, 2...) from data.yaml.
  • coordinates: Normalized between 0 and 1.

Example: 0 0.5 0.5 0.2 0.4 -> Class 0, centered in the middle, 20% width, 40% height.