DocumentationRecipesReferenceGraphQLChangelog
Log In

Customizing the interface through JSON settings

To edit your project JSON settings, go to your project "Settings" page, and then click the JSON interface tab.

The JSON settings fully describe an interface.

Labeling job templates

You can reuse these labeling job templates to build your own project:

"CLASSIFICATION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "name": "A",
            "id": "category90"
          },
          "B": {
            "children": [],
            "name": "B",
            "id": "category91"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "CLASSIFICATION",
      "required": 1,
      "isChild": false,
      "isNew": false
    }
"OBJECT_DETECTION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "color": "#472CED",
            "name": "A",
            "id": "category104"
          },
          "B": {
            "children": [],
            "name": "B",
            "id": "category107",
            "color": "#5CE7B7"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "OBJECT_DETECTION",
      "required": 1,
      "tools": [
        "rectangle"
      ],
      "isChild": false,
      "isNew": true
    }
"OBJECT_DETECTION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "color": "#472CED",
            "name": "A",
            "id": "category156"
          },
          "B": {
            "children": [],
            "name": "B",
            "id": "category158",
            "color": "#5CE7B7"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "OBJECT_DETECTION",
      "required": 1,
      "tools": [
        "rectangle"
      ],
      "isChild": false,
      "isNew": true
    },
    "OBJECT_RELATION_JOB": {
      "content": {
        "categories": {
          "C": {
            "children": [],
            "color": "#D33BCE",
            "name": "C",
            "id": "category159",
            "startObjects": [
              "A"
            ],
            "endObjects": [
              "B"
            ]
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "OBJECT_RELATION",
      "required": 1,
      "isChild": false,
      "isNew": true
    }
"NAMED_ENTITIES_RECOGNITION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "name": "A",
            "color": "#733AFB",
            "id": "category7"
          },
          "B": {
            "children": [],
            "name": "B",
            "color": "#3CD876",
            "id": "category8"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "isChild": false,
      "mlTask": "NAMED_ENTITIES_RECOGNITION",
      "models": {},
      "isVisible": true,
      "required": 1,
      "isNew": false
    }
"NAMED_ENTITIES_RECOGNITION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "name": "A",
            "color": "#733AFB",
            "id": "category7"
          },
          "B": {
            "children": [],
            "name": "B",
            "color": "#3CD876",
            "id": "category8"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "isChild": false,
      "mlTask": "NAMED_ENTITIES_RECOGNITION",
      "models": {},
      "isVisible": true,
      "required": 1,
      "isNew": false
    },
    "NAMED_ENTITIES_RELATION_JOB": {
      "content": {
        "categories": {
          "C": {
            "children": [],
            "color": "#472CED",
            "name": "C",
            "id": "category9",
            "startEntities": [
              "A"
            ],
            "endEntities": [
              "B"
            ]
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "NAMED_ENTITIES_RELATION",
      "required": 1,
      "isChild": false,
      "isNew": true
    }
"OBJECT_DETECTION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "color": "#472CED",
            "name": "A",
            "id": "category117",
            "points": [
              {
                "code": "POINT_1",
                "id": "point119",
                "name": "Point 1"
              },
              {
                "code": "POINT_2",
                "id": "point121",
                "name": "Point 2"
              }
            ]
          },
          "B": {
            "children": [],
            "name": "B",
            "id": "category120",
            "color": "#5CE7B7",
            "points": [
              {
                "code": "POINT_3",
                "id": "point122",
                "name": "Point 3"
              },
              {
                "code": "POINT_4",
                "id": "point123",
                "name": "Point 4"
              }
            ]
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "OBJECT_DETECTION",
      "required": 1,
      "tools": [
        "pose"
      ],
      "isChild": false,
      "isNew": true
    }
"OBJECT_DETECTION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "color": "#472CED",
            "name": "A",
            "id": "category124"
          },
          "B": {
            "children": [],
            "name": "B",
            "id": "category126",
            "color": "#5CE7B7"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "mlTask": "OBJECT_DETECTION",
      "required": 1,
      "tools": [
        "semantic"
      ],
      "isChild": false,
      "isNew": false,
      "models": {
        "interactive-segmentation": {
          "job": "OBJECT_DETECTION_JOB_MARKER"
        }
      }
    },
    "OBJECT_DETECTION_JOB_MARKER": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "color": "#472CED",
            "name": "A"
          },
          "B": {
            "name": "B"
          }
        },
        "input": "radio"
      },
      "instruction": "<Job title>",
      "isChild": false,
      "isModel": true,
      "isVisible": false,
      "mlTask": "OBJECT_DETECTION",
      "required": 0,
      "tools": [
        "marker"
      ]
    }
