Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 824 Bytes

rename.md

File metadata and controls

54 lines (48 loc) · 824 Bytes

This layer (rename) re-maps existing classes.

Provide object classes_mapping, where keys are existing classes and values are new classes of annotations.

{
  "action": "rename",
  "src": ["$input"],
  "dst": "$output",
  "settings": {
    "classes_mapping": {
      "old": "new"
    }
  }
}

Example

Assign class vehicle to annotations of class bus.

[
  {
    "dst": "$data",
    "src": [
      "example/*"
    ],
    "action": "data",
    "settings": {
      "classes_mapping": "default"
    }
  },
  {
    "action": "rename",
    "src": ["$data"],
    "dst": "$output",
    "settings": {
      "classes_mapping": {
        "bus": "vehicle"
      }
    }
  },
  {
    "dst": "example_rename",
    "src": [
      "$output"
    ],
    "action": "supervisely",
    "settings": {}
  }
]