🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.dnn
クラス DetectionModel
- java.lang.Object
-
- org.opencv.dnn.Model
-
- org.opencv.dnn.DetectionModel
public class DetectionModel extends Model
このクラスは物体検出ネットワーク向けの高レベルAPIを提供する。DetectionModel では入力画像の前処理に関する引数を設定できる。DetectionModel は学習済み重みと設定を含むファイルからネットワークを生成し、入力の前処理を設定し、フォワードパスを実行して検出結果を返す。DetectionModel では SSD、Faster R-CNN、YOLO のトポロジーがサポートされている。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedDetectionModel​(long addr)DetectionModel​(java.lang.String model)Create detection model from network represented in one of the supported formats.DetectionModel​(java.lang.String model, java.lang.String config)Create detection model from network represented in one of the supported formats.DetectionModel​(Net network)Create model from deep learning network.
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static DetectionModel__fromPtr__​(long addr)voiddetect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes)Given theinputframe, create input blob, run net and return result detections.voiddetect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes, float confThreshold)Given theinputframe, create input blob, run net and return result detections.voiddetect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes, float confThreshold, float nmsThreshold)Given theinputframe, create input blob, run net and return result detections.booleangetNmsAcrossClasses()Getter for nmsAcrossClasses.DetectionModelsetNmsAcrossClasses​(boolean value)nmsAcrossClasses defaults to false, such that when non max suppression is used during the detect() function, it will do so per-class.-
クラス org.opencv.dnn.Model から継承したメソッド
enableWinograd, getNativeObjAddr, predict, setInputCrop, setInputMean, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setOutputNames, setPreferableBackend, setPreferableTarget
-
-
-
-
コンストラクタの詳細
-
DetectionModel
protected DetectionModel​(long addr)
-
DetectionModel
public DetectionModel​(java.lang.String model, java.lang.String config)Create detection model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- 引数:
model- 学習済み重みを含むバイナリファイル。config- ネットワーク構成を含むテキストファイル。
-
DetectionModel
public DetectionModel​(java.lang.String model)
Create detection model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- 引数:
model- 学習済み重みを含むバイナリファイル。
-
DetectionModel
public DetectionModel​(Net network)
Create model from deep learning network.- 引数:
network- Net オブジェクト。
-
-
メソッドの詳細
-
__fromPtr__
public static DetectionModel __fromPtr__​(long addr)
-
setNmsAcrossClasses
public DetectionModel setNmsAcrossClasses​(boolean value)
nmsAcrossClasses defaults to false, such that when non max suppression is used during the detect() function, it will do so per-class. This function allows you to toggle this behaviour.- 引数:
value- nmsAcrossClasses の新しい値- 戻り値:
- 自動生成
-
getNmsAcrossClasses
public boolean getNmsAcrossClasses()
Getter for nmsAcrossClasses. This variable defaults to false, such that when non max suppression is used during the detect() function, it will do so only per-class- 戻り値:
- 自動生成
-
detect
public void detect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes, float confThreshold, float nmsThreshold)
Given theinputframe, create input blob, run net and return result detections.- 引数:
classIds- 検出結果のクラスインデックス。confidences- 対応する信頼度の集合。boxes- バウンディングボックスの集合。confThreshold- 信頼度によってボックスをフィルタリングするために使用するしきい値。nmsThreshold- non maximum suppression で使用するしきい値。frame- 自動生成
-
detect
public void detect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes, float confThreshold)
Given theinputframe, create input blob, run net and return result detections.- 引数:
classIds- 検出結果のクラスインデックス。confidences- 対応する信頼度の集合。boxes- バウンディングボックスの集合。confThreshold- 信頼度によってボックスをフィルタリングするために使用するしきい値。frame- 自動生成
-
detect
public void detect​(Mat frame, MatOfInt classIds, MatOfFloat confidences, MatOfRect boxes)
Given theinputframe, create input blob, run net and return result detections.- 引数:
classIds- 検出結果のクラスインデックス。confidences- 対応する信頼度の集合。boxes- バウンディングボックスの集合。frame- 自動生成
-
-