"TRANSCRIPTION_JOB": {
      "content": {
        "input": null
      },
      "instruction": "<Job name>",
      "mlTask": "TRANSCRIPTION",
      "required": 1,
      "isChild": false,
      "isNew": true
    }

For classification jobs, the possible values for input are:

  • radio
  • checkbox
  • singleDropdown
  • multipleDropdown

For information on how to use them in Kili projects, refer to Classification jobs.

For object detection jobs, the possible values for tools are:

  • rectangle
  • polygon
  • marker (for point)
  • polyline (for line)
  • vector

In PDF projects where different pages may represent different document types, transcription and classification tasks can now be defined once and set to repeat on every page of your document.
To enable that, use a Classification or a Transcription job, and then set:

  • "mlTask": "PAGE_LEVEL_CLASSIFICATION"
  • "mlTask": "PAGE_LEVEL_TRANSCRIPTION"

Set "required" to 1 for mandatory jobs and 0 for optional jobs.
If you want the job to be nested under another job, set its "isChild" attribute to true and add the job ID in the "children" list for the parent.

For example:

"CLASSIFICATION_JOB": {
      "content": {
        "categories": {
          "A": {
            "children": [],
            "name": "A",
            "id": "category132"
          },
          "B": {
            "children": [
              "CLASSIFICATION_JOB_0"
            ],
            "name": "B",
            "id": "category133"
          }
        },
        "input": "radio"
      },
      "instruction": "job1",
      "mlTask": "CLASSIFICATION",
      "required": 1,
      "isChild": false,
      "isNew": true
    },
    "CLASSIFICATION_JOB_0": {
      "content": {
        "categories": {
          "C": {
            "children": [],
            "name": "C",
            "id": "category140"
          },
          "D": {
            "children": [],
            "name": "D",
            "id": "category141"
          }
        },
        "input": "checkbox"
      },
      "instruction": "job2",
      "mlTask": "CLASSIFICATION",
      "required": 1,
      "isChild": true,
      "isNew": true
    }

results in this job structure:

📘

To reuse your JSON settings with a different project, simply copy file contents and paste them in the other project.

For possible modifications and customizations through JSON settings, refer to these examples:

Editing metadata at asset level

You can add additional information to the asset, called metadata. Metadata can be uploaded through the API. It can be an image, text, and/or a URL. The code below shows how to attach metadata to an asset with Kili Python SDK:

metadata = {
    'imageUrl': 'https://myriadrbm.com/wp-content/blogs.dir/20/files/2018/05/cell-3.png',
    'text': 'Normal cell',
    'url': 'https://www.google.com'
}
kili.update_properties_in_assets(
    asset_ids=[asset_id],
      json_metadata=[metadata]
)

For more information, refer to our GraphQL API documentation or go directly to our Github playground.

Editing metadata at category level

You can set up metadata at category level. Every annotator will be able to see them directly in the job interface, when they hover over the information icon to the right of the category:

Category metadata are configured in the interface. You can set them up for every category belonging to any existing job.
To add category metadata, add a jsonMetadata to your categories dictionary. The key can contain text as in this example:

"jsonMetadata": {
  "text": "someText"
}

Customizing class colors

The color of each class is a parameter in the JSON file. The color code is the color hex code (hexadecimal), for example:

"color": "#941100"

You can use online color picker tools, for example Online Color Picker to select the perfect color for your task.

Customizing shortcuts

You can define custom shortcuts for your label categories by adding a new key-value pair in your category dictionary. For example:


"shortcut": "Z"

📘

For shortcuts, you can only use letters of the English alphabet (a-z) and numbers (0-9).


Did this page help you?