Introduction
This guide will help you understand how to write your own annotation questions in JSON format, whether they are for drawing things on images (like bounding boxes or dots) or for selecting/entering answers (like dropdowns or booleans).We will explain:
- Types of annotation questions
- Required and optional fields
- Examples for both types
Glossary (JSON Key Explanations)
Title | Description |
---|---|
class | Label or name of the object (e.g., “Car”, “Tree”). |
objectType | Shape used for annotation (“BoundingBox”, “polygon”, “dot”, “polyline”). |
dataset | Type of dataset: “image”, “video”, “audio”, etc. |
color | Display color in hex code (e.g., “#FF0000” for red). |
uniqueKey | Unique identifier (UUID) for the object or question. |
attributes | Optional nested questions or features related to the object. |
allowAnnotationToBeMarkedIncorrect | Whether the object can be marked as incorrectly drawn (true/false). |
customer_question_id | ID from an external system (leave null if not used). |
mode | Usually “edit” – defines how the annotation appears in the UI. |
key | Unique identifier for classification questions. |
componentClass | The actual text or label of the question shown to users. |
annotation | Input type: “dropdown”, “select”, “radio”, or “boolean”. |
required | Whether answering this question is mandatory (true/false). |
options | List of selectable answers (each with key, value, and optional color). |
sort | Whether to display the options in alphabetical order. |
searchBar | Adds a search box to the dropdown/select if there are many options. |
defaultValue | The answer selected by default if the user doesn’t pick one. |
notSureRemark | Adds a “Not Sure” or similar fallback option. |
questionGuidelines | Extra instructions shown with the question to help users. |
question_metadata | System metadata, usually left null. |
autolabel | Configuration for ML model-based label suggestions. |
1. Types of Annotation Questions
Supported Annotation Types by Dataset
Different datasets support different types of annotations:
Image
- Object-Based: BoundingBox, polygon, dot, polyline
- Classification: All types (dropdown, boolean, radio, select)
Document (Docs)
- Only supports Classification annotations
Video
- Object-Based: generic, BoundingBox, dot, polygon
- Classification: All types
Audio
- Object-Based only using objectType: audio
Audio Object-Based Annotation Example
- Classification: Same format as other datasets
Audio Text / PDF
- Only supports Classification annotations
Main Annotation Question Types
There are two main types of annotation question that you can create:A. Object-Based (e.g., draw bounding boxes, polygons, dots, polylines)
Used when you want users to draw or mark things directly on an image.B. Classification (e.g., dropdowns, booleans, radio buttons)
Used when users answer a question based on the image without drawing.
Used when you want users to draw or mark things directly on an image.B. Classification (e.g., dropdowns, booleans, radio buttons)
Used when users answer a question based on the image without drawing.
2. Object-Based Questions
Required Fields for Object-Based Questions
Field | Description |
---|---|
class | The label or name of the object (e.g., “Car”) |
objectType | Shape of the object: BoundingBox, polygon, dot, polyline |
dataset | Always set to image / video / audio |
Optional Fields for Object-Based Questions
Field | Description |
---|---|
color | Color code to display the object (e.g., “#FF0000”) |
uniqueKey | Unique ID for the object (auto-generated if not given) |
attributes | Extra details for the object. See example below for full JSON structure. |
allowAnnotationToBeMarkedIncorrect | Allow marking if drawn incorrectly (default: false) |
customer_question_id | If you’re linking to another system, otherwise leave null |
mode | Display mode, usually “edit” |
Attributes Field Example
Object-Based Question Example
Bounding Box Example
3. Classification Questions
Classification Annotation Types
Used for selecting or entering answers. Valid annotation types:
boolean
(Yes/No , True/False , Yes/No/Not Sure)radio
(Multiple options, one selection)dropdown
(Multiple options in a dropdown)select
(Alternate dropdown)
annotation
(for classification questions) must be one of: dropdown
, select
, radio
, or boolean
.Required Fields for Classification Questions
Field | Description |
---|---|
key | A unique identifier (string) |
componentClass | A short description or title of the question |
annotation | Input type: must be dropdown, select, radio, or boolean |
Optional Fields for Classification Questions
Field | Description |
---|---|
required | Whether the question must be answered (true or false) |
options | List of selectable answers |
sort | If true, options will appear sorted alphabetically |
searchBar | Adds a search bar to options if there are many choices |
defaultValue | The default selected answer (if any) |
notSureRemark | Add an option like “Not sure” |
questionGuidelines | Helpful instructions or tips shown to the user |
question_metadata | Extra system data, usually left null |
autolabel | Auto-suggestion model config (used for ML-based predictions) |
Boolean Example
Boolean Classification Example
Radio Buttons Example
Radio Classification Example
Dropdown Example
Dropdown Classification Example
4. How to Structure the JSON File
Example File with Multiple Questions
Put all your questions in a list For example:
[]
. You can mix object and classification questions.Multiple Questions Example
question_metadata
denotes the attributes for object type questions (Bounding Box and Polygons). The structure of question_metadata
is:question_metadata Structure
question_metadata Example