rename-labels

You need to be a Pro member to access the full content of this.

rename-labels lets you rename labels from A to B:

Why you want to use this tool

Labelme lets you rename the label of each shape easily via the GUI.

However, in some cases, you’d like to rename labels after annotation such as:

Doing this manually is time-consuming when you have many files.

rename-labels helps to resolve this.

Usage

Pass either a JSON file or directory of JSON files.

labelmetk rename-labels [OPTIONS] FILE_OR_DIR...

Example: Rename a single label

labelmetk rename-labels small_dataset/2011_000006.json --from-to chair sofa

Before

After

Now "chair" is named as "sofa".

Example: Renaming multiple labels

Pass multiple pairs of labels:

labelmetk rename-labels small_dataset --from-to car vehicle --from-to bus vehicle

Before

After

Now both "car" and "bus" are named as "vehicle".

Download an example dataset from:

small_dataset.zip (389KB)