# Register your template
Make the template available, deploy it to your web server, and register it in the Annotation Tool to make it available
# Template icon
You need to have 2 icons
# Small template icon (24px x 24px)
/icon24.svg
# Normal template icon (35px x 35px)
/icon35.svg
# Manifest file
# Version 2 (recommended)
Example
{
"version": 2,
"name": "Object Detection",
"image": "/template_image.png",
"optionsSchema": {
"select_mode": {
"type": "string"
}
},
"labels": {
"default": [
{
"id": 0,
"name": "Category1",
"labels": [
{
"id": 0,
"name": "dog",
"color": "#ff879c"
},
{
"id": 1,
"name": "cat",
"color": "#908eff"
}
]
},
{
"id": 1,
"name": "Category2",
"labels": [
{
"id": 2,
"name": "penguin",
"color": "#ffe355"
},
{
"id": 3,
"name": "duck",
"color": "#52ff68"
}
]
}
]
},
"i18n": {
"en": {
"description": "It enables you to extract text information from an image. You can assign free text information on images.",
"usecase": "e.g., text recognition (OCR), assigning metadata to images",
"options": {
"select_mode": {
"title": "Label Type",
"values": {
"single_select": "Single Labeling",
"multiple_select": "Multiple Labeling"
}
}
}
},
"ja": {
"description": "画像から文字情報を抽出できます。画像に、フリーテキストで情報をつけていきます",
"usecase": "例: 文字認識(OCR)、画像へのメタ情報の付与",
"options": {
"select_mode": {
"title": "選択方法",
"values": {
"single_select": "単一ラベリング",
"multiple_select": "マルチラベリング"
}
}
}
}
}
}
| Name | Type | Description |
|---|---|---|
| version | number | You need to specify version 2, otherwise it will be seen as version 1 |
| name | string | Template name |
| image | string | Path to template thumbnail |
| labels | object | You can set labels.default to config default label when creating a new project. Don't need to set if project doesn't require labels. |
| optionsSchema | object | Additional information for project. It can be any object. it should follow JSON Schema specification (opens new window). Please check the example below |
| i18n | object | Provide string value and translations. Please check below section for more details |
# optionsSchema (optional)
optionsSchema provide instructions to display templateOptions.
For example, to register select_mode as a templateOptions:
{
...
"optionsSchema": {
"type": "object",
"properties": {
"select_mode": {
"type": "string"
}
}
},
...
}
At the moment, only "type": "string" is supported.
# i18n
We need to provide description and usecase for each language.
Besides, you can also specify localization for templateOptions's title and values.
{
...
"i18n": {
"en": {
"description": "It enables you to extract text information from an image. You can assign free text information on images.",
"usecase": "e.g., text recognition (OCR), assigning metadata to images",
"options": {
"select_mode": {
"title": "Label Type",
"values": {
"single_select": "Single Labeling",
"multiple_select": "Multiple Labeling"
}
}
}
},
"ja": {
"description": "画像から文字情報を抽出できます。画像に、フリーテキストで情報をつけていきます",
"usecase": "例: 文字認識(OCR)、画像へのメタ情報の付与",
"options": {
"select_mode": {
"title": "選択方法",
"values": {
"single_select": "単一ラベリング",
"multiple_select": "マルチラベリング"
}
}
}
}
}
...
}
This manifest supports 2 languages, English(en) and Japanese(ja). We need to provide description and usecase, which are required for each language.
Translation for optionsSchema should be under options key, which you can provide title and values for each option.
# Version 1 (deprecated)
Need to host some files to serve as your templates
# template.manifest.json
/template.manifest.json
{
"name": "Object Detection",
"image": "/template_image.png",
"description": {
"ja": "画像内のオブジェクトを検出し、画像上にボックスを描画することができます.",
"en": "It enables you to detect objects in an image and draw bounding boxes on an image."
},
"usecase": {
"ja": "商品検出、物体カウント、顔検出に使用することができます",
"en": "e.g., product detection, counting objects, face detection"
}
}
# template image (260px x 160px)
/template_image.png
This file can be renamed in template.manifest.json

# Prepare result schema
You must have a JSON Schema to check the results for inconsistent data.
Segmentation template example.
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "array",
"minItems": 1,
"items": [
{
"type": "object",
"properties": {
"labels": {
"type": "array",
"minItems": 1,
"items": [
{
"type": "object",
"properties": {
"label_id": {
"type": "integer"
},
"category_id": {
"type": "integer"
}
},
"required": ["label_id", "category_id"]
}
]
},
"meta": {
"type": "object",
"properties": {
"image": {
"type": "string"
},
"color": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": ["image"]
}
},
"required": ["labels", "meta"]
}
]
}
# Deploy to your server
Deploy the template application to your server
TIP
Please make allow that template.manifest.json, template image and icon files are cross-origin access
# Request the admin to register
Please ask the Annotation Tool administrator to register with the information required for registration.
# Information required for registration
- Your organization name
- Template name
- Host URL (URL)
- Data type (Image/Audio/Video/Text)
- Result schema file (json file)
- Include files in result (Yes/No)