> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/ja/gaido/developer-guide/kinds/rle-instance-segmentation-prediction.md).

# rleinstancesegmentationprediction 型

検出されたバウンディングボックスとRLEエンコードされたセグメンテーションマスクを含む、sv.Detections(...) オブジェクト形式の予測

この種類は、デコード済みのnumpy配列ではなくRLE（Run-Length Encoding）でマスクが保存されたインスタンスセグメンテーション予測を表します。マスクは `sv.Detections.data["rle_masks"]` COCO形式のRLE辞書のnumpy配列として: `{"size": [H, W], "counts": "encoded_string"}`.

可視化ブロックでnumpyマスクが必要な場合、必要に応じてRLEをデコードします。使用するのは `pycocotools`.

内部値の例:

```
sv.Detections(
    xyxy=array([[        127,         189,         322,         303]]),
    mask=None,  # 初期値はNone。必要になったときに遅延的に設定されます
    confidence=array([    0.95898]),
    class_id=array([6]),
    tracker_id=None,
    data={
        'class_name': array(['person'], dtype='<U6'),
        'detection_id': array(['51dfa8d5-261c-4dcb-ab30-9aafe9b52379'], dtype='<U36'),
        'parent_id': array(['image.[0]'], dtype='<U9'),
        'image_dimensions': array([[425, 640]]),
        'prediction_type': array(['rle-instance-segmentation'], dtype='<U26'),
        'rle_masks': array([{'size': [425, 640], 'counts': 'encoded_rle_string'}], dtype=object),
        # ... 他の標準フィールド
    }
)
```

## データ表現

{% hint style="warning" %}
**データ表現**

この種類は内部表現と外部表現が異なります。 **外部** 表現はワークフローとの統合に関係し、 **内部** 一方は、Workflowsブロックの開発に役立つ実装上の詳細です。
{% endhint %}

### 外部

外部データ表現は Workflows クライアントに関連します。これは、データの入力および出力形式を規定します。

型: `dict`

シリアライズされたエンティティの詳細は [`instance_segmentation_prediction`](/workflows/ja/gaido/developer-guide/kinds/instance-segmentation-prediction.md)、ポリゴンではなくRLEマスクを使用します。RLE形式はCOCO標準に従っており、 `pycocotools.mask.decode()`.

### 内部

内部データ表現は Workflows ブロック作成者に関連します。これは、実行エンジンが実行時に、この種類の入力を受け取るブロックへ提供する型です。

型: [`sv.Detections`](https://supervision.roboflow.com/latest/detection/core/)
