

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 機械学習コンポーネント
<a name="machine-learning-components"></a>

AWS IoT Greengrass には、Amazon SageMaker AI でトレーニングされたモデル、または Amazon S3 に保存されている独自の事前トレーニング済みモデルを使用して[機械学習推論を実行する](perform-machine-learning-inference.md)ために、サポートされているデバイスにデプロイできる以下の機械学習コンポーネントが用意されています。<a name="ml-component-types"></a>

AWS には、次のカテゴリの機械学習コンポーネントが用意されています。
+ **モデルコンポーネント** - Greengrass アーティファクトとして機械学習モデルが含まれます。
+ **ランタイムコンポーネント** - 機械学習フレームワークとその従属関係を Greengrass コアデバイスにインストールするスクリプトが含まれます。
+ **推論コンポーネント** - 推論コードが含まれ、機械学習フレームワークをインストールして事前学習済みの機械学習モデルをダウンロードするためのコンポーネント従属関係が含まれます。

 AWSが提供する機械学習コンポーネントでサンプル推論コードと事前トレーニング済みモデルを使用して、DLR と TensorFlow Lite を使用してイメージ分類とオブジェクト検出を実行できます。Amazon S3 に格納されている独自のモデルでカスタム機械学習の推論を実行したり、別の機械学習フレームワークを使用したりするには、これらのパブリックコンポーネントのレシピをテンプレートとして使用して、カスタム機械学習コンポーネントを作成できます。詳細については、「[機械学習コンポーネントのカスタマイズ](ml-customization.md)」を参照してください。

AWS IoT Greengrass には、Greengrass AWSコアデバイス上の SageMaker AI Edge Manager エージェントのインストールとライフサイクルを管理するための が提供するコンポーネントも含まれています。SageMaker AI Edge Manager を使用することにより、Amazon SageMaker AI Neo がコンパイルしたモデルをコアデバイスで直接使用できます。詳細については、「[Greengrass コアデバイスで Amazon SageMaker AI Edge Manager を使用する](use-sagemaker-edge-manager.md)」を参照してください。

次の表に、 で使用できる機械学習コンポーネントを示します AWS IoT Greengrass。

**注記**  <a name="component-nucleus-dependency-update-note"></a>
いくつかの AWS提供されるコンポーネントは、Greengrass nucleus の特定のマイナーバージョンによって異なります。この従属関係により、Greengrass nucleus を新しいマイナーバージョンに更新するとき、これらのコンポーネントを更新する必要があります。各コンポーネントが依存する nucleus の特定バージョンの情報については、対応するコンポーネントのトピックを参照してください。nucleus の更新の詳細については、「[AWS IoT Greengrass Core ソフトウェア (OTA) の更新](update-greengrass-core-v2.md)」を参照してください。

<a name="component-table-type-description"></a>コンポーネントにジェネリックと Lambda の両方のコンポーネントタイプがある場合、コンポーネントの現在のバージョンはジェネリックタイプであり、コンポーネントの以前のバージョンは Lambda タイプです。


