> 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/burokku/blocks/video-processing/byte-track-tracker.md).

# ByteTrackトラッカー

roboflow/trackers パッケージの **ByteTrack** アルゴリズムを使用して、動画フレーム間でオブジェクトを追跡します。

ByteTrackは検出結果を高信頼度プールと低信頼度プールに分け、IoUベースの関連付けを2回実行します。1回目では高信頼度の検出を既存のトラックに一致させ、2回目では未一致のトラックと重なる弱い検出を復元します。これにより、ByteTrackは特に次のような場面で効果的です **高密度な環境** 物体が頻繁に部分的に遮蔽され、検出器の信頼度が変動する場面。

**ByteTrackを使うタイミング：**

* 多様なシーンにわたる汎用的なトラッキング。
* 部分的な遮蔽がある高密度・混雑した環境。
* スポーツのトラッキングや高速で動く物体（SportsMOTで最高のベンチマークスコア）。
* 高信頼度と低信頼度の検出が混在しており、それらを保持したい場合。

**代替案を検討すべき場面：**

* 強力な検出器で最大限のシンプルさと速度を求めるなら、 **SORT**.
* 遮蔽が多く、非線形な動きがあるシーンでは、 **OC-SORT**.

3種類の検出セットを出力します：

* **tracked\_detections**：割り当て済みのトラック ID を持つ、確認済みのすべての追跡検出。
* **new\_instances**：トラック ID が初めて現れた検出。
* **already\_seen\_instances**：以前のフレームでそのトラック ID が見られた検出。

このブロックは、各 `video_identifier`ごとにトラッカー状態とインスタンスキャッシュを個別に保持し、単一のワークフロー内で複数ストリームの追跡を可能にします。

### 型識別子

ステップで次の識別子を使用してください `"type"` フィールド： `roboflow_core/trackers_bytetrack@v1` ワークフローにこのブロックをステップとして追加するには。

### プロパティ

| **名前**                       | **型**   | **説明**                                                                   | 参照 |
| ---------------------------- | ------- | ------------------------------------------------------------------------ | -- |
| `name`                       | `str`   | このステップの一意の識別子を入力してください。                                                  | ❌  |
| `minimum_iou_threshold`      | `float` | 既存のトラックに検出を関連付けるために必要な最小IoU。デフォルト：0.1..                                  | ✅  |
| `minimum_consecutive_frames` | `整数`    | トラックが確定トラック（tracker\_id != -1）として出力される前に、一致する必要がある連続フレーム数。デフォルト：2..      | ✅  |
| `lost_track_buffer`          | `整数`    | 一致した検出を失った後もトラックを生存状態に保つフレーム数。値を大きくすると遮蔽からの復帰性能が向上します。デフォルト: 30..        | ✅  |
| `track_activation_threshold` | `float` | 新しいトラックを生成するために必要な最小検出信頼度。このしきい値未満の検出は新規トラックの作成には使用されません。デフォルト：0.7..     | ✅  |
| `high_conf_det_threshold`    | `float` | 関連付けに使用される高信頼度検出の信頼度しきい値。デフォルト：0.6..                                     | ✅  |
| `instances_cache_size`       | `整数`    | 新規/既に確認済みの分類のためにインスタンスキャッシュに保持するトラック ID の最大数。FIFO で削除されます。デフォルト: 16384.. | ❌  |

この **参照** 列は、で利用可能な動的値を使ってプロパティをパラメータ化できる可能性を示します `ワークフロー` 実行時。参照 *バインディング* 詳細は。

### ランタイム互換性

`soft` - ランタイム `hosted_serverless`, `dedicated_deployment`；実行 `リモート`; 入力 `動画` このブロックは、プロセスメモリ内に動画ごとの状態を保持します（video\_metadata.video\_identifier をキーとする）。ステートレスまたは複数レプリカのHTTPランタイムでリモートステップ実行を行うと、連続するリクエストが別々のワーカープロセスによって処理される可能性があるため、呼び出し間で状態がリセットされ、追跡／カウント／集計には意味のない出力になります。安定したフレーム間結果を得るには、永続的な WebRTC セッションでローカルステップ実行を使用してください。

`soft` - 入力 `image` このブロックは、動画または繰り返しフレームのワークフローからの時間的コンテキストに依存します。静止画像／写真では、追跡、比較、集計、可視化に使える意味のある履歴がないため、このブロックの利点はほとんど、またはまったくありません。

### 入力と出力のバインディング

利用可能な接続は、そのバインディング種別によって異なります。どのバインディング種別が `ByteTrackトラッカー` のバージョン `v1` あるか確認してください。

<details>

<summary>入力と出力のバインディング</summary>

