Label Mapping

Function

This Step renames labels through one-to-one mapping of the input classification labels.

../../../../_images/label_mapping.png

Usage Scenario

This Step is used to rename labels.

Input and Output

../../../../_images/77_label_mapping.png

Parameters

Port Settings

Size of Input Ports (1–8)
Parameter description: To set the number of input port in this Step.
Default value: 1
Range of value: 1–8

File Settings

Hint

Set label mapping is available only when the value of Size of Input Ports is 1.

Label File
Parameter description: To set the label files after label mapping.
Default value: labelmap.json
Instructions:
  1. Click Set label mapping to enter the JSON editor page.

  2. Click add, type the label to be renamed in Label before conversion, and click OK. Type the renamed label in Label after conversion and click OK to save the setting. The label is successfully renamed, and the mapping panel will display the relation between the two names in the bar.

    Hint

    If a label includes decimals or special characters, this label will not be successfully added for conversion and there will be a hint below the mapping panel suggesting that the user input is invalid.

  3. If you still need to rename the label, please repeat the second step until you have added all the labels to be renamed.

  4. Click the on the right of Directory to set a path to save the JSON file, otherwise the file will be saved in the directory of the project by default.

  5. Name the file in JSON File Name and click Save to save the label in the file.

  6. Click OK to complete the setup.

    Hint

    If the label file is already renamed beforehand, you can just click the in JSON File Name and select the file to read the mapping relation.