🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.dnn
クラス ClassificationModel
- java.lang.Object
-
- org.opencv.dnn.Model
-
- org.opencv.dnn.ClassificationModel
public class ClassificationModel extends Model
このクラスは分類モデル向けの高レベルAPIを提供する。ClassificationModel では入力画像の前処理に関する引数を設定できる。ClassificationModel は学習済み重みと設定を含むファイルからネットワークを生成し、入力の前処理を設定し、フォワードパスを実行して top-1 の予測結果を返す。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedClassificationModel​(long addr)ClassificationModel​(java.lang.String model)Create classification model from network represented in one of the supported formats.ClassificationModel​(java.lang.String model, java.lang.String config)Create classification model from network represented in one of the supported formats.ClassificationModel​(Net network)Create model from deep learning network.
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static ClassificationModel__fromPtr__​(long addr)voidclassify​(Mat frame, int[] classId, float[] conf)booleangetEnableSoftmaxPostProcessing()Get enable/disable softmax post processing option.ClassificationModelsetEnableSoftmaxPostProcessing​(boolean enable)Set enable/disable softmax post processing option.-
クラス org.opencv.dnn.Model から継承したメソッド
enableWinograd, getNativeObjAddr, predict, setInputCrop, setInputMean, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setOutputNames, setPreferableBackend, setPreferableTarget
-
-
-
-
コンストラクタの詳細
-
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 ofmodelandconfigarguments 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 ofmodelandconfigarguments does not matter.- 引数:
model- 学習済み重みを含むバイナリファイル。
-
ClassificationModel
public ClassificationModel​(Net network)
Create model from deep learning network.- 引数:
network- Net オブジェクト。
-
-
メソッドの詳細
-
__fromPtr__
public static ClassificationModel __fromPtr__​(long addr)
-
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)
-
-