Roboflow needs a feature to modify the class index start sequencing

Hi all,

It would be very helpful to have a feature that lets the user decide where the index of the classes should be started from. This way it would be very easy to implement when converting the index locations of the labels, especially if training on multiple folders of data per class.

I am now trying to find a way to convert all of the labels of the data.yaml files that were generated per workspace that is a lot. Maybe I lack the knowledge of the process or am delusional but this would sure be less headache at this stage!!

Cheers

2 Likes

Hi @Symbadian1 , I believe our system still shows you the indexes of the labels. In the image below:

  • index 1 = head | index 2 = helmet | index 3 = person

image

They are alphabetical upon export:

  • Example annotation file export for COCO JSON (hard hat dataset)
    image

  • Example annotation file export for YOLOv5 PyTorch (hard hat dataset, data.yaml file)
    image

Let me know if that doesn’t resolve the issue, as I’m confused as to what you’re asking. Did you try merging the datasets before exporting them, rather than manually manipulating files?

Hi @Mohamed, I found another way.
I merged the workspaces and that provided me with the labeling consistency required, thank god as it would have been a task to redo all those annotations.

One thing @Mohamed, I noticed that: Some of the annotations were corrupted when merging all the data at once. Some annotation names were replaced by numbers nevertheless when I checked the health of the process it was ok. Can you help me to understand why? I am apprehensive to merge all of the data, as a workaround, I use only the classes of the workspace that is necessary.

Hi @Symbadian1 - yes, this is what I was referring to here:

You can use Modify Classes to create “raw image” dataset versions. A raw image dataset version would be one in which you generate a dataset with only Auto-Orient as a preprocessing step (and Modify Classes if you wanted new class names), and no augmentations.

After generating a raw image dataset for both projects and exporting them in COCO JSON or another format - with the desired class names created with Modify Classes - you can create new projects to upload the individual datasets to, and then merge the 2 new projects to receive all the desired classes in one combined dataset.

  • alternatively, you can also add the two exported datasets to the same project when you upload the data, to avoid merging the datasets again.

@Mohamed gotcha… Thanx

1 Like

It’s necessary if we want to use a customized dataset to fine-tune the pre-trained model. Unfortunately, there’s still no such feature…

Hi @R_Lee what is your class index like? We have it as alphabetical as it helps to standardize exports.

You can also merge datasets in Roboflow to export together, and ensure you don’t have to wrangle multiple annotation files for data. We provide dataset management for this reason.

Are you out of storage space and needing more? And also, if such a feature were to be implemented, what do you think it should look like?