🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

クラス ClassificationModel


  • public class ClassificationModel extends Model
    このクラスは分類モデル向けの高レベルAPIを提供する。ClassificationModel では入力画像の前処理に関する引数を設定できる。ClassificationModel は学習済み重みと設定を含むファイルからネットワークを生成し、入力の前処理を設定し、フォワードパスを実行して top-1 の予測結果を返す。
    • コンストラクタの詳細

      • ClassificationModel

        protected ClassificationModel​(long addr)
      • ClassificationModel

        public ClassificationModel​(java.lang.String model,
                                   java.lang.String config)
        Create classification model from network represented in one of the supported formats. An order of model and config arguments does not matter.
        引数:
        model - 学習済み重みを含むバイナリファイル。
        config - ネットワーク構成を含むテキストファイル。
      • ClassificationModel

        public ClassificationModel​(java.lang.String model)
        Create classification model from network represented in one of the supported formats. An order of model and config arguments does not matter.
        引数:
        model - 学習済み重みを含むバイナリファイル。
      • ClassificationModel

        public ClassificationModel​(Net network)
        Create model from deep learning network.
        引数:
        network - Net オブジェクト。
    • メソッドの詳細

      • setEnableSoftmaxPostProcessing

        public ClassificationModel setEnableSoftmaxPostProcessing​(boolean enable)
        Set enable/disable softmax post processing option. If this option is true, softmax is applied after forward inference within the classify() function to convert the confidences range to [0.0-1.0]. This function allows you to toggle this behavior. Please turn true when not contain softmax layer in model.
        引数:
        enable - classify() 関数内でソフトマックスの後処理を有効にするかどうかを設定する。
        戻り値:
        自動生成
      • getEnableSoftmaxPostProcessing

        public boolean getEnableSoftmaxPostProcessing()
        Get enable/disable softmax post processing option. This option defaults to false, softmax post processing is not applied within the classify() function.
        戻り値:
        自動生成
      • classify

        public void classify​(Mat frame,
                             int[] classId,
                             float[] conf)