roboflow / roboflow/roboflow-python

Wrong number of classes in data.yaml

Open
#88 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
629
Forks
140
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Description

After labelling all the images in the dataset, when generating a new dataset version and downloading it, the data.yaml created additional non-existing classes.

Steps to reproduce
  1. Label your data
  2. Create a new dataset version
  3. Check the Modify Classses pre-processing step to make sure you have the right classes
  4. Generate the dataset version
  5. Download the dataset
  6. Check the classes in data.yaml
Expected result

You should only get the classes that you labeled

Actual result

The roboflow creates additional non-existing classes (this also alters the class_id of the real classes)

Note: While labeling, there were some classes that were created by mistake, but they were deleted afterwards since they were never used. This somehow was still picked up by the roboflow.

Evidence

You can clearly see I had 2 classes:
image

When downloading the dataset, its data.yaml config file looked like this:
image

This remapped my original class_id's of course.
This was my original data.yaml:

image

Contributor guide

Open the contributing guide

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.

Research direction

The report names no implementation files or tests; begin by reproducing the labeling, dataset-version, generation, and download steps, then inspect the generated data.yaml against the labeled classes and original class IDs. Done means the file contains only labeled classes and preserves the expected class IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.