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

クラス DetectionModel


  • public class DetectionModel extends Model
    このクラスは物体検出ネットワーク向けの高レベルAPIを提供する。DetectionModel では入力画像の前処理に関する引数を設定できる。DetectionModel は学習済み重みと設定を含むファイルからネットワークを生成し、入力の前処理を設定し、フォワードパスを実行して検出結果を返す。DetectionModel では SSD、Faster R-CNN、YOLO のトポロジーがサポートされている。
    • コンストラクタの詳細

      • 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 of model and config arguments 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 of model and config arguments 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 the input frame, 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 the input frame, 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 the input frame, create input blob, run net and return result detections.
        引数:
        classIds - 検出結果のクラスインデックス。
        confidences - 対応する信頼度の集合。
        boxes - バウンディングボックスの集合。
        frame - 自動生成