| コンポーネント | 説明 | [コンポーネントタイプ](develop-greengrass-components.md#component-types) | サポートされる OS | [オープンソース](open-source.md) | 
| --- | --- | --- | --- | --- | 
| [SageMaker AI Edge Manager](sagemaker-edge-manager-component.md) | Amazon SageMaker AI Edge Manager エージェントを Greengrass コアデバイスにデプロイします。 | ジェネリック | Linux、Windows | いいえ | 
| [DLR イメージ分類](dlr-image-classification-component.md) | DLR イメージ分類モデルストアと DLR ランタイムコンポーネントを従属関係として使用し、DLR をインストール、サンプルイメージ分類モデルをダウンロード、サポートされているデバイスにイメージ分類推論を実行する推論コンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [DLR オブジェクトの検出](dlr-object-detection-component.md) | DLR オブジェクト検知モデルストアと DLR ランタイムコンポーネントを従属関係として使用し、DLR をインストール、サンプルオブジェクト検知モデルをダウンロード、サポートされているデバイスにオブジェクト検知推論を実行する推論コンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | Greengrass アーティファクトとしてサンプル ResNet-50 イメージ分類モデルを含むモデルコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | Greengrass アーティファクトとしてサンプル YOLOv3 オブジェクト検出モデルを含むモデルコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [DLR ランタイム](dlr-component.md) | DLR とその従属関係を Greengrass コアデバイスにインストールするために使用されるインストールスクリプトを含むランタイムコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [TensorFlow Lite イメージ分類](tensorflow-lite-image-classification-component.md) | TensorFlow Lite イメージ分類モデルストアと TensorFlow Lite ランタイムコンポーネントを従属関係として使用し、TensorFlow Lite をインストール、サンプルイメージ分類モデルをダウンロード、サポートされているデバイスにイメージ分類推論を実行する推論コンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [TensorFlow Lite オブジェクト検出](tensorflow-lite-object-detection-component.md) | TensorFlow Lite オブジェクト検出モデルストアと TensorFlow Lite ランタイムコンポーネントを従属関係として使用し、TensorFlow Lite をインストール、サンプルオブジェクト検出モデルをダウンロード、サポートされているデバイスでのオブジェクト検出推論を実行する推論コンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | Greengrass アーティファクトとしてサンプル MobileNet v1 モデルを含むモデルコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [TensorFlow Lite オブジェクト検出モデルストア](tensorflow-lite-object-detection-model-store-component.md) | Greengrass アーティファクトとしてサンプルシングルショット検出 (SSD) MobileNet モデルを含むモデルコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 
| [TensorFlow Lite ランタイム](tensorflow-lite-component.md) | TensorFlow Lite とその従属関係を Greengrass コアデバイスにインストールするために使用されるインストールスクリプトを含むランタイムコンポーネント。 | ジェネリック | Linux、Windows | いいえ | 

# SageMaker AI Edge Manager
<a name="sagemaker-edge-manager-component"></a>

**重要**  
SageMaker AI Edge Manager は 2024 年 4 月 26 日に廃止されました。引き続きモデルをエッジデバイスにデプロイする方法の詳細については、「[SageMaker AI Edge Manager end of life](https://docs.aws.amazon.com/sagemaker/latest/dg/edge-eol.html)」を参照してください。

Amazon SageMaker AI Edge Manager コンポーネント (`aws.greengrass.SageMakerEdgeManager`) は、SageMaker AI Edge Manager エージェントバイナリをインストールします。

SageMaker AI Edge Manager は、エッジデバイスのモデル管理を提供するため、エッジデバイスのフリートで機械学習モデルを最適化、保護、モニタリング、維持できます。SageMaker AI Edge Manager コンポーネントは、コアデバイスに SageMaker AI Edge Manager エージェントをインストールし、そのライフサイクルを管理します。SageMaker AI Edge Manager を使用して、SageMaker AI Neo でコンパイルされたモデルを Greengrass コアデバイスのモデルコンポーネントとしてパッケージ化して使用することもできます。コアデバイスで SageMaker AI Edge Manager エージェントを使用する方法の詳細については、「[Greengrass コアデバイスで Amazon SageMaker AI Edge Manager を使用する](use-sagemaker-edge-manager.md)」を参照してください。

SageMaker AI Edge Manager コンポーネント v1.3.x は、Edge Manager エージェントバイナリ v1.20220822.836f3023 をインストールします。Edge Manager エージェントのバイナリバージョンの詳細については、「[Edge Manager エージェント](https://docs.aws.amazon.com/sagemaker/latest/dg/edge-device-fleet-about)」を参照してください。

**注記**  
SageMaker AI Edge Manager コンポーネントは、以下でのみ使用できます AWS リージョン。  
米国東部(オハイオ)
米国東部 (バージニア北部)
米国西部 (オレゴン)
欧州 (フランクフルト)
欧州 (アイルランド)
アジアパシフィック (東京)

**Topics**
+ [バージョン](#sagemaker-edge-manager-component-versions)
+ [タイプ](#sagemaker-edge-manager-component-type)
+ [オペレーティングシステム](#sagemaker-edge-manager-component-os-support)
+ [要件](#sagemaker-edge-manager-component-requirements)
+ [依存関係](#sagemaker-edge-manager-component-dependencies)
+ [構成](#sagemaker-edge-manager-component-configuration)
+ [ローカルログファイル](#sagemaker-edge-manager-component-log-file)
+ [変更ログ](#sagemaker-edge-manager-component-changelog)

## バージョン
<a name="sagemaker-edge-manager-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 1.3.x
+ 1.2.x
+ 1.1.x
+ 1.0.x

## タイプ
<a name="sagemaker-edge-manager-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="sagemaker-edge-manager-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="sagemaker-edge-manager-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="sm-edge-manager-component-reqs"></a>
+ <a name="sm-req-core-device"></a>Amazon Linux 2 で実行されている Greengrass コアデバイス、Debian ベースの Linux プラットフォーム (x86\$164 または Armv8)、または Windows (x86\$164)。アカウントをお持ちでない場合は、「[チュートリアル: AWS IoT Greengrass V2 の開始方法](getting-started.md)」を参照してください。
+ <a name="sm-req-python"></a>[Python](https://www.python.org/downloads/) 3.6 以降 (ご使用の Python のバージョン用 `pip` がコアデバイスにインストールされていること)。
+ 次のように設定された [Greengrass デバイスのロール](device-service-role.md): 
  + <a name="sm-req-iam-trust-relationship"></a>次の IAM ポリシーの例で示されているように、`credentials.iot.amazonaws.com` と `sagemaker.amazonaws.com` がロールの継承を可能にする信頼関係。

    ```
    { 
      "Version": "2012-10-17",		 	 	 
      "Statement": [ 
        { 
          "Effect": "Allow", 
          "Principal": {
            "Service": "credentials.iot.amazonaws.com"
           }, 
          "Action": "sts:AssumeRole" 
        },
        { 
          "Effect": "Allow", 
          "Principal": {
            "Service": "sagemaker.amazonaws.com"
          }, 
          "Action": "sts:AssumeRole" 
        } 
      ] 
    }
    ```
  + <a name="sm-req-iam-sagemanakeredgedevicefleetpolicy"></a>[AmazonSageMakerEdgeDeviceFleetPolicy](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/service-role/AmazonSageMakerEdgeDeviceFleetPolicy) IAM マネージドポリシー。
  + <a name="sm-req-iam-s3-putobject"></a>次の IAM ポリシーの例で示されている `s3:PutObject` アクション。

    ```
    {
      "Version": "2012-10-17",		 	 	 
      "Statement": [
        {
          "Action": [
            "s3:PutObject"
          ],
          "Resource": [
            "*"
          ],
          "Effect": "Allow"
        }
      ]
    }
    ```
+ <a name="sm-req-s3-bucket"></a>Greengrass コアデバイス AWS リージョン と同じ AWS アカウント および に作成された Amazon S3 バケット。SageMaker AI Edge Manager では、エッジデバイスフリートを作成するため、またデバイスで推論を実行した際のサンプルデータを保存するために、S3 バケットが必要です。S3 バケットを作成する方法の情報については、「[Amazon S3 の使用を開始](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html)」を参照してください。
+ <a name="sm-req-edge-device-fleet"></a>Greengrass コアデバイスと同じ AWS IoT ロールエイリアスを使用する SageMaker AI エッジデバイスフリート。詳細については、「[エッジデバイスフリートを作成する](get-started-with-edge-manager-on-greengrass.md#create-edge-device-fleet-for-greengrass)」を参照してください。
+ <a name="sm-req-edge-device"></a>SageMaker AI Edge デバイスフリート内のエッジデバイスとして登録された Greengrass コアデバイス。エッジデバイス名は、コアデバイスの AWS IoT モノの名前と一致する必要があります。詳細については、「[Greengrass コアデバイスを登録する](get-started-with-edge-manager-on-greengrass.md#register-greengrass-core-device-in-sme)」を参照してください。

### エンドポイントおよびポート
<a name="sagemaker-edge-manager-component-endpoints"></a>

このコンポーネントは、基本的な操作に必要なエンドポイントとポートに加えて、次のエンドポイントとポートに対し、アウトバウンドリクエストを実行できる必要があります。詳細については、「[プロキシまたはファイアウォールを介したデバイストラフィックを許可する](allow-device-traffic.md)」を参照してください。


| Endpoint | ポート | 必要 | 説明 | 
| --- | --- | --- | --- | 
|  `edge.sagemaker.region.amazonaws.com`  | 443 | はい |  デバイスの登録ステータスを確認し、メトリクスを SageMaker AI に送信します。  | 
|  `*.s3.amazonaws.com`  | 443 | はい |  指定した S3 バケットにキャプチャデータをアップロードします。 `*` は、データをアップロードする各バケットの名前に置き換えることができます。  | 

## 依存関係
<a name="sagemaker-edge-manager-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#sagemaker-edge-manager-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 1.3.5 and 1.3.6 ]

次の表に、このコンポーネントのバージョン 1.3.5 および 1.3.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.3.4 ]

次の表に、このコンポーネントのバージョン 1.3.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.3.3 ]

次の表に、このコンポーネントのバージョン 1.3.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.3.2 ]

次の表に、このコンポーネントのバージョン 1.3.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.3.1 ]

次の表に、このコンポーネントのバージョン 1.3.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.1.1 - 1.3.0 ]

次の表に、このコンポーネントのバージョン 1.1.1～1.3.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.1.0 ]

次の表に、このコンポーネントのバージョン 1.1.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.0.3 ]

次の表に、このコンポーネントのバージョン 1.0.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.0.1 and 1.0.2 ]

次の表に、このコンポーネントのバージョン 1.0.1 および 1.0.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------
#### [ 1.0.0 ]

次の表に、このコンポーネントのバージョン 1.0.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 
| [トークン交換サービス](token-exchange-service-component.md) | >=0.0.0 | ハード | 

------

コンポーネントの依存関係の詳細については、「[コンポーネント recipe のリファレンス](component-recipe-reference.md#recipe-reference-component-dependencies)」を参照してください。

## 構成
<a name="sagemaker-edge-manager-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

**注記**  
このセクションでは、コンポーネントで設定する設定パラメータについて説明します。対応する SageMaker AI Edge Manager 設定の詳細については、「*Amazon SageMaker AI デベロッパーガイド*」の「[Edge Manager Agent](https://docs.aws.amazon.com/sagemaker/latest/dg/edge-device-fleet-about.html#edge-device-fleet-running-agent)」を参照してください。

`DeviceFleetName`  
Greengrass コアデバイスが含まれる SageMaker AI Edge Manager デバイスフリートの名前。  
このコンポーネントをデプロイするときは、 設定の更新でこのパラメータの値を指定する必要があります。

`BucketName`  
キャプチャした推論データのアップロード先の S3 バケットの名前。バケット名には文字列 `sagemaker` が含まれている必要があります。  
`CaptureDataDestination` を `Cloud` に設定した場合、または `CaptureDataPeriodicUpload` を `true` に設定した場合、このコンポーネントをデプロイするときに、設定の更新でこのパラメータの値を指定する必要があります。  
キャプチャデータは、今後の分析用に S3 バケットまたはローカルディレクトリに推論入力、推論結果、追加の推論データをアップロードするために使用する SageMaker AI 機能です。SageMaker AI Edge Manager でキャプチャデータを使用する方法の詳細については、「*Amazon SageMaker AI デベロッパーガイド*」の「[Manage Model](https://docs.aws.amazon.com/sagemaker/latest/dg/edge-manage-model.html#edge-manage-model-capturedata)」を参照してください。

`CaptureDataBatchSize`  
(オプション) エージェントが処理するキャプチャデータ要求のバッチのサイズ。この値は、`CaptureDataBufferSize` で指定したバッファサイズよりも小さくする必要があります。バッファサイズの半分を超えないことをお勧めします。  
エージェントは、バッファ内の要求数が `CaptureDataBatchSize` の数に達したとき、または `CaptureDataPushPeriodSeconds` の間隔が経過したとき、いずれか早いほうの要求バッチを処理します。  
デフォルト: `10`

`CaptureDataBufferSize`  
(オプション) バッファに保存されているキャプチャデータ要求の最大数。  
デフォルト: `30`

`CaptureDataDestination`  
(オプション) キャプチャしたデータを保存する保存先。このパラメータには以下の値があります。  
+ `Cloud` - `BucketName` で指定した S3 バケットにキャプチャデータをアップロードします。
+ `Disk` - キャプチャしたデータをコンポーネントの作業ディレクトリに書き込みます。
`Disk` を指定した場合、`CaptureDataPeriodicUpload` を `true` に設定して、キャプチャしたデータを S3 バケットに定期的にアップロードすることも選択できます。  
デフォルト: `Cloud`

`CaptureDataPeriodicUpload`  
(任意) キャプチャされたデータを定期的にアップロードするかどうかを指定する文字列値。サポートされている値は`true` および `false` です。  
`CaptureDataDestination` を `Disk` に設定し、エージェントがキャプチャしたデータを S3 バケットに定期的にアップロードする場合は、このパラメータを `true` に設定します。  
デフォルト: `false`

`CaptureDataPeriodicUploadPeriodSeconds`  
(オプション) SageMaker AI Edge Manager エージェントがキャプチャしたデータを S3 バケットにアップロードする間隔 (秒)。`CaptureDataPeriodicUpload` を `true` に設定する場合は、このパラメータを使用します。  
デフォルト: `8`

`CaptureDataPushPeriodSeconds`  
(オプション) SageMaker AI Edge Manager エージェントがバッファからのキャプチャデータ要求のバッチを処理する間隔 (秒)。  
エージェントは、バッファ内の要求数が `CaptureDataBatchSize` の数に達したとき、または `CaptureDataPushPeriodSeconds` の間隔が経過したとき、いずれか早いほうの要求バッチを処理します。  
デフォルト: `4`

`CaptureDataBase64EmbedLimit`  
(オプション) SageMaker AI Edge Manager エージェントがアップロードするキャプチャデータの最大サイズ (バイト)。  
デフォルト: `3072`

`FolderPrefix`  
(オプション) エージェントがキャプチャしたデータを書き込むフォルダの名前。`CaptureDataDestination` を `Disk` に設定すると、エージェントは `CaptureDataDiskPath` で指定されたディレクトリにフォルダを作成します。`CaptureDataDestination` を `Cloud` に設定した場合、または `CaptureDataPeriodicUpload` を `true` に設定した場合、エージェントはS3バケットにフォルダを作成します。  
デフォルト: `sme-capture`

`CaptureDataDiskPath`  
この機能は、v1.1.0 以降のバージョンの SageMaker Edge Manager コンポーネントで利用できます。  
(オプション) エージェントがキャプチャされたデータフォルダを作成するフォルダへのパス。`CaptureDataDestination` を `Disk` に設定すると、エージェントはこのディレクトリにキャプチャされたデータフォルダを作成します。この値を指定しない場合、エージェントがキャプチャデータフォルダをコンポーネントの作業ディレクトリに作成します。`FolderPrefix` パラメータを使用して、キャプチャされたデータフォルダの名前を指定します。  
デフォルト: `/greengrass/v2/work/aws.greengrass.SageMakerEdgeManager/capture`

`LocalDataRootPath`  
この機能は、v1.2.0 以降のバージョンの SageMaker Edge Manager コンポーネントで利用できます。  
(オプション) このコンポーネントがコアデバイス上の次のデータを保存するパス。  
+ `DbEnable` を `true` に設定したときのランタイムデータのローカルデータベース。
+ `DeploymentEnable` を `true` に設定すると、このコンポーネントによって自動的にダウンロードされる SageMaker AI Neo でコンパイルされたモデル。
デフォルト: `/greengrass/v2/work/aws.greengrass.SageMakerEdgeManager`

`DbEnable`  
(オプション) このコンポーネントを有効にすると、コンポーネントに障害が発生したり、デバイスの電源が切れたりした場合に備えて、ランタイムデータをローカルデータベースに保存してデータを保全できます。  
このデータベースには、コアデバイスのファイルシステムに 5 MB のストレージが必要です。  
デフォルト: `false`

`DeploymentEnable`  
この機能は、v1.2.0 以降のバージョンの SageMaker Edge Manager コンポーネントで利用できます。  
(オプション) このコンポーネントを有効にすると、Amazon S3 へのアップロード元の SageMaker AI Neo でコンパイルされたモデルを自動的に取得できます。新しいモデルを Amazon S3 にアップロードした後、SageMaker AI Studio または SageMaker AI API を使用して、新しいモデルをこのコアデバイスにデプロイします。この機能を有効にすると、 AWS IoT Greengrass デプロイを作成する必要なく、新しいモデルをコアデバイスにデプロイできます。  
この機能を使用するには、`DbEnable` を `true` に設定する必要があります。この機能では、ローカルデータベースを使用して、 AWS クラウドから取得したモデルを追跡します。
デフォルト: `false`

`DeploymentPollInterval`  
この機能は、v1.2.0 以降のバージョンの SageMaker Edge Manager コンポーネントで利用できます。  
(オプション) このコンポーネントがダウンロードする新しいモデルをチェックする間隔 (分単位)。このオプションは、`DeploymentEnable` を `true` に設定すると適用されます。  
デフォルト: `1440` (1 日)

`DLRBackendOptions`  
この機能は、v1.2.0 以降のバージョンの SageMaker Edge Manager コンポーネントで利用できます。  
(オプション) このコンポーネントが使用する DLR ランタイムに設定する DLR ランタイムフラグ。次のフラグを設定できます。  
+ `TVM_TENSORRT_CACHE_DIR` – TensorRT モデルのキャッシュを有効にします。読み取り/書き込みアクセス許可を持つ既存のフォルダへの絶対パスを指定します。
+ `TVM_TENSORRT_CACHE_DISK_SIZE_MB` – TensorRT モデルのキャッシュフォルダの上限を割り当てます。ディレクトリサイズがこの制限を超えると、最も使用頻度の低いキャッシュされたエンジンが削除されます。デフォルト値は 512 MB です。
例えば、このパラメータを次の値に設定すると、TensorRT モデルのキャッシュを有効にし、キャッシュサイズを 800 MB に制限できます。  

```
TVM_TENSORRT_CACHE_DIR=/data/secured_folder/trt/cache; TVM_TENSORRT_CACHE_DISK_SIZE_MB=800
```

`SagemakerEdgeLogVerbose`  
(オプション) デバッグログ記録を有効にするかどうかを指定する文字列値。サポートされている値は`true` および `false` です。  
デフォルト: `false`

`UnixSocketName`  
(オプション) コアデバイスの SageMaker AI Edge Manager ソケットファイル記述子の場所。  
デフォルト: `/tmp/aws.greengrass.SageMakerEdgeManager.sock`

**Example 例: 設定マージの更新**  
次の設定例では、コアデバイスが *MyEdgeDeviceFleet* の一部であり、エージェントがデバイスと S3 バケットの両方にキャプチャデータを書き込むことを指定しています。この設定により、デバッグログ記録も有効になります。  

```
{
    "DeviceFleetName": "MyEdgeDeviceFleet",
    "BucketName": "amzn-s3-demo-bucket",
    "CaptureDataDestination": "Disk",
    "CaptureDataPeriodicUpload": "true",
    "SagemakerEdgeLogVerbose": "true"    
}
```

## ローカルログファイル
<a name="sagemaker-edge-manager-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.greengrass.SageMakerEdgeManager.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.greengrass.SageMakerEdgeManager.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.SageMakerEdgeManager.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.greengrass.SageMakerEdgeManager.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="sagemaker-edge-manager-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  1.3.6  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  1.3.5  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  1.3.4  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  1.3.3  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  1.3.2  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  1.3.1  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  1.3.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/sagemaker-edge-manager-component.html)  | 
|  1.2.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/sagemaker-edge-manager-component.html)  | 
|  1.1.1  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  1.1.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/sagemaker-edge-manager-component.html)  | 
|  1.0.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  1.0.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/sagemaker-edge-manager-component.html)  | 
|  1.0.1  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  1.0.0  |  当初のバージョン  | 

# DLR イメージ分類
<a name="dlr-image-classification-component"></a>

DLR イメージ分類コンポーネント (`aws.greengrass.DLRImageClassification`) には、[深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr)と resnet-50 モデルを使ってイメージ分類の推論を行うためのサンプル推論コードが含まれています。このコンポーネントは、バリアント [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) と [DLR ランタイム](dlr-component.md) コンポーネントを依存関係として使用することで、DLR とサンプルモデルをダウンロードします。

カスタムトレーニングされた DLR モデルでこの推論コンポーネントを使用するには、依存モデルストアコンポーネントの[カスタムバージョンを作成します](ml-customization.md#override-public-model-store)。独自のカスタム推論コードを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[[create a custom inference component]](ml-customization.md#create-inference-component) (カスタム推論コンポーネントを作成) できます。

**Topics**
+ [バージョン](#dlr-image-classification-component-versions)
+ [タイプ](#dlr-image-classification-component-type)
+ [オペレーティングシステム](#dlr-image-classification-component-os-support)
+ [要件](#dlr-image-classification-component-requirements)
+ [依存関係](#dlr-image-classification-component-dependencies)
+ [構成](#dlr-image-classification-component-configuration)
+ [ローカルログファイル](#dlr-image-classification-component-log-file)
+ [変更ログ](#dlr-image-classification-component-changelog)

## バージョン
<a name="dlr-image-classification-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x
+ 2.0.x

## タイプ
<a name="dlr-image-classification-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="dlr-image-classification-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="dlr-image-classification-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="dlr-image-classification-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#dlr-image-classification-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.13 and 2.1.14 ]

次の表に、このコンポーネントのバージョン 2.1.13 および 2.1.14 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.11 ]

次の表に、このコンポーネントのバージョン 2.1.11 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.4 - 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.4 から 2.1.5 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 
| [DLR イメージ分類モデルストア](dlr-image-classification-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.0.x ]

次の表に、このコンポーネントのバージョン 2.0.x の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | \$12.0.0 | ソフト | 
| DLR イメージ分類モデルストア | \$12.0.0 | ハード | 
| DLR | \$11.3.0 | ソフト | 

------

## 構成
<a name="dlr-image-classification-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

------
#### [ 2.1.x ]

`accessControl`  
<a name="ml-config-accesscontrol-desc"></a>(オプション) コンポーネントがデフォルトの通知トピックにメッセージをパブリッシュできるようにする[承認ポリシー](interprocess-communication.md#ipc-authorization-policies)を含むオブジェクト。  
デフォルト:   

```
{
   "aws.greengrass.ipc.mqttproxy": {
      "aws.greengrass.DLRImageClassification:mqttproxy:1": {
         "policyDescription": "Allows access to publish via topic ml/dlr/image-classification.",
         "operations": [
            "aws.greengrass#PublishToIoTCore"
         ],
         "resources": [
            "ml/dlr/image-classification"
         ]
      }
   }
}
```

`PublishResultsOnTopic`  
<a name="ml-config-publishresultsontopic-desc"></a>(オプション) 推論結果をパブリッシュするトピック。この値を変更する場合は、カスタムトピック名と一致するように `resources` パラメータの `accessControl` の値も変更する必要があります。  
デフォルト: `ml/dlr/image-classification`

`Accelerator`  <a name="ml-config-accelerator"></a>
使用するアクセラレーター。サポートされている値は`cpu` および `gpu` です。  
依存モデルコンポーネントのサンプルモデルは CPU アクセラレーションのみをサポートします。別のカスタムモデルで GPU アクセラレーションを使用するには、[カスタムモデルコンポーネントを作成](ml-customization.md#override-public-model-store)して、パブリックモデルコンポーネントを上書きします。  
デフォルト: `cpu`

`ImageDirectory`  
<a name="ml-config-imagedirectory-desc"></a>(オプション) 推論コンポーネントがイメージを読み取る場所と成る、デバイス上のフォルダへのパス。この値は、読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-imagedirectory-img-default"></a>デフォルト: `/greengrass/v2/packages/artifacts-unarchived/component-name/image_classification/sample_images/`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`ImageName`  
<a name="ml-config-imagename-desc"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトでは、コンポーネントはデフォルトのイメージディレクトリでサンプルイメージを使用します。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-img-default"></a>デフォルト: `cat.jpeg`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
{
    "armv7l": "DLR-resnet50-armv7l-cpu-ImageClassification",
    "aarch64": "DLR-resnet50-aarch64-cpu-ImageClassification",
    "x86_64": "DLR-resnet50-x86_64-cpu-ImageClassification",
    "windows": "DLR-resnet50-win-cpu-ImageClassification"
}
```

`UseCamera`  <a name="ml-config-usecamera"></a>
(オプション) Greengrass コアデバイスに接続されたカメラの画像を使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  
この値を `true` に設定した場合、サンプル推論コードはデバイスのカメラにアクセスし、キャプチャしたイメージでローカルに推論を実行します。`ImageName` と `ImageDirectory` パラメータの値は無視されます。このコンポーネントを実行しているユーザーが、カメラがキャプチャしたイメージを保存する場所への、読み込み/書き込みアクセス権を持っていることを確認します。  
デフォルト: `false`  
このコンポーネントの recipe を表示すると、`UseCamera` 設定パラメータはデフォルト設定には表示されません。ただし、このパラメータの値は、コンポーネントをデプロイするときに、[[configuration merge update]](update-component-configurations.md) (設定マージの更新) で変更することができます。  
`UseCamera` を `true` に設定する場合は、ランタイムコンポーネントによって作成された仮想環境から推論コンポーネントがカメラにアクセスできるようにするためのシンボルリンクも作成する必要があります。サンプル推論コンポーネントを使用したカメラの使用方法の詳細については、「[コンポーネント設定の更新](ml-tutorial-image-classification-camera.md)」を参照してください。

------
#### [ 2.0.x ]

`MLRootPath`  <a name="ml-config-mlrootpath"></a>
<a name="ml-config-mlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Linux コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-mlrootpath-default-dlr"></a>デフォルト: `/greengrass/v2/work/variant.DLR/greengrass_ml`  
<a name="ml-config-mlrootpath-default-tfl"></a>デフォルト: `/greengrass/v2/work/variant.TensorFlowLite/greengrass_ml`

`Accelerator`  <a name="ml-config-accelerator"></a>
使用するアクセラレーター。サポートされている値は`cpu` および `gpu` です。  
依存モデルコンポーネントのサンプルモデルは CPU アクセラレーションのみをサポートします。別のカスタムモデルで GPU アクセラレーションを使用するには、[カスタムモデルコンポーネントを作成](ml-customization.md#override-public-model-store)して、パブリックモデルコンポーネントを上書きします。  
デフォルト: `cpu`

`ImageName`  
<a name="ml-config-imagename-desc-dlr-1.3.0"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトの場所は です`MLRootPath/images`。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-img-default"></a>デフォルト: `cat.jpeg`

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
armv7l: "DLR-resnet50-armv7l-cpu-ImageClassification"
x86_64: "DLR-resnet50-x86_64-cpu-ImageClassification"
```

------

## ローカルログファイル
<a name="dlr-image-classification-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.greengrass.DLRImageClassification.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.greengrass.DLRImageClassification.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.DLRImageClassification.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.greengrass.DLRImageClassification.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="dlr-image-classification-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  2.1.14  | Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。 | 
|  2.1.13  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.12  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.11  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.7  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.6  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  すべてでリリースされたコンポーネント AWS リージョン。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。 このバージョンは欧州 (ロンドン) では利用できません (`eu-west-2`)。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  <a name="changelog-dlr-image-classification-2.1.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-image-classification-component.html)  | 
|  2.0.4  |  当初のバージョン  | 

# DLR オブジェクトの検出
<a name="dlr-object-detection-component"></a>

DLR オブジェクト検出コンポーネント (`aws.greengrass.DLRObjectDetection`) には、[深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr)とサンプルの事前学習済みモデルを使用してオブジェクト検出推論を実行するサンプル推論コードが含まれています。このコンポーネントは、バリアント [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) と [DLR ランタイム](dlr-component.md) コンポーネントを依存関係として使用することで、DLR とサンプルモデルをダウンロードします。

カスタムトレーニングされた DLR モデルでこの推論コンポーネントを使用するには、依存モデルストアコンポーネントの[カスタムバージョンを作成します](ml-customization.md#override-public-model-store)。独自のカスタム推論コードを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[[create a custom inference component]](ml-customization.md#create-inference-component) (カスタム推論コンポーネントを作成) できます。

**Topics**
+ [バージョン](#dlr-object-detection-component-versions)
+ [タイプ](#dlr-object-detection-component-type)
+ [オペレーティングシステム](#dlr-object-detection-component-os-support)
+ [要件](#dlr-object-detection-component-requirements)
+ [依存関係](#dlr-object-detection-component-dependencies)
+ [構成](#dlr-object-detection-component-configuration)
+ [ローカルログファイル](#dlr-object-detection-component-log-file)
+ [変更ログ](#dlr-object-detection-component-changelog)

## バージョン
<a name="dlr-object-detection-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x
+ 2.0.x

## タイプ
<a name="dlr-object-detection-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="dlr-object-detection-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="dlr-object-detection-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="dlr-object-detection-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#dlr-object-detection-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.13 and 2.1.14 ]

次の表に、このコンポーネントのバージョン 2.1.13 および 2.1.14 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.11 ]

次の表に、このコンポーネントのバージョン 2.1.11 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.4 - 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.4 から 2.1.5 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 
| [DLR オブジェクト検出モデルストア](dlr-object-detection-model-store-component.md) | \$12.1.0 | ハード | 
| [DLR](dlr-component.md) | \$11.6.0 | ハード | 

------
#### [ 2.0.x ]

次の表に、このコンポーネントのバージョン 2.0.x の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | \$12.0.0 | ソフト | 
| DLR オブジェクト検出モデルストア | \$12.0.0 | ハード | 
| DLR | \$11.3.0 | ソフト | 

------

## 構成
<a name="dlr-object-detection-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

------
#### [ 2.1.x ]

`accessControl`  
<a name="ml-config-accesscontrol-desc"></a>(オプション) コンポーネントがデフォルトの通知トピックにメッセージをパブリッシュできるようにする[承認ポリシー](interprocess-communication.md#ipc-authorization-policies)を含むオブジェクト。  
デフォルト:   

```
{
   "aws.greengrass.ipc.mqttproxy": {
      "aws.greengrass.DLRObjectDetection:mqttproxy:1": {
         "policyDescription": "Allows access to publish via topic ml/dlr/object-detection.",
         "operations": [
            "aws.greengrass#PublishToIoTCore"
         ],
         "resources": [
            "ml/dlr/object-detection"
         ]
      }
   }
}
```

`PublishResultsOnTopic`  
<a name="ml-config-publishresultsontopic-desc"></a>(オプション) 推論結果をパブリッシュするトピック。この値を変更する場合は、カスタムトピック名と一致するように `resources` パラメータの `accessControl` の値も変更する必要があります。  
デフォルト: `ml/dlr/object-detection`

`Accelerator`  <a name="ml-config-accelerator"></a>
使用するアクセラレーター。サポートされている値は`cpu` および `gpu` です。  
依存モデルコンポーネントのサンプルモデルは CPU アクセラレーションのみをサポートします。別のカスタムモデルで GPU アクセラレーションを使用するには、[カスタムモデルコンポーネントを作成](ml-customization.md#override-public-model-store)して、パブリックモデルコンポーネントを上書きします。  
デフォルト: `cpu`

`ImageDirectory`  
<a name="ml-config-imagedirectory-desc"></a>(オプション) 推論コンポーネントがイメージを読み取る場所と成る、デバイス上のフォルダへのパス。この値は、読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-imagedirectory-obj-default"></a>デフォルト: `/greengrass/v2/packages/artifacts-unarchived/component-name/object_detection/sample_images/`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`ImageName`  
<a name="ml-config-imagename-desc"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトでは、コンポーネントはデフォルトのイメージディレクトリでサンプルイメージを使用します。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-obj-default"></a>デフォルト: `objects.jpg`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
{
    "armv7l": "DLR-yolo3-armv7l-cpu-ObjectDetection",
    "aarch64": "DLR-yolo3-aarch64-gpu-ObjectDetection",
    "x86_64": "DLR-yolo3-x86_64-cpu-ObjectDetection",
    "windows": "DLR-resnet50-win-cpu-ObjectDetection"
}
```

`UseCamera`  <a name="ml-config-usecamera"></a>
(オプション) Greengrass コアデバイスに接続されたカメラの画像を使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  
この値を `true` に設定した場合、サンプル推論コードはデバイスのカメラにアクセスし、キャプチャしたイメージでローカルに推論を実行します。`ImageName` と `ImageDirectory` パラメータの値は無視されます。このコンポーネントを実行しているユーザーが、カメラがキャプチャしたイメージを保存する場所への、読み込み/書き込みアクセス権を持っていることを確認します。  
デフォルト: `false`  
このコンポーネントの recipe を表示すると、`UseCamera` 設定パラメータはデフォルト設定には表示されません。ただし、このパラメータの値は、コンポーネントをデプロイするときに、[[configuration merge update]](update-component-configurations.md) (設定マージの更新) で変更することができます。  
`UseCamera` を `true` に設定する場合は、ランタイムコンポーネントによって作成された仮想環境から推論コンポーネントがカメラにアクセスできるようにするためのシンボルリンクも作成する必要があります。サンプル推論コンポーネントを使用したカメラの使用方法の詳細については、「[コンポーネント設定の更新](ml-tutorial-image-classification-camera.md)」を参照してください。

------
#### [ 2.0.x ]

`MLRootPath`  <a name="ml-config-mlrootpath"></a>
<a name="ml-config-mlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Linux コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-mlrootpath-default-dlr"></a>デフォルト: `/greengrass/v2/work/variant.DLR/greengrass_ml`  
<a name="ml-config-mlrootpath-default-tfl"></a>デフォルト: `/greengrass/v2/work/variant.TensorFlowLite/greengrass_ml`

`Accelerator`  
変更しないでください。現在、アクセラレータでサポートされる値は `cpu` のみとなります。これは、依存モデルコンポーネントのモデルは CPU アクセラレータに対してのみコンパイルされるからです。

`ImageName`  
<a name="ml-config-imagename-desc-dlr-1.3.0"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトの場所は です`MLRootPath/images`。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-obj-default"></a>デフォルト: `objects.jpg`

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
{
    armv7l: "DLR-yolo3-armv7l-cpu-ObjectDetection",
    x86_64: "DLR-yolo3-x86_64-cpu-ObjectDetection"
}
```

------

## ローカルログファイル
<a name="dlr-object-detection-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.greengrass.DLRObjectDetection.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.greengrass.DLRObjectDetection.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.DLRObjectDetection.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.greengrass.DLRObjectDetection.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="dlr-object-detection-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  2.1.14  | Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。 | 
|  2.1.13  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.12  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.11  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.7  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.6  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  すべてでリリースされたコンポーネント AWS リージョン。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。 このバージョンは欧州 (ロンドン) では利用できません (`eu-west-2`)。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  <a name="changelog-dlr-object-detection-2.1.2"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-object-detection-component.html)  | 
|  2.1.1  |  <a name="changelog-dlr-object-detection-2.1.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-object-detection-component.html)  | 
|  2.0.4  |  当初のバージョン  | 

# DLR イメージ分類モデルストア
<a name="dlr-image-classification-model-store-component"></a>

DLR イメージ分類モデルストアは、Greengrass アーティファクトとして事前学習済みの ResNet-50 モデルを含む機械学習モデルコンポーネントです。このコンポーネントで使用される事前学習済みモデルは、[GluonCV Model Zoo](https://cv.gluon.ai/model_zoo/index.html) から取得され、SageMaker AI Neo [深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr)を使用してコンパイルされます。

[DLR イメージ分類](dlr-image-classification-component.md)推論コンポーネントは、このコンポーネントをモデルソースの依存関係として使用します。カスタムトレーニングされた DLR モデルを使用するには、このモデルコンポーネントの [カスタムバージョンを作成](ml-customization.md#override-public-model-store)し、カスタムモデルをコンポーネントアーティファクトとして含めます。このコンポーネントの recipe をテンプレートとして使用して、カスタムモデルコンポーネントを作成できます。

**注記**  
DLR イメージ分類モデルストアコンポーネントの名前は、そのバージョンによって異なります。2.1.x 以降のバージョンのコンポーネント名は `variant.DLR.ImageClassification.ModelStore` です。バージョン 2.0.x のコンポーネント名は `variant.ImageClassification.ModelStore` です。

**Topics**
+ [バージョン](#dlr-image-classification-model-store-component-versions)
+ [タイプ](#dlr-image-classification-model-store-component-type)
+ [オペレーティングシステム](#dlr-image-classification-model-store-component-os-support)
+ [要件](#dlr-image-classification-model-store-component-requirements)
+ [依存関係](#dlr-image-classification-model-store-component-dependencies)
+ [構成](#dlr-image-classification-model-store-component-configuration)
+ [ローカルログファイル](#dlr-image-classification-model-store-component-log-file)
+ [変更ログ](#dlr-image-classification-model-store-component-changelog)

## バージョン
<a name="dlr-image-classification-model-store-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x (`variant.DLR.ImageClassification.ModelStore`) 
+ 2.0.x (`variant.ImageClassification.ModelStore`) 

## タイプ
<a name="dlr-image-classification-model-store-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="dlr-image-classification-model-store-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="dlr-image-classification-model-store-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="dlr-image-classification-model-store-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#dlr-image-classification-model-store-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.12 - 2.1.14 ]

次の表に、このコンポーネントのバージョン 2.1.12 および 2.1.13 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 

------
#### [ 2.1.11 ]

次の表に、このコンポーネントのバージョン 2.1.11 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------
#### [ 2.0.x ]

次の表に、このコンポーネントのバージョン 2.0.x の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | \$12.0.0 | ソフト | 

------

## 構成
<a name="dlr-image-classification-model-store-component-configuration"></a>

このコンポーネントに設定パラメータはありません。

## ローカルログファイル
<a name="dlr-image-classification-model-store-component-log-file"></a>

このコンポーネントはログを出力しません。

## 変更ログ
<a name="dlr-image-classification-model-store-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  2.1.13  | Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。 | 
|  2.1.12  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.11  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.6  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-image-classification-model-store-component.html)  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  <a name="changelog-dlr-image-classification-model-store-2.1.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-image-classification-model-store-component.html)  | 
|  2.0.4  |  当初のバージョン  | 

# DLR オブジェクト検出モデルストア
<a name="dlr-object-detection-model-store-component"></a>

DLR オブジェクト検出モデルストアは、Greengrass アーティファクトとして事前学習済みの YOLOv3 モデルを含む機械学習モデルコンポーネントです。このコンポーネントで使用されるサンプルモデルは、[GluonCV Model Zoo](https://cv.gluon.ai/model_zoo/index.html) から取得され、SageMaker AI Neo [深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr)を使用してコンパイルされます。

[DLR オブジェクト検出](dlr-object-detection-component.md)推論コンポーネントは、このコンポーネントをモデルソースの依存関係として使用します。カスタムトレーニングされた DLR モデルを使用するには、このモデルコンポーネントの [カスタムバージョンを作成](ml-customization.md#override-public-model-store)し、カスタムモデルをコンポーネントアーティファクトとして含めます。このコンポーネントの recipe をテンプレートとして使用して、カスタムモデルコンポーネントを作成できます。

**注記**  
DLR オブジェクト検出モデルストアコンポーネントの名前は、そのバージョンによって異なります。2.1.x 以降のバージョンのコンポーネント名は `variant.DLR.ObjectDetection.ModelStore` です。バージョン 2.0.x のコンポーネント名は `variant.ObjectDetection.ModelStore` です。

**Topics**
+ [バージョン](#dlr-object-detection-model-store-component-versions)
+ [タイプ](#dlr-object-detection-model-store-component-type)
+ [オペレーティングシステム](#dlr-object-detection-model-store-component-os-support)
+ [要件](#dlr-object-detection-model-store-component-requirements)
+ [依存関係](#dlr-object-detection-model-store-component-dependencies)
+ [構成](#dlr-object-detection-model-store-component-configuration)
+ [ローカルログファイル](#dlr-object-detection-model-store-component-log-file)
+ [変更ログ](#dlr-object-detection-model-store-component-changelog)

## バージョン
<a name="dlr-object-detection-model-store-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x 
+ 2.0.x

## タイプ
<a name="dlr-object-detection-model-store-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="dlr-object-detection-model-store-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="dlr-object-detection-model-store-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="dlr-object-detection-model-store-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#dlr-object-detection-model-store-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.13 and 2.1.14 ]

次の表に、このコンポーネントのバージョン 2.1.13 および 2.1.14 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 

------
#### [ 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 

------
#### [ 2.1.11 ]

次の表に、このコンポーネントのバージョン 2.1.11 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 2.1.5 and 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.5 および 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------
#### [ 2.0.x ]

次の表に、このコンポーネントのバージョン 2.0.x の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | \$12.0.0 | ソフト | 

------

## 構成
<a name="dlr-object-detection-model-store-component-configuration"></a>

このコンポーネントに設定パラメータはありません。

## ローカルログファイル
<a name="dlr-object-detection-model-store-component-log-file"></a>

このコンポーネントはログを出力しません。

## 変更ログ
<a name="dlr-object-detection-model-store-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  2.1.14  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.1.13  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.12  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.11  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.7  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.6  |  Armv8 (Aarch64) デバイス上の問題を修正する CPU モデルを追加しました。  | 
|  2.1.5  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-object-detection-model-store-component.html)  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  <a name="changelog-dlr-object-detection-model-store-2.1.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-object-detection-model-store-component.html) | 
|  2.0.4  |  当初のバージョン  | 

# DLR ランタイム
<a name="dlr-component"></a>

DLR ランタイムコンポーネント (`variant.DLR`) には、[深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr) (DLR) とその依存関係をお使いのデバイスの仮想環境にインストールするスクリプトが含まれています。[DLR イメージ分類](dlr-image-classification-component.md) および [DLR オブジェクトの検出](dlr-object-detection-component.md) コンポーネントは、DLR をインストールするための依存関係としてこのコンポーネントを使用します。コンポーネントバージョン 1.6.x は DLR v1.6.0 をインストールし、コンポーネントバージョン 1.3.x は DLR v1.3.0 をインストールします。

別のランタイムを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[カスタム機械学習コンポーネントを作成する](ml-customization.md)ことができます。

**Topics**
+ [バージョン](#dlr-component-versions)
+ [タイプ](#dlr-component-type)
+ [オペレーティングシステム](#dlr-component-os-support)
+ [要件](#dlr-component-requirements)
+ [依存関係](#dlr-component-dependencies)
+ [構成](#dlr-component-configuration)
+ [使用方法](#dlr-component-usage)
+ [ローカルログファイル](#dlr-component-log-file)
+ [変更ログ](#dlr-component-changelog)

## バージョン
<a name="dlr-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 1.6.x
+ 1.3.x

## タイプ
<a name="dlr-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="dlr-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="dlr-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

### エンドポイントおよびポート
<a name="dlr-component-endpoints"></a>

デフォルトでは、このコンポーネントは、インストーラスクリプトを使い、コアデバイスが使用するプラットフォームに応じて、`apt`、`yum`、`brew`、および `pip` コマンドを使用してパッケージをインストールします。このコンポーネントは、インストーラスクリプトを実行するために、さまざまなパッケージインデックスおよびリポジトリへのアウトバウンドリクエストを実行できる必要があります。このコンポーネントのアウトバウンドトラフィックがプロキシまたはファイアウォールを通過できるようにするには、コアデバイスがインストールに接続するパッケージインデックスとリポジトリのエンドポイントを特定する必要があります。

このコンポーネントのインストールスクリプトに必要なエンドポイントを特定するときは、次の点を考慮してください。
+ エンドポイントは、コアデバイスのプラットフォームによって異なります。例えば、Ubuntu を実行するコアデバイスでは、`yum` または `brew` ではなく `apt` を使用します。さらに、同じパッケージインデックスを使用するデバイスは、異なるソースリストを持つ可能性があるため、異なるリポジトリからパッケージを取得する場合があります。
+ 各デバイスにはパッケージの取得場所を定義する独自のソースリストがあるため、同じパッケージインデックスを使用する複数のデバイス間でエンドポイントが異なる場合があります。
+ エンドポイントは時間の経過とともに変化する可能性があります。各パッケージインデックスは、パッケージをダウンロードするリポジトリの URL を提供し、パッケージの所有者は、パッケージインデックスが提供する URL を変更できます。

このコンポーネントがインストールする依存関係、およびインストーラスクリプトを無効にする方法の詳細については、「[UseInstaller](#dlr-component-config-useinstaller-term) 設定パラメータ」を参照してください。

基本的な操作に必要なエンドポイントとポートの詳細については、「[プロキシまたはファイアウォールを介したデバイストラフィックを許可する](allow-device-traffic.md)」を参照してください。

## 依存関係
<a name="dlr-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#dlr-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 1.6.11 - 1.6.16 ]

次の表に、このコンポーネントのバージョン 1.6.11 から 1.6.16 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <3.0.0 | ソフト | 

------
#### [ 1.6.10 ]

次の表に、このコンポーネントのバージョン 1.6.10 における依存関係の一覧を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 1.6.9 ]

次の表に、このコンポーネントのバージョン 1.6.9 における依存関係の一覧を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 1.6.8 ]

次の表に、このコンポーネントのバージョン 1.6.8 における依存関係の一覧を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 1.6.6 and 1.6.7 ]

次の表に、このコンポーネントのバージョン 1.6.6 および 1.6.7 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 1.6.4 and 1.6.5 ]

次の表に、このコンポーネントのバージョン 1.6.4 および 1.6.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 1.6.3 ]

次の表に、このコンポーネントのバージョン 1.6.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 1.6.2 ]

次の表に、このコンポーネントのバージョン 1.6.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 1.6.1 ]

次の表に、このコンポーネントのバージョン 1.6.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------
#### [ 1.3.x ]

次の表に、このコンポーネントのバージョン 1.3.x の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | \$12.0.0 | ソフト | 

------

コンポーネントの依存関係の詳細については、「[コンポーネント recipe のリファレンス](component-recipe-reference.md#recipe-reference-component-dependencies)」を参照してください。

## 構成
<a name="dlr-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

`MLRootPath`  
<a name="ml-config-mlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Linux コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-mlrootpath-default-dlr"></a>デフォルト: `/greengrass/v2/work/variant.DLR/greengrass_ml`

`WindowsMLRootPath`  
この機能は、このコンポーネントの v1.6.6 以降で利用できます。  
<a name="ml-config-windowsmlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Windows コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-windowsmlrootpath-default-dlr"></a>デフォルト: `C:\greengrass\v2\\work\\variant.DLR\\greengrass_ml`

  `UseInstaller`   
<a name="ml-config-useinstaller-desc-dlr"></a>(オプション) DLR とその依存関係をインストールするために、このコンポーネントでインストーラスクリプトを使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  <a name="ml-config-useinstaller-libraries-dlr"></a>

DLR のインストールにカスタムスクリプトを使用する場合、またはビルド済みの Linux イメージにランタイムの依存関係を含める場合は、この値を `false` に設定します。 AWSが提供する DLR 推論コンポーネントでこのコンポーネントを使用するには、依存関係を含む次のライブラリをインストールし、ML コンポーネント`ggc_user`を実行する などのシステムユーザーが使用できるようにします。
+ [Python](https://www.python.org/downloads/) 3.7 以降 (ご使用のバージョンの Python 用の `pip` を含む)。
+ [深層学習ランタイム](https://github.com/neo-ai/neo-ai-dlr)のバージョン 1.6.0
+ [NumPy](https://numpy.org/install/)。
+ [OpenCV-Python](https://pypi.org/project/opencv-python/)。
+ [AWS IoT Device SDK Python 用 v2](https://github.com/aws/aws-iot-device-sdk-python-v2)。
+ [AWS Common Runtime (CRT) Python](https://github.com/awslabs/aws-crt-python)。
+ [Picamera](https://picamera.readthedocs.io/en/release-1.13/) (Raspberry Pi デバイスのみ)。
+ [`awscam` モジュール](https://docs.aws.amazon.com/deeplens/latest/dg/deeplens-library-awscam-module.html) ( AWS DeepLens デバイス用）。
+ libGL (Linux デバイス用)
<a name="ml-config-useinstaller-default"></a>デフォルト: `true`

## 使用方法
<a name="dlr-component-usage"></a>

このコンポーネントを `UseInstaller` 設定パラメータを `true` 設定した状態で使用し、DLR とその依存関係をデバイスにインストールします。コンポーネントは、DLR に必要な OpenCV および NumPy ライブラリを含む仮想環境をデバイスでセットアップします。

**注記**  <a name="ml-installer-component-usage-note"></a>
このコンポーネントのインストーラスクリプトは、デバイスの仮想環境を設定し、インストールされている機械学習フレームワークを使用するために必要な最新バージョンの追加システムライブラリもインストールします。これにより、デバイスで既存のシステムライブラリがアップグレードされる可能性があります。次の表で、サポートされている各オペレーティングシステムに、このコンポーネントがインストールするライブラリの一覧を確認してください。このインストールプロセスをカスタマイズする場合は、`UseInstaller` 設定パラメータを `false` に設定し、独自のインストーラスクリプトを開発します。


| プラットフォーム | デバイスシステムにインストールされているライブラリ | 仮想環境にインストールされているライブラリ | 
| --- | --- | --- | 
| Armv7l | build-essential, cmake, ca-certificates, git | setuptools, wheel | 
| Amazon Linux 2 | mesa-libGL | なし | 
| Ubuntu | wget | なし | 

推論コンポーネントをデプロイすると、このランタイムコンポーネントはまず、デバイスにすでに DLR とその依存関係がインストールされているかどうかを検証し、インストールされていない場合にはインストールします。

## ローカルログファイル
<a name="dlr-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/variant.DLR.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\variant.DLR.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/variant.DLR.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\variant.DLR.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="dlr-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  1.6.16  |  Greengrass nucleus バージョン 2.12.5 のリリース用にバージョンが更新されました。  | 
|  1.6.12  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-component.html)  | 
|  1.6.11  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  1.6.10  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  1.6.9  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  1.6.8  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  1.6.7  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-component.html)  | 
|  1.6.6  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-component.html)  | 
|  1.6.5  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-component.html)  | 
|  1.6.4  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  1.6.3  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  1.6.2  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  1.6.1  |  <a name="changelog-dlr-1.6.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/dlr-component.html)  | 
|  1.3.2  |  当初のバージョン DLR v1.3.0 をインストールします。  | 

# TensorFlow Lite イメージ分類
<a name="tensorflow-lite-image-classification-component"></a>

TensorFlow Lite イメージ分類コンポーネント (`aws.greengrass.TensorFlowLiteImageClassification`) には、[TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) ランタイムと事前に学習した MobileNet 1.0 量子化モデルのサンプルを使用してイメージ分類推論を実行するためのサンプル推論コードが含まれています。このコンポーネントは、バリアント [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) および [TensorFlow Lite ランタイム](tensorflow-lite-component.md) コンポーネントを依存関係として使用し、TensorFlow Lite ランタイムとサンプルモデルをダウンロードします。

カスタムトレーニングされた TensorFlow Lite モデルでこの推論コンポーネントを使用するには、依存モデルストアコンポーネントの[[create a custom version]](ml-customization.md#override-public-model-store) (カスタムバージョンを作成) します。独自のカスタム推論コードを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[[create a custom inference component]](ml-customization.md#create-inference-component) (カスタム推論コンポーネントを作成) できます。

**Topics**
+ [バージョン](#tensorflow-lite-image-classification-component-versions)
+ [タイプ](#tensorflow-lite-image-classification-component-type)
+ [オペレーティングシステム](#tensorflow-lite-image-classification-component-os-support)
+ [要件](#tensorflow-lite-image-classification-component-requirements)
+ [依存関係](#tensorflow-lite-image-classification-component-dependencies)
+ [構成](#tensorflow-lite-image-classification-component-configuration)
+ [ローカルログファイル](#tensorflow-lite-image-classification-component-log-file)
+ [変更ログ](#tensorflow-lite-image-classification-component-changelog)

## バージョン
<a name="tensorflow-lite-image-classification-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x

## タイプ
<a name="tensorflow-lite-image-classification-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="tensorflow-lite-image-classification-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="tensorflow-lite-image-classification-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="tensorflow-lite-image-classification-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#tensorflow-lite-image-classification-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.11 and 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.11 および 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.0 ]

次の表に、このコンポーネントのバージョン 2.1.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------

## 構成
<a name="tensorflow-lite-image-classification-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

`accessControl`  
<a name="ml-config-accesscontrol-desc"></a>(オプション) コンポーネントがデフォルトの通知トピックにメッセージをパブリッシュできるようにする[承認ポリシー](interprocess-communication.md#ipc-authorization-policies)を含むオブジェクト。  
デフォルト:   

```
{
   "aws.greengrass.ipc.mqttproxy": {
      "aws.greengrass.TensorFlowLiteImageClassification:mqttproxy:1": {
         "policyDescription": "Allows access to publish via topic ml/tflite/image-classification.",
         "operations": [
            "aws.greengrass#PublishToIoTCore"
         ],
         "resources": [
            "ml/tflite/image-classification"
         ]
      }
   }
}
```

`PublishResultsOnTopic`  
<a name="ml-config-publishresultsontopic-desc"></a>(オプション) 推論結果をパブリッシュするトピック。この値を変更する場合は、カスタムトピック名と一致するように `resources` パラメータの `accessControl` の値も変更する必要があります。  
デフォルト: `ml/tflite/image-classification`

`Accelerator`  <a name="ml-config-accelerator"></a>
使用するアクセラレーター。サポートされている値は`cpu` および `gpu` です。  
依存モデルコンポーネントのサンプルモデルは CPU アクセラレーションのみをサポートします。別のカスタムモデルで GPU アクセラレーションを使用するには、[カスタムモデルコンポーネントを作成](ml-customization.md#override-public-model-store)して、パブリックモデルコンポーネントを上書きします。  
デフォルト: `cpu`

`ImageDirectory`  
<a name="ml-config-imagedirectory-desc"></a>(オプション) 推論コンポーネントがイメージを読み取る場所と成る、デバイス上のフォルダへのパス。この値は、読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-imagedirectory-img-default"></a>デフォルト: `/greengrass/v2/packages/artifacts-unarchived/component-name/image_classification/sample_images/`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`ImageName`  
<a name="ml-config-imagename-desc"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトでは、コンポーネントはデフォルトのイメージディレクトリでサンプルイメージを使用します。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-img-default"></a>デフォルト: `cat.jpeg`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
{
    "model": "TensorFlowLite-Mobilenet"
}
```

`UseCamera`  <a name="ml-config-usecamera"></a>
(オプション) Greengrass コアデバイスに接続されたカメラの画像を使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  
この値を `true` に設定した場合、サンプル推論コードはデバイスのカメラにアクセスし、キャプチャしたイメージでローカルに推論を実行します。`ImageName` と `ImageDirectory` パラメータの値は無視されます。このコンポーネントを実行しているユーザーが、カメラがキャプチャしたイメージを保存する場所への、読み込み/書き込みアクセス権を持っていることを確認します。  
デフォルト: `false`  
このコンポーネントの recipe を表示すると、`UseCamera` 設定パラメータはデフォルト設定には表示されません。ただし、このパラメータの値は、コンポーネントをデプロイするときに、[[configuration merge update]](update-component-configurations.md) (設定マージの更新) で変更することができます。  
`UseCamera` を `true` に設定する場合は、ランタイムコンポーネントによって作成された仮想環境から推論コンポーネントがカメラにアクセスできるようにするためのシンボルリンクも作成する必要があります。サンプル推論コンポーネントを使用したカメラの使用方法の詳細については、「[コンポーネント設定の更新](ml-tutorial-image-classification-camera.md)」を参照してください。

## ローカルログファイル
<a name="tensorflow-lite-image-classification-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.greengrass.TensorFlowLiteImageClassification.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.greengrass.TensorFlowLiteImageClassification.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.TensorFlowLiteImageClassification.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.greengrass.TensorFlowLiteImageClassification.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="tensorflow-lite-image-classification-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  バージョン  |  変更  | 
| --- | --- | 
|  2.1.12  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.1.11  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.6  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.0  |  当初のバージョン  | 

# TensorFlow Lite オブジェクト検出
<a name="tensorflow-lite-object-detection-component"></a>

TensorFlow Lite オブジェクト検出コンポーネント (`aws.greengrass.TensorFlowLiteObjectDetection`) には、[TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) を使用してオブジェクト検出推論を実行するためのサンプル推論コードと、トレーニング済みの Single Shot Detection (SSD) MobileNet 1.0 モデルサンプルが含まれています。このコンポーネントは、バリアント [TensorFlow Lite オブジェクト検出モデルストア](tensorflow-lite-object-detection-model-store-component.md) および [TensorFlow Lite ランタイム](tensorflow-lite-component.md) コンポーネントを依存関係として使用し、TensorFlow Lite とサンプルモデルをダウンロードします。

カスタムトレーニングされた TensorFlow Lite モデルでこの推論コンポーネントを使用するには、依存モデルストアコンポーネントの[[create a custom version]](ml-customization.md#override-public-model-store) (カスタムバージョンを作成) できます。独自のカスタム推論コードを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[[create a custom inference component]](ml-customization.md#create-inference-component) (カスタム推論コンポーネントを作成) します。

**Topics**
+ [バージョン](#tensorflow-lite-object-detection-component-versions)
+ [タイプ](#tensorflow-lite-object-detection-component-type)
+ [オペレーティングシステム](#tensorflow-lite-object-detection-component-os-support)
+ [要件](#tensorflow-lite-object-detection-component-requirements)
+ [依存関係](#tensorflow-lite-object-detection-component-dependencies)
+ [構成](#tensorflow-lite-object-detection-component-configuration)
+ [ローカルログファイル](#tensorflow-lite-object-detection-component-log-file)
+ [変更ログ](#tensorflow-lite-object-detection-component-changelog)

## バージョン
<a name="tensorflow-lite-object-detection-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x

## タイプ
<a name="tensorflow-lite-object-detection-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="tensorflow-lite-object-detection-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="tensorflow-lite-object-detection-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="tensorflow-lite-object-detection-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#tensorflow-lite-object-detection-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.11 and 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.11 および 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------
#### [ 2.1.0 ]

次の表に、このコンポーネントのバージョン 2.1.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 
| [TensorFlow Lite イメージ分類モデルストア](tensorflow-lite-image-classification-model-store-component.md) | >=2.1.0 <2.2.0 | ハード | 
| [TensorFlow Lite](tensorflow-lite-component.md) | >=2.5.0 <2.6.0 | ハード | 

------

## 構成
<a name="tensorflow-lite-object-detection-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

`accessControl`  
<a name="ml-config-accesscontrol-desc"></a>(オプション) コンポーネントがデフォルトの通知トピックにメッセージをパブリッシュできるようにする[承認ポリシー](interprocess-communication.md#ipc-authorization-policies)を含むオブジェクト。  
デフォルト:   

```
{
   "aws.greengrass.ipc.mqttproxy": {
      "aws.greengrass.TensorFlowLiteObjectDetection:mqttproxy:1": {
         "policyDescription": "Allows access to publish via topic ml/tflite/object-detection.",
         "operations": [
            "aws.greengrass#PublishToIoTCore"
         ],
         "resources": [
            "ml/tflite/object-detection"
         ]
      }
   }
}
```

`PublishResultsOnTopic`  
<a name="ml-config-publishresultsontopic-desc"></a>(オプション) 推論結果をパブリッシュするトピック。この値を変更する場合は、カスタムトピック名と一致するように `resources` パラメータの `accessControl` の値も変更する必要があります。  
デフォルト: `ml/tflite/object-detection`

`Accelerator`  <a name="ml-config-accelerator"></a>
使用するアクセラレーター。サポートされている値は`cpu` および `gpu` です。  
依存モデルコンポーネントのサンプルモデルは CPU アクセラレーションのみをサポートします。別のカスタムモデルで GPU アクセラレーションを使用するには、[カスタムモデルコンポーネントを作成](ml-customization.md#override-public-model-store)して、パブリックモデルコンポーネントを上書きします。  
デフォルト: `cpu`

`ImageDirectory`  
<a name="ml-config-imagedirectory-desc"></a>(オプション) 推論コンポーネントがイメージを読み取る場所と成る、デバイス上のフォルダへのパス。この値は、読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-imagedirectory-obj-default"></a>デフォルト: `/greengrass/v2/packages/artifacts-unarchived/component-name/object_detection/sample_images/`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`ImageName`  
<a name="ml-config-imagename-desc"></a>(オプション) 推論コンポーネントが予測を行う際の入力として使用するイメージの名前。コンポーネントは、`ImageDirectory` で指定されたフォルダ内のイメージを検索します。デフォルトでは、コンポーネントはデフォルトのイメージディレクトリでサンプルイメージを使用します。 は、`jpeg`、、`jpg`、`png`および のイメージ形式 AWS IoT Greengrass をサポートしています`npy`。  
<a name="ml-config-imagename-obj-default"></a>デフォルト: `objects.jpg`  
`UseCamera` を `true` の値に設定した場合、この設定パラメータは無視されます。

`InferenceInterval`  <a name="ml-config-inferenceinterval"></a>
(オプション) 推論コードによって行われた各予測間の時間 (秒単位)。サンプル推論コードは無期限に実行され、指定された時間間隔で予測を繰り返します。例えば、カメラで撮影したイメージをリアルタイム予測に使用する場合などには、この間隔を短い間隔に変更できます。  
デフォルト: `3600`

`ModelResourceKey`  <a name="ml-config-modelresourcekey"></a>
<a name="ml-config-modelresourcekey-desc"></a>(オプション) 依存パブリックモデルコンポーネントで使用されるモデル。このパラメータを変更するのは、パブリックモデルコンポーネントをカスタムコンポーネントでオーバーライドする場合のみです。  
デフォルト:  

```
{
    "model": "TensorFlowLite-SSD"
}
```

`UseCamera`  <a name="ml-config-usecamera"></a>
(オプション) Greengrass コアデバイスに接続されたカメラの画像を使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  
この値を `true` に設定した場合、サンプル推論コードはデバイスのカメラにアクセスし、キャプチャしたイメージでローカルに推論を実行します。`ImageName` と `ImageDirectory` パラメータの値は無視されます。このコンポーネントを実行しているユーザーが、カメラがキャプチャしたイメージを保存する場所への、読み込み/書き込みアクセス権を持っていることを確認します。  
デフォルト: `false`  
このコンポーネントの recipe を表示すると、`UseCamera` 設定パラメータはデフォルト設定には表示されません。ただし、このパラメータの値は、コンポーネントをデプロイするときに、[[configuration merge update]](update-component-configurations.md) (設定マージの更新) で変更することができます。  
`UseCamera` を `true` に設定する場合は、ランタイムコンポーネントによって作成された仮想環境から推論コンポーネントがカメラにアクセスできるようにするためのシンボルリンクも作成する必要があります。サンプル推論コンポーネントを使用したカメラの使用方法の詳細については、「[コンポーネント設定の更新](ml-tutorial-image-classification-camera.md)」を参照してください。

**注記**  <a name="ml-config-not-visible-note"></a>
このコンポーネントの recipe を表示すると、`UseCamera` 設定パラメータはデフォルト設定には表示されません。ただし、このパラメータの値は、コンポーネントをデプロイするときに、[[configuration merge update]](update-component-configurations.md) (設定マージの更新) で変更することができます。  
`UseCamera` を `true` に設定する場合は、ランタイムコンポーネントによって作成された仮想環境から推論コンポーネントがカメラにアクセスできるようにするためのシンボルリンクも作成する必要があります。サンプル推論コンポーネントを使用したカメラの使用方法の詳細については、「[コンポーネント設定の更新](ml-tutorial-image-classification-camera.md)」を参照してください。

## ローカルログファイル
<a name="tensorflow-lite-object-detection-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.greengrass.TensorFlowLiteObjectDetection.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.greengrass.TensorFlowLiteObjectDetection.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.greengrass.TensorFlowLiteObjectDetection.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.greengrass.TensorFlowLiteObjectDetection.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="tensorflow-lite-object-detection-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  バージョン  |  変更  | 
| --- | --- | 
|  2.1.12  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.1.11  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.6  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  <a name="changelog-tensorflow-lite-object-detection-2.1.1"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/tensorflow-lite-object-detection-component.html)  | 
|  2.1.0  |  当初のバージョン  | 

# TensorFlow Lite イメージ分類モデルストア
<a name="tensorflow-lite-image-classification-model-store-component"></a>

TensorFlow Lite イメージ分類モデルストア (`variant.TensorFlowLite.ImageClassification.ModelStore`) は、Greengrass アーティファクトとして事前トレーニングされた MobileNet v1 モデルを含む機械学習モデルコンポーネントです。このコンポーネントで使用されるサンプルモデルは、[TensorFlow Hub ](https://tfhub.dev/) からフェッチされ、[TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) を使用して実装されます。

[TensorFlow Lite イメージ分類](tensorflow-lite-image-classification-component.md) 推論コンポーネントは、このコンポーネントをモデルソースの依存関係として使用します。カスタムトレーニングされた TensorFlow Lite モデルを使用するには、このモデルコンポーネントの [[create a custom version]](ml-customization.md#override-public-model-store) (カスタムバージョンを作成) し、カスタムモデルをコンポーネントアーティファクトとして含めます。このコンポーネントの recipe をテンプレートとして使用して、カスタムモデルコンポーネントを作成できます。

**Topics**
+ [バージョン](#tensorflow-lite-image-classification-model-store-component-versions)
+ [タイプ](#tensorflow-lite-image-classification-model-store-component-type)
+ [オペレーティングシステム](#tensorflow-lite-image-classification-model-store-component-os-support)
+ [要件](#tensorflow-lite-image-classification-model-store-component-requirements)
+ [依存関係](#tensorflow-lite-image-classification-model-store-component-dependencies)
+ [構成](#tensorflow-lite-image-classification-model-store-component-configuration)
+ [ローカルログファイル](#tensorflow-lite-image-classification-model-store-component-log-file)
+ [変更ログ](#tensorflow-lite-image-classification-model-store-component-changelog)

## バージョン
<a name="tensorflow-lite-image-classification-model-store-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x

## タイプ
<a name="tensorflow-lite-image-classification-model-store-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="tensorflow-lite-image-classification-model-store-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="tensorflow-lite-image-classification-model-store-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="tensorflow-lite-image-classification-model-store-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#tensorflow-lite-image-classification-model-store-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.11 and 2.1.12  ]

次の表に、このコンポーネントのバージョン 2.1.11 および 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 2.1.0 ]

次の表に、このコンポーネントのバージョン 2.1.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------

## 構成
<a name="tensorflow-lite-image-classification-model-store-component-configuration"></a>

このコンポーネントに設定パラメータはありません。

## ローカルログファイル
<a name="tensorflow-lite-image-classification-model-store-component-log-file"></a>

このコンポーネントはログを出力しません。

## 変更ログ
<a name="tensorflow-lite-image-classification-model-store-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  バージョン  |  変更  | 
| --- | --- | 
|  2.1.12  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.1.11  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.6  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.0  |  当初のバージョン  | 

# TensorFlow Lite オブジェクト検出モデルストア
<a name="tensorflow-lite-object-detection-model-store-component"></a>

TensorFlow Lite オブジェクト検出モデルストア (`variant.TensorFlowLite.ObjectDetection.ModelStore`) は、Greengrass アーティファクトとして事前トレーニングされた Single Shot Detection (SSD) MobileNet モデルを含む機械学習モデルコンポーネントです。このコンポーネントで使用されるサンプルモデルは、[TensorFlow Hub ](https://tfhub.dev/) からフェッチされ、[TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) を使用して実装されます。

[[TensorFlow Lite object detection]](tensorflow-lite-object-detection-component.md) (TensorFlow Lite オブジェクト検出) 推論コンポーネントは、このコンポーネントをモデルソースの依存関係として使用します。カスタムトレーニングされた TensorFlow Lite モデルを使用するには、このモデルコンポーネントの [[create a custom version]](ml-customization.md#override-public-model-store) (カスタムバージョンを作成) し、カスタムモデルをコンポーネントアーティファクトとして含めます。このコンポーネントの recipe をテンプレートとして使用して、カスタムモデルコンポーネントを作成できます。

**Topics**
+ [バージョン](#tensorflow-lite-object-detection-model-store-component-versions)
+ [タイプ](#tensorflow-lite-object-detection-model-store-component-type)
+ [オペレーティングシステム](#tensorflow-lite-object-detection-model-store-component-os-support)
+ [要件](#tensorflow-lite-object-detection-model-store-component-requirements)
+ [依存関係](#tensorflow-lite-object-detection-model-store-component-dependencies)
+ [構成](#tensorflow-lite-object-detection-model-store-component-configuration)
+ [ローカルログファイル](#tensorflow-lite-object-detection-model-store-component-log-file)
+ [変更ログ](#tensorflow-lite-object-detection-model-store-component-changelog)

## バージョン
<a name="tensorflow-lite-object-detection-model-store-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.1.x

## タイプ
<a name="tensorflow-lite-object-detection-model-store-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="tensorflow-lite-object-detection-model-store-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="tensorflow-lite-object-detection-model-store-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

## 依存関係
<a name="tensorflow-lite-object-detection-model-store-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#tensorflow-lite-object-detection-model-store-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.1.11 and 2.1.12 ]

次の表に、このコンポーネントのバージョン 2.1.11 および 2.1.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 

------
#### [ 2.1.10 ]

次の表に、このコンポーネントのバージョン 2.1.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 

------
#### [ 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 

------
#### [ 2.1.8 ]

次の表に、このコンポーネントのバージョン 2.1.8 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 2.1.0 ]

次の表に、このコンポーネントのバージョン 2.1.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------

## 構成
<a name="tensorflow-lite-object-detection-model-store-component-configuration"></a>

このコンポーネントに設定パラメータはありません。

## ローカルログファイル
<a name="tensorflow-lite-object-detection-model-store-component-log-file"></a>

このコンポーネントはログを出力しません。

## 変更ログ
<a name="tensorflow-lite-object-detection-model-store-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  バージョン  |  変更  | 
| --- | --- | 
|  2.1.12  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.1.11  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.10  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.9  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.8  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.6  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.5  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.1.4  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.1.1  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.1.0  |  当初のバージョン  | 

# TensorFlow Lite ランタイム
<a name="tensorflow-lite-component"></a>

TensorFlow Lite ランタイムコンポーネント (`variant.TensorFlowLite`) には、[TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) バージョン 2.5.0 とその依存関係をデバイスの仮想環境にインストールするスクリプトが含まれています。[TensorFlow Lite イメージ分類](tensorflow-lite-image-classification-component.md)および [TensorFlow Lite オブジェクト検出](tensorflow-lite-object-detection-component.md)コンポーネントは、このランタイムコンポーネントを TensorFlow Lite のインストール時の依存関係として使用します。

**注記**  
TensorFlow Lite ランタイムコンポーネント v2.5.6 以降では、TensorFlow Lite ランタイムの既存のインストールとその依存関係が再インストールされます。この再インストールは、コアデバイスが TensorFlow Lite の互換性のあるバージョンとその依存関係を確実に実行できるようにするのに役立ちます。

別のランタイムを使用するには、このコンポーネントの recipe をテンプレートとして使用して、[カスタム機械学習コンポーネントを作成する](ml-customization.md)ことができます。

**Topics**
+ [バージョン](#tensorflow-lite-component-versions)
+ [タイプ](#tensorflow-lite-component-type)
+ [オペレーティングシステム](#tensorflow-lite-component-os-support)
+ [要件](#tensorflow-lite-component-requirements)
+ [依存関係](#tensorflow-lite-component-dependencies)
+ [構成](#tensorflow-lite-component-configuration)
+ [使用方法](#tensorflow-lite-component-usage)
+ [ローカルログファイル](#tensorflow-lite-component-log-file)
+ [変更ログ](#tensorflow-lite-component-changelog)

## バージョン
<a name="tensorflow-lite-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.5.x

## タイプ
<a name="tensorflow-lite-component-type"></a>

<a name="public-component-type-generic"></a>この<a name="public-component-type-generic-phrase"></a>コンポーネントはジェネリックコンポーネント (`aws.greengrass.generic`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、コンポーネントのライフサイクルスクリプトを実行します。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="tensorflow-lite-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="tensorflow-lite-component-requirements"></a>

このコンポーネントには次の要件があります。<a name="ml-component-requirements"></a>
+ Amazon Linux 2 または Ubuntu 18.04 を実行している Greengrass コアデバイスの場合は、[GNU C ライブラリ](https://www.gnu.org/software/libc/) (glibc) バージョン 2.27 以降がデバイスにインストールされている必要があります。
+ Raspberry Pi などの Armv7l デバイスでは、OpenCV-Python の依存関係がデバイスにインストールされています。次のコマンドを実行して依存関係をインストールします。

  ```
  sudo apt-get install libopenjp2-7 libilmbase23 libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk-3-0 libwebp-dev
  ```
+ Raspberry Pi OS Bullseye を実行する Raspberry Pi デバイスでは、次の要件を満たす必要があります。
  + デバイスに、NumPy 1.22.4 以降がインストールされていること。Raspberry Pi OS Bullseye には以前のバージョンの NumPy が含まれているため、次のコマンドを実行してデバイスの NumPy をアップグレードできます。

    ```
    pip3 install --upgrade numpy
    ```
  + デバイスで、レガシーカメラスタックが有効になっていること。Raspberry Pi OS Bullseye には、デフォルトで新しいカメラスタックが含まれており有効化されていますが、これには互換性がないるため、レガシーカメラスタックを有効にしておく必要があります。<a name="raspberry-pi-bullseye-enable-legacy-camera-stack"></a>

**レガシーカメラスタックを有効にするには**

    1. 次のコマンドを実行して、Raspberry Pi 設定ツールを開きます。

       ```
       sudo raspi-config
       ```

    1. **[Interface Options]** (インターフェイスオプション) を選択します。

    1. **[Legacy camera]** (レガシーカメラ) を選択して、レガシーカメラスタックを有効にします。

    1. Raspberry Pi を再起動します。

### エンドポイントおよびポート
<a name="tensorflow-lite-component-endpoints"></a>

デフォルトでは、このコンポーネントは、インストーラスクリプトを使い、コアデバイスが使用するプラットフォームに応じて、`apt`、`yum`、`brew`、および `pip` コマンドを使用してパッケージをインストールします。このコンポーネントは、インストーラスクリプトを実行するために、さまざまなパッケージインデックスおよびリポジトリへのアウトバウンドリクエストを実行できる必要があります。このコンポーネントのアウトバウンドトラフィックがプロキシまたはファイアウォールを通過できるようにするには、コアデバイスがインストールに接続するパッケージインデックスとリポジトリのエンドポイントを特定する必要があります。

このコンポーネントのインストールスクリプトに必要なエンドポイントを特定するときは、次の点を考慮してください。
+ エンドポイントは、コアデバイスのプラットフォームによって異なります。例えば、Ubuntu を実行するコアデバイスでは、`yum` または `brew` ではなく `apt` を使用します。さらに、同じパッケージインデックスを使用するデバイスは、異なるソースリストを持つ可能性があるため、異なるリポジトリからパッケージを取得する場合があります。
+ 各デバイスにはパッケージの取得場所を定義する独自のソースリストがあるため、同じパッケージインデックスを使用する複数のデバイス間でエンドポイントが異なる場合があります。
+ エンドポイントは時間の経過とともに変化する可能性があります。各パッケージインデックスは、パッケージをダウンロードするリポジトリの URL を提供し、パッケージの所有者は、パッケージインデックスが提供する URL を変更できます。

このコンポーネントがインストールする依存関係、およびインストーラスクリプトを無効にする方法の詳細については、「[UseInstaller](#tensorflow-lite-component-config-useinstaller-term) 設定パラメータ」を参照してください。

基本的な操作に必要なエンドポイントとポートの詳細については、「[プロキシまたはファイアウォールを介したデバイストラフィックを許可する](allow-device-traffic.md)」を参照してください。

## 依存関係
<a name="tensorflow-lite-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#tensorflow-lite-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.5.14 and 2.5.15 ]

次の表に、このコンポーネントのバージョン 2.5.14 および 2.5.15 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.13.0 | ソフト | 

------
#### [ 2.5.13 ]

次の表に、このコンポーネントのバージョン 2.5.13 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.12.0 | ソフト | 

------
#### [ 2.5.12 ]

次の表に、このコンポーネントのバージョン 2.5.12 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.11.0 | ソフト | 

------
#### [ 2.5.11 ]

次の表に、このコンポーネントのバージョン 2.5.11 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.10.0 | ソフト | 

------
#### [ 2.5.10 ]

次の表に、このコンポーネントのバージョン 2.5.10 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.9.0 | ソフト | 

------
#### [ 2.5.9 ]

次の表に、このコンポーネントのバージョン 2.5.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.8.0 | ソフト | 

------
#### [ 2.5.8 ]

次の表に、このコンポーネントのバージョン 2.5.8 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.7.0 | ソフト | 

------
#### [ 2.5.5 - 2.5.7 ]

次の表に、このコンポーネントのバージョン 2.5.5 から 2.5.7 までの依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.6.0 | ソフト | 

------
#### [ 2.5.3 and 2.5.4 ]

次の表に、このコンポーネントのバージョン 2.5.3 および 2.5.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.5.0 | ソフト | 

------
#### [ 2.5.2 ]

次の表に、このコンポーネントのバージョン 2.5.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.4.0 | ソフト | 

------
#### [ 2.5.1 ]

次の表に、このコンポーネントのバージョン 2.5.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.3.0 | ソフト | 

------
#### [ 2.5.0 ]

次の表に、このコンポーネントのバージョン 2.5.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.0.0 <2.2.0 | ソフト | 

------

コンポーネントの依存関係の詳細については、「[コンポーネント recipe のリファレンス](component-recipe-reference.md#recipe-reference-component-dependencies)」を参照してください。

## 構成
<a name="tensorflow-lite-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

`MLRootPath`  
<a name="ml-config-mlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Linux コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-mlrootpath-default-tfl"></a>デフォルト: `/greengrass/v2/work/variant.TensorFlowLite/greengrass_ml`

`WindowsMLRootPath`  
この機能は、このコンポーネントの v1.6.6 以降で利用できます。  
<a name="ml-config-windowsmlrootpath-desc"></a>(オプション) 推論コンポーネントがイメージを読み取り、推論結果を書き込む Windows コアデバイスのフォルダのパス。この値は、このコンポーネントを実行しているユーザーが読み取り/書き込みアクセス権を持つデバイスの任意の場所に変更できます。  
<a name="ml-config-windowsmlrootpath-default-dlr"></a>デフォルト: `C:\greengrass\v2\\work\\variant.DLR\\greengrass_ml`

  `UseInstaller`   
<a name="ml-config-useinstaller-desc-tfl"></a>(オプション) TensorFlow Lite とその依存関係をインストールするために、このコンポーネントでインストーラスクリプトを使用するかどうかを定義する文字列値。サポートされている値は`true` および `false` です。  <a name="ml-config-useinstaller-libraries-tfl"></a>

TensorFlow Lite のインストールにカスタムスクリプトを使用する場合、またはビルド済みの Linux イメージにランタイムの依存関係を含める場合は、この値を `false` に設定します。 AWSが提供する TensorFlow Lite 推論コンポーネントでこのコンポーネントを使用するには、依存関係を含む次のライブラリをインストールし、ML コンポーネント`ggc_user`を実行する などのシステムユーザーが使用できるようにします。
+ [Python](https://www.python.org/downloads/) 3.8 以降 (ご使用のバージョンの Python 用の `pip` を含む)。
+ [TensorFlow Lite](https://www.tensorflow.org/lite/guide/python) v2.5.0
+ [NumPy](https://numpy.org/install/)
+ [OpenCV-Python](https://pypi.org/project/opencv-python/)
+ [AWS IoT Device SDK Python 用 v2](https://github.com/aws/aws-iot-device-sdk-python-v2)
+ [AWS 共通ランタイム (CRT) Python](https://github.com/awslabs/aws-crt-python)
+ [Picamera](https://picamera.readthedocs.io/en/release-1.13/) (Raspberry Pi デバイス用)
+ [`awscam` モジュール](https://docs.aws.amazon.com/deeplens/latest/dg/deeplens-library-awscam-module.html) ( AWS DeepLens デバイス用)
+ libGL (Linux デバイス用)
<a name="ml-config-useinstaller-default"></a>デフォルト: `true`

## 使用方法
<a name="tensorflow-lite-component-usage"></a>

`UseInstaller` 設定パラメータを `true` に設定してこのコンポーネントを使用して、TensorFlow Lite とその依存コンポーネントをデバイスにインストールします。コンポーネントは、TensorFlow Lite に必要な OpenCV および NumPy ライブラリを含む仮想環境をデバイスでセットアップします。

**注記**  <a name="ml-installer-component-usage-note"></a>
このコンポーネントのインストーラスクリプトは、デバイスの仮想環境を設定し、インストールされている機械学習フレームワークを使用するために必要な最新バージョンの追加システムライブラリもインストールします。これにより、デバイスで既存のシステムライブラリがアップグレードされる可能性があります。次の表で、サポートされている各オペレーティングシステムに、このコンポーネントがインストールするライブラリの一覧を確認してください。このインストールプロセスをカスタマイズする場合は、`UseInstaller` 設定パラメータを `false` に設定し、独自のインストーラスクリプトを開発します。


| プラットフォーム | デバイスシステムにインストールされているライブラリ | 仮想環境にインストールされているライブラリ | 
| --- | --- | --- | 
| Armv7l | build-essential, cmake, ca-certificates, git | setuptools, wheel | 
| Amazon Linux 2 | mesa-libGL | なし | 
| Ubuntu | wget | なし | 

推論コンポーネントをデプロイすると、このランタイムコンポーネントはまず、デバイスにすでに TensorFlow Lite とその依存関係がインストールされているかどうかを検証します。そうでない場合は、ランタイムコンポーネントによってインストールされます。

## ローカルログファイル
<a name="tensorflow-lite-component-log-file"></a>

このコンポーネントは次のログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/variant.TensorFlowLite.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\variant.TensorFlowLite.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/variant.TensorFlowLite.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\variant.TensorFlowLite.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="tensorflow-lite-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  バージョン  |  変更  | 
| --- | --- | 
|  2.5.15  |  Greengrass nucleus 2.12.5 のリリース用にバージョンが更新されました。  | 
|  2.5.14  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.5.13  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.5.12  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.5.11  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.5.10  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.5.9  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.5.8  |  Greengrass nucleus バージョン 2.6.0 のリリース用にバージョンが更新されました。  | 
|  2.5.7  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/tensorflow-lite-component.html)  | 
|  2.5.6  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/tensorflow-lite-component.html)  | 
|  2.5.5  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/tensorflow-lite-component.html)  | 
|  2.5.4  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/tensorflow-lite-component.html)  | 
|  2.5.3  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.5.2  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.5.1  |  Greengrass nucleus バージョン 2.2.0 のリリース用にバージョンが更新されました。  | 
|  2.5.0  |  当初のバージョン  | 