YOLOv8 - classes invertion in data.yaml

Open
#100 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

Start by reproducing the Roboflow export using the listed preprocessing and augmentation settings, then inspect data.yaml alongside the generated annotations. Confirm whether the two class names are swapped in the export and whether correcting the ordering makes displayed labels match the dataset; the issue provides no repository file or test entry point.

Written by the indexing model from the issue text.

Description

Hello,

I'd like to report a minor bug. I've annotated a dataset with Roboflow. I exported my data in YOLOv8 format but 2 classes are inverted in data.yaml. The model have been trained sucessfully but when I display the labels on images, they are inverted...

train: ../train/images
val: ../valid/images
test: ../test/images

nc: 9
names: ['Bibendum', 'Casquette', 'Dunlop', 'Goodyear', 'Michelin bibendum', **'Michelin logo carre', 'Michelin logo',** 'Michelin sept', 'Pneu']

roboflow:
  workspace: tmf
  project: michelin-gt
  version: 11
  license: CC BY 4.0
  url: https://universe.roboflow.com/tmf/michelin-gt/dataset/11

I expected :
names: ['Bibendum', 'Casquette', 'Dunlop', 'Goodyear', 'Michelin bibendum', 'Michelin logo', 'Michelin logo carre' 'Michelin sept', 'Pneu']

Here are the augmentations / preprocessing steps I choose in Roboflow before exporting :

PREPROCESSING
Resize: Stretch to 640x640
Modify Classes: 4 remapped, 3 dropped

AUGMENTATIONS
Outputs per training example: 3
Rotation: Between -15° and +15°
Saturation: Between -25% and +25%
Brightness: Between -25% and +25%
Exposure: Between -25% and +25%

Dominant language
Python
Stars
642
Forks
146
Avg merge
1d 10h
Merged PRs (30d)
13

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from roboflow/roboflow-python

All issues in roboflow/roboflow-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.