# タスクの管理

データセットを作成し、そこにファイルをアップロードしたら、アノテーションを開始するためのタスクを作成できます。

タスクの作成方法は次のとおりです。

```py
from mindkosh import Client, Label

labelsObjects = [
    mindkosh.Label(
        name="Pedestrian",
        color=hex_codes[0],
        sequence=1,
        attributes=[
            {
                'name': 'Age-group',
                'input_type': 'radio',
                'default_value': 'Adult',
                'mutable': False,
                'values': ['Adult', 'Child']
            }
        ]
    ),
    mindkosh.Label(name="Truck", color=hex_codes[1], sequence=2),
]

newTask = client.task.create(
    name="sample-task",
    labels=labelsObjects,
    dataset_id=datasetId,
    project_id=213,
    job_modes=['validation','qc'],
    batches=3,
    tags=['tag1'],
)
```

### ラベルのプロパティ

<table><thead><tr><th width="183">プロパティ</th><th width="188">型</th><th width="110">必須</th><th>説明</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>はい</td><td>タスクの名前。</td></tr><tr><td><code>color</code></td><td>string</td><td>はい</td><td>ラベルの色を16進数文字列で指定します。</td></tr><tr><td><code>sequence</code></td><td>integer</td><td>はい</td><td>ラベルが表示される順序。</td></tr><tr><td><code>track</code></td><td>boolean</td><td>いいえ</td><td>このラベルをフレームをまたいで追跡するかどうか。</td></tr><tr><td><code>lock_dimenions</code></td><td>boolean</td><td>いいえ</td><td>Point cloud タスクの追跡ラベルにのみ適用されます。true に設定すると、オブジェクトの寸法はすべてのフレームで同じままになります。 </td></tr><tr><td><code>type</code></td><td><code>non_mask</code> （デフォルト）、 <code>semantic_mask</code> または <code>instance_mask</code></td><td>いいえ</td><td>ラベルがセグメンテーションラベルかどうか。</td></tr><tr><td><code>attributes</code></td><td>辞書の配列</td><td>いいえ</td><td>下の attributes セクションを参照してください。</td></tr></tbody></table>

#### ラベル属性（プロパティ）

Mindkosh は次の種類の属性をサポートしています：

**ラジオボタン**\
アノテーターが1つだけ選択できる選択肢の範囲を指定します。

```py
{
    'name': 'Occlusion',
    'input_type': 'radio',
    'default_value': '0',
    'sequence': 1 ### ラベルの順序と同様に、これはプロパティが表示される順序を指定します。
    'mutable': True, ### 追跡ラベルにのみ適用されます。この属性はフレームごとに変化できますか？
    'values': ['0', '1', '2']
}
```

**チェックボックス**\
2つの値を取ることができる属性を指定します - `True` または `False`&#x20;

```py
{
    'name': 'Standing',
    'input_type': 'checkbox',
    'default_value': True,
    'sequence': 1 ### ラベルの順序と同様に、これはプロパティが表示される順序を指定します。
    'mutable': True, ### 追跡ラベルにのみ適用されます。この属性はフレームごとに変化できますか？
    'values' : ['true']
}
```

**テキスト**\
自由記述テキストを入力します。OCRにも使用できます。

**数値**

### タスクのパラメータ

<table><thead><tr><th width="183">プロパティ</th><th width="188">型</th><th width="110">必須</th><th>説明</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>はい</td><td>タスクの名前</td></tr><tr><td><code>labels</code></td><td>Label の配列 <code>Label</code> オブジェクト</td><td>はい</td><td>ラベル </td></tr><tr><td><code>dataset_id</code></td><td>integer</td><td>はい</td><td>タスクの作成元となるデータセットのデータセットID。</td></tr><tr><td><code>tags</code></td><td>文字列の配列</td><td>いいえ</td><td>指定したタグを持つデータセットファイルからタスクを作成します</td></tr><tr><td><code>project_id</code></td><td>integer</td><td>いいえ</td><td>このタスクを配置する既存プロジェクトのプロジェクトID。</td></tr><tr><td><code>job_mode</code></td><td><code>['validation']</code> または<br><code>['validation', 'qc']</code></td><td>いいえ</td><td>タスクにどのアノテーションモードを含めるか。デフォルトではアノテーションのみが含まれます。</td></tr><tr><td><code>batches</code></td><td>integer</td><td>いいえ</td><td>タスクデータをいくつのバッチに分割するか</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mindkosh.com/ja/python-sdk/tasukuno.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