* 入力
  * `image` ([*`image`*](/workflows/ja/gaido/developer-guide/kinds/image.md)）：動画メタデータ（fps と video\_identifier）を埋め込んだ入力画像。各動画のトラッカー状態の初期化と取得に使用します..
  * `検出` (*Union\[*[*`rle_instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/rle-instance-segmentation-prediction.md)*,* [*`object_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/object-detection-prediction.md)*,* [*`instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`keypoint_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/keypoint-detection-prediction.md)*]*）：現在のフレームで追跡する検出予測..
  * `minimum_iou_threshold` ([*`float_zero_to_one`*](/workflows/ja/gaido/developer-guide/kinds/float-zero-to-one.md)）：既存のトラックに検出を関連付けるために必要な最小IoU。デフォルト：0.1..
  * `minimum_consecutive_frames` ([*`整数`*](/workflows/ja/gaido/developer-guide/kinds/integer.md)）：トラックが確定トラック（tracker\_id != -1）として出力される前に、一致する必要がある連続フレーム数。デフォルト：2..
  * `lost_track_buffer` ([*`整数`*](/workflows/ja/gaido/developer-guide/kinds/integer.md)）：一致した検出を失った後もトラックを生存状態に保つフレーム数。値を大きくすると遮蔽からの復帰性能が向上します。デフォルト: 30..
  * `track_activation_threshold` ([*`float_zero_to_one`*](/workflows/ja/gaido/developer-guide/kinds/float-zero-to-one.md)）：新しいトラックを生成するために必要な最小検出信頼度。このしきい値未満の検出は新規トラックの作成には使用されません。デフォルト：0.7..
  * `high_conf_det_threshold` ([*`float_zero_to_one`*](/workflows/ja/gaido/developer-guide/kinds/float-zero-to-one.md)）：関連付けに使用される高信頼度検出の信頼度しきい値。デフォルト：0.6..
* 出力
  * `tracked_detections` (*Union\[*[*`object_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/object-detection-prediction.md)*,* [*`instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`keypoint_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/keypoint-detection-prediction.md)*,* [*`rle_instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/rle-instance-segmentation-prediction.md)*]*）：sv.Detections(...) 形式の検出バウンディングボックスを含む予測。 `object_detection_prediction` または、sv.Detections(...) 形式の検出バウンディングボックスとセグメンテーションマスクを含む予測。 `instance_segmentation_prediction` または、検出されたバウンディングボックスと検出されたキーポイントを sv.Detections(...) オブジェクトの形式で持つ Prediction の場合 `keypoint_detection_prediction` または、sv.Detections(...) オブジェクト形式で、検出されたバウンディングボックスと RLE エンコードされたセグメンテーションマスクを含む Prediction。もし `rle_instance_segmentation_prediction`.
  * `new_instances` (*Union\[*[*`object_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/object-detection-prediction.md)*,* [*`instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`keypoint_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/keypoint-detection-prediction.md)*,* [*`rle_instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/rle-instance-segmentation-prediction.md)*]*）：sv.Detections(...) 形式の検出バウンディングボックスを含む予測。 `object_detection_prediction` または、sv.Detections(...) 形式の検出バウンディングボックスとセグメンテーションマスクを含む予測。 `instance_segmentation_prediction` または、検出されたバウンディングボックスと検出されたキーポイントを sv.Detections(...) オブジェクトの形式で持つ Prediction の場合 `keypoint_detection_prediction` または、sv.Detections(...) オブジェクト形式で、検出されたバウンディングボックスと RLE エンコードされたセグメンテーションマスクを含む Prediction。もし `rle_instance_segmentation_prediction`.
  * `already_seen_instances` (*Union\[*[*`object_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/object-detection-prediction.md)*,* [*`instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/instance-segmentation-prediction.md)*,* [*`keypoint_detection_prediction`*](/workflows/ja/gaido/developer-guide/kinds/keypoint-detection-prediction.md)*,* [*`rle_instance_segmentation_prediction`*](/workflows/ja/gaido/developer-guide/kinds/rle-instance-segmentation-prediction.md)*]*）：sv.Detections(...) 形式の検出バウンディングボックスを含む予測。 `object_detection_prediction` または、sv.Detections(...) 形式の検出バウンディングボックスとセグメンテーションマスクを含む予測。 `instance_segmentation_prediction` または、検出されたバウンディングボックスと検出されたキーポイントを sv.Detections(...) オブジェクトの形式で持つ Prediction の場合 `keypoint_detection_prediction` または、sv.Detections(...) オブジェクト形式で、検出されたバウンディングボックスと RLE エンコードされたセグメンテーションマスクを含む Prediction。もし `rle_instance_segmentation_prediction`.

</details>

<details>

<summary>JSON 定義の例</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/trackers_bytetrack@v1",
	    "image": "<block_does_not_provide_example>",
	    "detections": "$steps.object_detection_model.predictions",
	    "minimum_iou_threshold": 0.1,
	    "minimum_consecutive_frames": 2,
	    "lost_track_buffer": 30,
	    "track_activation_threshold": 0.7,
	    "high_conf_det_threshold": 0.6,
	    "instances_cache_size": "<block_does_not_provide_example>"
	}
```

</details>
