> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 分類器の設定と画像のロード

> ABBYY FlexiCapture で分類器の学習用バッチを準備します。フォルダーから学習用画像をロードし、参照クラスを手動またはサブフォルダー名で割り当てます。

分類器ごとに、学習用バッチを作成する必要があります。学習用バッチを作成するには、次の手順に従います。

1. 次のいずれかの方法で、分類学習用バッチビューに切り替えます。
   * ツールバーの <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/Button_ClassTrain.gif?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=5a01d791a22f82eea00164772b8a6dcb" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="23" height="23" data-path="images/flexi-capture/Button_ClassTrain.gif" /> ボタンをクリックします。
   * **View** メニューまたは **Classification Training** メニューで **Open Classifier Training Batches** を選択します。
   * **Ctrl+Alt+Shift+B** ショートカットを使用します。
2. バッチの一覧が表示されているペイン内で右クリックし、ショートカットメニューの **New Batch...** をクリックします。
3. **Classification Training** メニューまたは分類器バッチのショートカットメニューで **Change Classification Profile** を選択し、[classification profile](/ja/flexi-capture/classify-profiles) を指定します。
4. **Classification Training** メニューまたは分類器バッチのショートカットメニューで **Change Recall/Precision Priority** を選択し、[precision/recall balance](/ja/flexi-capture/classify-recall-prec) を指定します。
5. 次のいずれかの方法で、学習用画像をバッチに追加します。
   * ツールバーの **Load Images from Folders** ボタン <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonLoadfromfolder.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=aceba8f10a1a740fb0050025a9edb39d" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="30" height="26" data-path="images/flexi-capture/ButtonLoadfromfolder.png" /> をクリックするか、**File** メニューで **Load Images from Folders** を選択します。次に、該当する画像が入ったサブフォルダーを含むフォルダーを選択します。各サブフォルダーには、1 つのクラスに属する画像のみを含めるようにしてください。
   * バッチのコンテキストメニューまたは **File** メニューで **Load Images...** をクリックします。

<Note>
  [Image pre-processing](/ja/flexi-capture/project-settings/image-processing-settings) は、**Load Images...** オプションを使用してバッチに追加したページでのみ利用できます。**Load Images from Folders** を使用して追加した画像は、[Project properties](/ja/flexi-capture/project-settings/project-properties) に従って処理されます。
</Note>

<Note>
  **Image** または **Combined** の分類プロファイルを選択した場合、学習用画像は、分類対象の画像と同じカラースキーム (例: 白黒) である必要があります。
</Note>

6. 次のいずれかの方法で、画像に参照クラスを設定します。
   * **Classification Training** メニューで **Set Class...** をクリックします (ドキュメントを右クリックし、ショートカットメニューの **Set Class...** をクリックすることもできます) 。セクションまたはセクション候補を参照クラスとして使用できます。一覧から参照クラスを選択するか、新しく作成してセクションまたはセクション候補にリンクします。参照クラスは、対応する Document Definition と同じ名前である必要があります。
   * サブフォルダー名に基づいて設定します。画像が **Load Images from Folders** 機能を使用してバッチに追加されている場合は、画像のサブフォルダー名に基づいてクラスを割り当てることができます。該当する画像を選択し、ツールバーの <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonClassesfromsubfolders.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=ef3d19f194445ac58e87efd7a938d3c8" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="31" height="27" data-path="images/flexi-capture/ButtonClassesfromsubfolders.png" /> ボタンをクリックします。あるいは、**Classification Training →** Set Class Based on Subfolder Name を選択します。

<Note>
  クラス名が対応する document definition section の名前と同じ場合は、Class Mapping ダイアログで **Autocorrect...** をクリックすると自動的にリンクされます。詳しくは、[Mapping classes to Document Definition](/ja/flexi-capture/classify-mapping-classes) を参照してください。
</Note>

<div id="assigning-reference-classes-based-on-classification-results">
  ## 分類結果に基づく参照クラスの割り当て
</div>

分類学習に使用する予定の未分類の画像が大量にある場合は、その一部を使って分類器を学習し、残りの画像には分類結果に基づいて参照クラスを割り当てることができます。

* 一部の画像に対して、Set Class.... を使って手動で参照クラスを設定します。
* 分類学習を開始します (ツールバーの **Train** <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonTrain.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=aa5fe8a2f12017288bc7aba1563f5637" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="33" height="29" data-path="images/flexi-capture/ButtonTrain.png" /> ボタン、または **Classification Training** メニューやショートカットメニューの Train を使用します) 。
* 参照クラスが設定されていない残りの画像を選択し、ツールバーにある <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonClassify.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=b389816ac67c23576d5c014347bc8fd3" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="31" height="28" data-path="images/flexi-capture/ButtonClassify.png" /> ボタンをクリックして Classify 機能を実行します。あるいは、**Classification Training** メニューまたはコンテキストメニューから Classify を選択することもできます。学習済みの分類器に基づいて、結果クラスが画像に割り当てられます。
* 選択した画像に対して、**Classification Training** メニューまたはショートカットメニューで Set Class Based on Classification Result をクリックします。すると、それらの画像には結果クラスと同じ参照クラスが割り当てられます。誤った結果クラスが割り当てられた画像については、参照クラスを手動で設定する必要があります。

<Note>
  分類器で既存の認識結果を使用して Document Definitions のマッチングを行う場合は、分類器の学習用バッチのプロパティ (バッチのコンテキストメニュー → **Properties…**) にある **Classification** タブで、Prefer settings from batch type オプションを選択します。これにより、プログラムが全文認識の設定を同期するため、文書を再度認識する必要がなくなり、分類にかかる時間を大幅に短縮できます。
</Note>
