roboflow / roboflow/roboflow-python
Wrong number of classes in data.yaml
Nobody has claimed this yet.
- 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
- Label your data
- Create a new dataset version
- Check the Modify Classses pre-processing step to make sure you have the right classes
- Generate the dataset version
- Download the dataset
- 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:

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

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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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