🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.dnn
クラス Dnn
- java.lang.Object
-
- org.opencv.dnn.Dnn
-
public class Dnn extends java.lang.Object
-
-
フィールドの要約
-
コンストラクタの要約
コンストラクタ Constructor Description Dnn()
-
メソッドの要約
全メソッド 静的メソッド 具象メソッド 非推奨メソッド Modifier and Type Method Description static MatblobFromImage​(Mat image)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor, Size size)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor, Size size, Scalar mean)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)Creates 4-dimensional blob from image.static MatblobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)Creates 4-dimensional blob from image.static MatblobFromImages​(java.util.List<Mat> images)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor, Size size)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)Creates 4-dimensional blob from series of images.static MatblobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)Creates 4-dimensional blob from series of images.static MatblobFromImagesWithParams​(java.util.List<Mat> images)Creates 4-dimensional blob from series of images with given params.static voidblobFromImagesWithParams​(java.util.List<Mat> images, Mat blob)static voidblobFromImagesWithParams​(java.util.List<Mat> images, Mat blob, Image2BlobParams param)static MatblobFromImagesWithParams​(java.util.List<Mat> images, Image2BlobParams param)Creates 4-dimensional blob from series of images with given params.static MatblobFromImageWithParams​(Mat image)Creates 4-dimensional blob from image with given params.static voidblobFromImageWithParams​(Mat image, Mat blob)static voidblobFromImageWithParams​(Mat image, Mat blob, Image2BlobParams param)static MatblobFromImageWithParams​(Mat image, Image2BlobParams param)Creates 4-dimensional blob from image with given params.static java.util.List<java.lang.Integer>getAvailableTargets​(int be)static java.lang.StringgetInferenceEngineBackendType()Deprecated.static java.lang.StringgetInferenceEngineCPUType()Returns Inference Engine CPU type.static java.lang.StringgetInferenceEngineVPUType()Returns Inference Engine VPU type.static voidimagesFromBlob​(Mat blob_, java.util.List<Mat> images_)Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector<cv::Mat>).static voidNMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)Performs non maximum suppression given boxes and corresponding scores.static voidNMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)Performs non maximum suppression given boxes and corresponding scores.static voidNMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)Performs non maximum suppression given boxes and corresponding scores.static voidNMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices)Performs batched non maximum suppression on given boxes and corresponding scores across different classes.static voidNMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices, float eta)Performs batched non maximum suppression on given boxes and corresponding scores across different classes.static voidNMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)Performs batched non maximum suppression on given boxes and corresponding scores across different classes.static voidNMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)static voidNMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)static voidNMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)static NetreadNet​(java.lang.String model)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String model, java.lang.String config)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String model, java.lang.String config, java.lang.String framework)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String model, java.lang.String config, java.lang.String framework, int engine)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String framework, MatOfByte bufferModel)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String framework, MatOfByte bufferModel, MatOfByte bufferConfig)Read deep learning network represented in one of the supported formats.static NetreadNet​(java.lang.String framework, MatOfByte bufferModel, MatOfByte bufferConfig, int engine)Read deep learning network represented in one of the supported formats.static NetreadNetFromModelOptimizer​(java.lang.String xml)Load a network from Intel's Model Optimizer intermediate representation.static NetreadNetFromModelOptimizer​(java.lang.String xml, java.lang.String bin)Load a network from Intel's Model Optimizer intermediate representation.static NetreadNetFromModelOptimizer​(MatOfByte bufferModelConfig, MatOfByte bufferWeights)Load a network from Intel's Model Optimizer intermediate representation.static NetreadNetFromONNX​(java.lang.String onnxFile)Reads a network model <a href="https://onnx.ai/">ONNX</a>.static NetreadNetFromONNX​(java.lang.String onnxFile, int engine)Reads a network model <a href="https://onnx.ai/">ONNX</a>.static NetreadNetFromONNX​(MatOfByte buffer)Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.static NetreadNetFromONNX​(MatOfByte buffer, int engine)Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.static NetreadNetFromTensorflow​(java.lang.String model)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(java.lang.String model, java.lang.String config)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(java.lang.String model, java.lang.String config, int engine)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(java.lang.String model, java.lang.String config, int engine, java.util.List<java.lang.String> extraOutputs)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(MatOfByte bufferModel)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig, int engine)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig, int engine, java.util.List<java.lang.String> extraOutputs)Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.static NetreadNetFromTFLite​(java.lang.String model)Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.static NetreadNetFromTFLite​(java.lang.String model, int engine)Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.static NetreadNetFromTFLite​(MatOfByte bufferModel)Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.static NetreadNetFromTFLite​(MatOfByte bufferModel, int engine)Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.static MatreadTensorFromONNX​(java.lang.String path)Creates blob from .pb file.static voidreleaseHDDLPlugin()Release a HDDL plugin.static voidresetMyriadDevice()Release a Myriad device (binded by OpenCV).static java.lang.StringsetInferenceEngineBackendType​(java.lang.String newBackendType)Deprecated.static voidsoftNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices)Performs soft non maximum suppression given boxes and corresponding scores.static voidsoftNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices, long top_k)Performs soft non maximum suppression given boxes and corresponding scores.static voidsoftNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices, long top_k, float sigma)Performs soft non maximum suppression given boxes and corresponding scores.static voidwriteTextGraph​(java.lang.String model, java.lang.String output)Create a text representation for a binary network stored in protocol buffer format.
-
-
-
フィールドの詳細
-
ACTIV_NONE
public static final int ACTIV_NONE
- 関連項目:
- 定数フィールド値
-
ACTIV_MISH
public static final int ACTIV_MISH
- 関連項目:
- 定数フィールド値
-
ACTIV_SWISH
public static final int ACTIV_SWISH
- 関連項目:
- 定数フィールド値
-
ACTIV_SIGMOID
public static final int ACTIV_SIGMOID
- 関連項目:
- 定数フィールド値
-
ACTIV_TANH
public static final int ACTIV_TANH
- 関連項目:
- 定数フィールド値
-
ACTIV_ELU
public static final int ACTIV_ELU
- 関連項目:
- 定数フィールド値
-
ACTIV_HARDSWISH
public static final int ACTIV_HARDSWISH
- 関連項目:
- 定数フィールド値
-
ACTIV_HARDSIGMOID
public static final int ACTIV_HARDSIGMOID
- 関連項目:
- 定数フィールド値
-
ACTIV_GELU
public static final int ACTIV_GELU
- 関連項目:
- 定数フィールド値
-
ACTIV_GELU_APPROX
public static final int ACTIV_GELU_APPROX
- 関連項目:
- 定数フィールド値
-
ACTIV_RELU
public static final int ACTIV_RELU
- 関連項目:
- 定数フィールド値
-
ACTIV_CLIP
public static final int ACTIV_CLIP
- 関連項目:
- 定数フィールド値
-
DNN_ARG_EMPTY
public static final int DNN_ARG_EMPTY
- 関連項目:
- 定数フィールド値
-
DNN_ARG_CONST
public static final int DNN_ARG_CONST
- 関連項目:
- 定数フィールド値
-
DNN_ARG_INPUT
public static final int DNN_ARG_INPUT
- 関連項目:
- 定数フィールド値
-
DNN_ARG_OUTPUT
public static final int DNN_ARG_OUTPUT
- 関連項目:
- 定数フィールド値
-
DNN_ARG_TEMP
public static final int DNN_ARG_TEMP
- 関連項目:
- 定数フィールド値
-
DNN_ARG_PATTERN
public static final int DNN_ARG_PATTERN
- 関連項目:
- 定数フィールド値
-
AUTO_PAD_NONE
public static final int AUTO_PAD_NONE
- 関連項目:
- 定数フィールド値
-
AUTO_PAD_SAME_UPPER
public static final int AUTO_PAD_SAME_UPPER
- 関連項目:
- 定数フィールド値
-
AUTO_PAD_SAME_LOWER
public static final int AUTO_PAD_SAME_LOWER
- 関連項目:
- 定数フィールド値
-
AUTO_PAD_VALID
public static final int AUTO_PAD_VALID
- 関連項目:
- 定数フィールド値
-
DNN_BACKEND_DEFAULT
public static final int DNN_BACKEND_DEFAULT
- 関連項目:
- 定数フィールド値
-
DNN_BACKEND_INFERENCE_ENGINE
public static final int DNN_BACKEND_INFERENCE_ENGINE
- 関連項目:
- 定数フィールド値
-
DNN_BACKEND_OPENCV
public static final int DNN_BACKEND_OPENCV
- 関連項目:
- 定数フィールドの値
-
DNN_BACKEND_VKCOM
public static final int DNN_BACKEND_VKCOM
- 関連項目:
- 定数フィールドの値
-
DNN_BACKEND_CUDA
public static final int DNN_BACKEND_CUDA
- 関連項目:
- 定数フィールドの値
-
DNN_BACKEND_WEBNN
public static final int DNN_BACKEND_WEBNN
- 関連項目:
- 定数フィールドの値
-
DNN_BACKEND_TIMVX
public static final int DNN_BACKEND_TIMVX
- 関連項目:
- 定数フィールドの値
-
DNN_BACKEND_CANN
public static final int DNN_BACKEND_CANN
- 関連項目:
- 定数フィールドの値
-
ENGINE_CLASSIC
public static final int ENGINE_CLASSIC
- 関連項目:
- 定数フィールド値
-
ENGINE_NEW
public static final int ENGINE_NEW
- 関連項目:
- 定数フィールド値
-
ENGINE_AUTO
public static final int ENGINE_AUTO
- 関連項目:
- 定数フィールド値
-
ENGINE_ORT
public static final int ENGINE_ORT
- 関連項目:
- 定数フィールド値
-
DNN_PMODE_NULL
public static final int DNN_PMODE_NULL
- 関連項目:
- 定数フィールドの値
-
DNN_PMODE_CROP_CENTER
public static final int DNN_PMODE_CROP_CENTER
- 関連項目:
- 定数フィールドの値
-
DNN_PMODE_LETTERBOX
public static final int DNN_PMODE_LETTERBOX
- 関連項目:
- 定数フィールドの値
-
LOSS_REDUCTION_NONE
public static final int LOSS_REDUCTION_NONE
- 関連項目:
- 定数フィールド値
-
LOSS_REDUCTION_MEAN
public static final int LOSS_REDUCTION_MEAN
- 関連項目:
- 定数フィールド値
-
LOSS_REDUCTION_SUM
public static final int LOSS_REDUCTION_SUM
- 関連項目:
- 定数フィールド値
-
DNN_MODEL_GENERIC
public static final int DNN_MODEL_GENERIC
- 関連項目:
- 定数フィールド値
-
DNN_MODEL_ONNX
public static final int DNN_MODEL_ONNX
- 関連項目:
- 定数フィールド値
-
DNN_MODEL_TF
public static final int DNN_MODEL_TF
- 関連項目:
- 定数フィールド値
-
DNN_MODEL_TFLITE
public static final int DNN_MODEL_TFLITE
- 関連項目:
- 定数フィールド値
-
OPERATION_AND
public static final int OPERATION_AND
- 関連項目:
- 定数フィールド値
-
OPERATION_EQUAL
public static final int OPERATION_EQUAL
- 関連項目:
- 定数フィールド値
-
OPERATION_GREATER
public static final int OPERATION_GREATER
- 関連項目:
- 定数フィールド値
-
OPERATION_GREATER_EQUAL
public static final int OPERATION_GREATER_EQUAL
- 関連項目:
- 定数フィールド値
-
OPERATION_LESS
public static final int OPERATION_LESS
- 関連項目:
- 定数フィールド値
-
OPERATION_LESS_EQUAL
public static final int OPERATION_LESS_EQUAL
- 関連項目:
- 定数フィールド値
-
OPERATION_OR
public static final int OPERATION_OR
- 関連項目:
- 定数フィールド値
-
OPERATION_POW
public static final int OPERATION_POW
- 関連項目:
- 定数フィールド値
-
OPERATION_XOR
public static final int OPERATION_XOR
- 関連項目:
- 定数フィールド値
-
OPERATION_BITSHIFT
public static final int OPERATION_BITSHIFT
- 関連項目:
- 定数フィールド値
-
OPERATION_MAX
public static final int OPERATION_MAX
- 関連項目:
- 定数フィールド値
-
OPERATION_MEAN
public static final int OPERATION_MEAN
- 関連項目:
- 定数フィールド値
-
OPERATION_MIN
public static final int OPERATION_MIN
- 関連項目:
- 定数フィールド値
-
OPERATION_MOD
public static final int OPERATION_MOD
- 関連項目:
- 定数フィールド値
-
OPERATION_FMOD
public static final int OPERATION_FMOD
- 関連項目:
- 定数フィールド値
-
OPERATION_PROD
public static final int OPERATION_PROD
- 関連項目:
- 定数フィールド値
-
OPERATION_SUB
public static final int OPERATION_SUB
- 関連項目:
- 定数フィールド値
-
OPERATION_SUM
public static final int OPERATION_SUM
- 関連項目:
- 定数フィールド値
-
OPERATION_ADD
public static final int OPERATION_ADD
- 関連項目:
- 定数フィールド値
-
OPERATION_DIV
public static final int OPERATION_DIV
- 関連項目:
- 定数フィールド値
-
OPERATION_WHERE
public static final int OPERATION_WHERE
- 関連項目:
- 定数フィールド値
-
OPERATION_BITWISE_AND
public static final int OPERATION_BITWISE_AND
- 関連項目:
- 定数フィールド値
-
OPERATION_BITWISE_OR
public static final int OPERATION_BITWISE_OR
- 関連項目:
- 定数フィールド値
-
OPERATION_BITWISE_XOR
public static final int OPERATION_BITWISE_XOR
- 関連項目:
- 定数フィールド値
-
DNN_PROFILE_NONE
public static final int DNN_PROFILE_NONE
- 関連項目:
- 定数フィールド値
-
DNN_PROFILE_SUMMARY
public static final int DNN_PROFILE_SUMMARY
- 関連項目:
- 定数フィールド値
-
DNN_PROFILE_DETAILED
public static final int DNN_PROFILE_DETAILED
- 関連項目:
- 定数フィールド値
-
ReduceType_MAX
public static final int ReduceType_MAX
- 関連項目:
- 定数フィールド値
-
ReduceType_MIN
public static final int ReduceType_MIN
- 関連項目:
- 定数フィールド値
-
ReduceType_MEAN
public static final int ReduceType_MEAN
- 関連項目:
- 定数フィールド値
-
ReduceType_SUM
public static final int ReduceType_SUM
- 関連項目:
- 定数フィールド値
-
ReduceType_L1
public static final int ReduceType_L1
- 関連項目:
- 定数フィールド値
-
ReduceType_L2
public static final int ReduceType_L2
- 関連項目:
- 定数フィールド値
-
ReduceType_PROD
public static final int ReduceType_PROD
- 関連項目:
- 定数フィールド値
-
ReduceType_SUM_SQUARE
public static final int ReduceType_SUM_SQUARE
- 関連項目:
- 定数フィールド値
-
ReduceType_LOG_SUM
public static final int ReduceType_LOG_SUM
- 関連項目:
- 定数フィールド値
-
ReduceType_LOG_SUM_EXP
public static final int ReduceType_LOG_SUM_EXP
- 関連項目:
- 定数フィールド値
-
SoftNMSMethod_SOFTNMS_LINEAR
public static final int SoftNMSMethod_SOFTNMS_LINEAR
- 関連項目:
- 定数フィールドの値
-
SoftNMSMethod_SOFTNMS_GAUSSIAN
public static final int SoftNMSMethod_SOFTNMS_GAUSSIAN
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_CPU
public static final int DNN_TARGET_CPU
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_OPENCL
public static final int DNN_TARGET_OPENCL
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_OPENCL_FP16
public static final int DNN_TARGET_OPENCL_FP16
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_MYRIAD
public static final int DNN_TARGET_MYRIAD
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_VULKAN
public static final int DNN_TARGET_VULKAN
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_FPGA
public static final int DNN_TARGET_FPGA
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_CUDA
public static final int DNN_TARGET_CUDA
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_CUDA_FP16
public static final int DNN_TARGET_CUDA_FP16
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_HDDL
public static final int DNN_TARGET_HDDL
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_NPU
public static final int DNN_TARGET_NPU
- 関連項目:
- 定数フィールドの値
-
DNN_TARGET_CPU_FP16
public static final int DNN_TARGET_CPU_FP16
- 関連項目:
- 定数フィールドの値
-
DNN_TRACE_NONE
public static final int DNN_TRACE_NONE
- 関連項目:
- 定数フィールド値
-
DNN_TRACE_ALL
public static final int DNN_TRACE_ALL
- 関連項目:
- 定数フィールド値
-
DNN_TRACE_OP
public static final int DNN_TRACE_OP
- 関連項目:
- 定数フィールド値
-
-
メソッドの詳細
-
getAvailableTargets
public static java.util.List<java.lang.Integer> getAvailableTargets​(int be)
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(java.lang.String model, java.lang.String config, int engine, java.util.List<java.lang.String> extraOutputs)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
model- ネットワークアーキテクチャのバイナリ protobuf 記述を含む .pb ファイルへのパスconfig- protobuf 形式のテキストグラフ定義を含む .pbtxt ファイルへのパス。結果として得られる Net オブジェクトは、バイナリ側の重みを用いてテキストグラフから構築され、より柔軟に扱えるようになる。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが使用される。extraOutputs- グラフ解析器が見つける出力に加えて、モデルの出力を明示的に指定する。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(java.lang.String model, java.lang.String config, int engine)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
model- ネットワークアーキテクチャのバイナリ protobuf 記述を含む .pb ファイルへのパスconfig- protobuf 形式のテキストグラフ定義を含む .pbtxt ファイルへのパス。結果として得られる Net オブジェクトは、バイナリ側の重みを用いてテキストグラフから構築され、より柔軟に扱えるようになる。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが使用される。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(java.lang.String model, java.lang.String config)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
model- ネットワークアーキテクチャのバイナリ protobuf 記述を含む .pb ファイルへのパスconfig- protobuf形式のテキストグラフ定義を含む.pbtxtファイルへのパス。生成されるNetオブジェクトは、バイナリファイルの重みを用いたテキストグラフによって構築されるため、より柔軟に扱える。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(java.lang.String model)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
model- ネットワークアーキテクチャをバイナリprotobufで記述した.pbファイルへのパス。生成されるNetオブジェクトは、バイナリファイルの重みを用いたテキストグラフによって構築されるため、より柔軟に扱える。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig, int engine, java.util.List<java.lang.String> extraOutputs)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
bufferModel- pb ファイルの内容を保持するバッファbufferConfig- pbtxt ファイルの内容を保持するバッファengine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが使用される。extraOutputs- グラフ解析器が見つける出力に加えて、モデルの出力を明示的に指定する。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig, int engine)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
bufferModel- pb ファイルの内容を保持するバッファbufferConfig- pbtxt ファイルの内容を保持するバッファengine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが使用される。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(MatOfByte bufferModel, MatOfByte bufferConfig)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
bufferModel- pb ファイルの内容を保持するバッファbufferConfig- pbtxtファイルの内容を格納したバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTensorflow
public static Net readNetFromTensorflow​(MatOfByte bufferModel)
Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.- 引数:
bufferModel- pbファイルの内容を格納したバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTFLite
public static Net readNetFromTFLite​(java.lang.String model, int engine)
Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.- 引数:
model- ネットワークアーキテクチャのバイナリ flatbuffers 記述を含む .tflite ファイルへのパスengine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTFLite
public static Net readNetFromTFLite​(java.lang.String model)
Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.- 引数:
model- ネットワークアーキテクチャをバイナリflatbuffersで記述した.tfliteファイルへのパス。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTFLite
public static Net readNetFromTFLite​(MatOfByte bufferModel, int engine)
Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.- 引数:
bufferModel- tflite ファイルの内容を保持するバッファengine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNetFromTFLite
public static Net readNetFromTFLite​(MatOfByte bufferModel)
Reads a network model stored in <a href="https://www.tensorflow.org/lite">TFLite</a> framework's format.- 引数:
bufferModel- tfliteファイルの内容を格納したバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- Net オブジェクト。
-
readNet
public static Net readNet​(java.lang.String model, java.lang.String config, java.lang.String framework, int engine)
Read deep learning network represented in one of the supported formats.- 引数:
model- 学習済みの重みを含むバイナリファイル。フレームワークごとに以下のファイル拡張子が想定される: **.pb(TensorFlow, https://www.tensorflow.org/) **.bin|*.onnx(OpenVINO, https://software.intel.com/openvino-toolkit) **.onnx(ONNX, https://onnx.ai/)config- ネットワーク構成を含むテキストファイル。以下の拡張子のファイルが該当する: **.pbtxt(TensorFlow, https://www.tensorflow.org/) **.xml(OpenVINO, https://software.intel.com/openvino-toolkit)framework- フォーマットを判別するための明示的なフレームワーク名のタグ。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Netオブジェクト。この関数は学習済みモデルの元のフレームワークを自動的に検出し、REF: readNetFromTensorflow、REF: readNetFromONNXなどの適切な関数を呼び出す。引数
modelとconfigの順序は問わない。
-
readNet
public static Net readNet​(java.lang.String model, java.lang.String config, java.lang.String framework)
Read deep learning network represented in one of the supported formats.- 引数:
model- 学習済みの重みを含むバイナリファイル。フレームワークごとに以下のファイル拡張子が想定される: **.pb(TensorFlow, https://www.tensorflow.org/) **.bin|*.onnx(OpenVINO, https://software.intel.com/openvino-toolkit) **.onnx(ONNX, https://onnx.ai/)config- ネットワーク構成を含むテキストファイル。以下の拡張子のファイルが該当する: **.pbtxt(TensorFlow, https://www.tensorflow.org/) **.xml(OpenVINO, https://software.intel.com/openvino-toolkit)framework- フォーマットを判定するための明示的なフレームワーク名タグ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Netオブジェクト。この関数は学習済みモデルの元のフレームワークを自動的に検出し、REF: readNetFromTensorflow、REF: readNetFromONNXなどの適切な関数を呼び出す。引数
modelとconfigの順序は問わない。
-
readNet
public static Net readNet​(java.lang.String model, java.lang.String config)
Read deep learning network represented in one of the supported formats.- 引数:
model- 学習済みの重みを含むバイナリファイル。フレームワークごとに以下のファイル拡張子が想定される: **.pb(TensorFlow, https://www.tensorflow.org/) **.bin|*.onnx(OpenVINO, https://software.intel.com/openvino-toolkit) **.onnx(ONNX, https://onnx.ai/)config- ネットワーク構成を含むテキストファイル。以下の拡張子のファイルが該当する: **.pbtxt(TensorFlow, https://www.tensorflow.org/) **.xml(OpenVINO, https://software.intel.com/openvino-toolkit) 新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Netオブジェクト。この関数は学習済みモデルの元のフレームワークを自動的に検出し、REF: readNetFromTensorflow、REF: readNetFromONNXなどの適切な関数を呼び出す。引数
modelとconfigの順序は問わない。
-
readNet
public static Net readNet​(java.lang.String model)
Read deep learning network represented in one of the supported formats.- 引数:
model- 学習済みの重みを含むバイナリファイル。フレームワークごとに以下のファイル拡張子が想定される: **.pb(TensorFlow, https://www.tensorflow.org/) **.bin|*.onnx(OpenVINO, https://software.intel.com/openvino-toolkit) **.onnx(ONNX, https://onnx.ai/) 以下の拡張子のファイル: **.pbtxt(TensorFlow, https://www.tensorflow.org/) **.xml(OpenVINO, https://software.intel.com/openvino-toolkit) 新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Netオブジェクト。この関数は学習済みモデルの元のフレームワークを自動的に検出し、REF: readNetFromTensorflow、REF: readNetFromONNXなどの適切な関数を呼び出す。引数
modelとconfigの順序は問わない。
-
readNet
public static Net readNet​(java.lang.String framework, MatOfByte bufferModel, MatOfByte bufferConfig, int engine)
Read deep learning network represented in one of the supported formats. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.- 引数:
framework- 元フレームワークの名前。bufferModel- 重みを含むバイナリファイルの内容を格納したバッファ。bufferConfig- ネットワーク構成を含むテキストファイルの内容を格納したバッファ。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Net オブジェクト。
-
readNet
public static Net readNet​(java.lang.String framework, MatOfByte bufferModel, MatOfByte bufferConfig)
Read deep learning network represented in one of the supported formats. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.- 引数:
framework- 元フレームワークの名前。bufferModel- 重みを含むバイナリファイルの内容を格納したバッファ。bufferConfig- ネットワーク構成を含むテキストファイルの内容を持つバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Net オブジェクト。
-
readNet
public static Net readNet​(java.lang.String framework, MatOfByte bufferModel)
Read deep learning network represented in one of the supported formats. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.- 引数:
framework- 元フレームワークの名前。bufferModel- 重みを含むバイナリファイルの内容を持つバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。他のバックエンドを使用したい場合はENGINE_CLASSICを使用すること。- 戻り値:
- Net オブジェクト。
-
readNetFromModelOptimizer
public static Net readNetFromModelOptimizer​(java.lang.String xml, java.lang.String bin)
Load a network from Intel's Model Optimizer intermediate representation.- 引数:
xml- ネットワークのトポロジーを記述した XML 構成ファイル。bin- 学習済みの重みを含むバイナリファイル。- 戻り値:
- Net オブジェクト。Intel の Model Optimizer からインポートされたネットワークは、Intel の Inference Engine バックエンドで実行される。
-
readNetFromModelOptimizer
public static Net readNetFromModelOptimizer​(java.lang.String xml)
Load a network from Intel's Model Optimizer intermediate representation.- 引数:
xml- ネットワークのトポロジーを記述した XML 構成ファイル。- 戻り値:
- Net オブジェクト。Intel の Model Optimizer からインポートされたネットワークは、Intel の Inference Engine バックエンドで実行される。
-
readNetFromModelOptimizer
public static Net readNetFromModelOptimizer​(MatOfByte bufferModelConfig, MatOfByte bufferWeights)
Load a network from Intel's Model Optimizer intermediate representation.- 引数:
bufferModelConfig- ネットワークのトポロジーを記述した XML 構成を含むバッファ。bufferWeights- 学習済みの重みのバイナリデータを含むバッファ。- 戻り値:
- Net オブジェクト。Intel の Model Optimizer からインポートされたネットワークは、Intel の Inference Engine バックエンドで実行される。
-
readNetFromONNX
public static Net readNetFromONNX​(java.lang.String onnxFile, int engine)
Reads a network model <a href="https://onnx.ai/">ONNX</a>.- 引数:
onnxFile- ネットワークアーキテクチャのテキスト記述を含む .onnx ファイルへのパス。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- フォワード処理の準備が整ったネットワークオブジェクト。失敗時には例外をスローする。
-
readNetFromONNX
public static Net readNetFromONNX​(java.lang.String onnxFile)
Reads a network model <a href="https://onnx.ai/">ONNX</a>.- 引数:
onnxFile- ネットワークアーキテクチャのテキスト記述を含む.onnxファイルへのパス。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- フォワード処理の準備が整ったネットワークオブジェクト。失敗時には例外をスローする。
-
readNetFromONNX
public static Net readNetFromONNX​(MatOfByte buffer, int engine)
Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.- 引数:
buffer- ONNX モデルのバイト列を格納したメモリ上のバッファ。engine- 使用するDNNエンジンを選択する。自動選択の場合は新しいエンジンが最初に使用され、失敗した場合は従来のエンジンにフォールバックする。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- フォワード処理の準備が整ったネットワークオブジェクト。失敗時には例外をスローする。
-
readNetFromONNX
public static Net readNetFromONNX​(MatOfByte buffer)
Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.- 引数:
buffer- ONNXモデルのバイト列を格納したインメモリバッファ。新しいDNNは現時点ではCPU以外のバックエンドをサポートしていない点に注意すること。- 戻り値:
- フォワード処理の準備が整ったネットワークオブジェクト。失敗時には例外をスローする。
-
readTensorFromONNX
public static Mat readTensorFromONNX​(java.lang.String path)
Creates blob from .pb file.- 引数:
path- 入力テンソルを含む .pb ファイルへのパス。- 戻り値:
- Mat。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。crop- リサイズ後に画像を切り抜くかどうかを示すフラグ。ddepth- 出力 blob のビット深度。CV_32F または CV_8U を選択する。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。crop- リサイズ後に画像を切り抜くかどうかを示すフラグ。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor, Size size, Scalar mean, boolean swapRB)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor, Size size, Scalar mean)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor, Size size)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。size- 出力画像の空間サイズ。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image, double scalefactor)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。scalefactor-imagesの値に対する乗数。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImage
public static Mat blobFromImage​(Mat image)
Creates 4-dimensional blob from image. Optionally resizes and cropsimagefrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
image- 入力画像(1、3、または 4 チャンネル)。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop, int ddepth)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。crop- リサイズ後に画像を切り抜くかどうかを示すフラグ。ddepth- 出力 blob のビット深度。CV_32F または CV_8U を選択する。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。crop- リサイズ後に画像を切り抜くかどうかを示すフラグ。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。swapRB- 3 チャンネル画像において最初と最後のチャンネルを入れ替える必要があることを示すフラグ。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor, Size size, Scalar mean)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。size- 出力画像の空間サイズ。mean- 各チャンネルから減算される平均値を表すスカラ。imageが BGR 順でswapRBが true の場合、値は (mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor, Size size)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。size- 出力画像の空間サイズ。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images, double scalefactor)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。scalefactor-imagesの値に対する乗数。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImages
public static Mat blobFromImages​(java.util.List<Mat> images)
Creates 4-dimensional blob from series of images. Optionally resizes and cropsimagesfrom center, subtractmeanvalues, scales values byscalefactor, swap Blue and Red channels.- 引数:
images- 入力画像群(いずれも 1、3、または 4 チャンネル)。imageが BGR 順でswapRBが true の場合、(mean-R, mean-G, mean-B) の順であることが想定される。3 チャンネル画像において必要となる。cropが true の場合、入力画像はリサイズ後の一辺がsizeの対応する次元と等しくなり、もう一辺がそれと等しいか大きくなるようにリサイズされる。その後、中央から切り抜きが行われる。cropが false の場合、切り抜きは行わず、アスペクト比を保持せずに直接リサイズが行われる。- 戻り値:
- NCHW の次元順序を持つ 4 次元の Mat。覚え書き:
scalefactorとmeanの順序および用法は (input - mean) * scalefactor である。
-
blobFromImageWithParams
public static Mat blobFromImageWithParams​(Mat image, Image2BlobParams param)
Creates 4-dimensional blob from image with given params. This function is an extension of REF: blobFromImage to meet more image preprocess needs. Given input image and preprocessing parameters, and function outputs the blob.- 引数:
image- 入力画像(いずれも 1、3、または 4 チャンネル)。param- Image2BlobParams 構造体。画像から blob への処理に必要なすべての引数を含む。- 戻り値:
- 4 次元の Mat。
-
blobFromImageWithParams
public static Mat blobFromImageWithParams​(Mat image)
Creates 4-dimensional blob from image with given params. This function is an extension of REF: blobFromImage to meet more image preprocess needs. Given input image and preprocessing parameters, and function outputs the blob.- 引数:
image- 入力画像(いずれも 1、3、または 4 チャンネル)。- 戻り値:
- 4 次元の Mat。
-
blobFromImageWithParams
public static void blobFromImageWithParams​(Mat image, Mat blob, Image2BlobParams param)
-
blobFromImageWithParams
public static void blobFromImageWithParams​(Mat image, Mat blob)
-
blobFromImagesWithParams
public static Mat blobFromImagesWithParams​(java.util.List<Mat> images, Image2BlobParams param)
Creates 4-dimensional blob from series of images with given params. This function is an extension of REF: blobFromImages to meet more image preprocess needs. Given input image and preprocessing parameters, and function outputs the blob.- 引数:
images- 入力画像(いずれも 1、3、または 4 チャンネル)。param- Image2BlobParams 構造体。画像から blob への処理に必要なすべての引数を含む。- 戻り値:
- 4 次元の Mat。
-
blobFromImagesWithParams
public static Mat blobFromImagesWithParams​(java.util.List<Mat> images)
Creates 4-dimensional blob from series of images with given params. This function is an extension of REF: blobFromImages to meet more image preprocess needs. Given input image and preprocessing parameters, and function outputs the blob.- 引数:
images- 入力画像(いずれも 1、3、または 4 チャンネル)。- 戻り値:
- 4 次元の Mat。
-
blobFromImagesWithParams
public static void blobFromImagesWithParams​(java.util.List<Mat> images, Mat blob, Image2BlobParams param)
-
blobFromImagesWithParams
public static void blobFromImagesWithParams​(java.util.List<Mat> images, Mat blob)
-
imagesFromBlob
public static void imagesFromBlob​(Mat blob_, java.util.List<Mat> images_)
Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector<cv::Mat>).- 引数:
blob_- 画像を抽出したい元となる、浮動小数点精度 (CV_32F) の 4 次元配列 (images, channels, height, width)。images_- blob から抽出した画像を浮動小数点精度 (CV_32F) で格納した 2D Mat の配列。これらは正規化も平均加算もされていない。返される画像の数は blob の最初の次元(バッチサイズ)に等しい。各画像のチャンネル数は blob の 2 番目の次元(ビット深度)に等しい。
-
writeTextGraph
public static void writeTextGraph​(java.lang.String model, java.lang.String output)Create a text representation for a binary network stored in protocol buffer format.- 引数:
model- バイナリネットワークへのパス。output- 作成する出力テキストファイルへのパス。覚え書き: 出力ファイルサイズを削減するため、学習済みの重みは含まれない。
-
NMSBoxes
public static void NMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
Performs non maximum suppression given boxes and corresponding scores.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。eta- 適応的しきい値の式における係数: \(nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\)。top_k->0の場合、最大でtop_k個の選択されたインデックスを保持する。
-
NMSBoxes
public static void NMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
Performs non maximum suppression given boxes and corresponding scores.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。eta- 適応的しきい値の式における係数: \(nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\)。
-
NMSBoxes
public static void NMSBoxes​(MatOfRect2d bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
Performs non maximum suppression given boxes and corresponding scores.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。
-
NMSBoxesRotated
public static void NMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
-
NMSBoxesRotated
public static void NMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
-
NMSBoxesRotated
public static void NMSBoxesRotated​(MatOfRotatedRect bboxes, MatOfFloat scores, float score_threshold, float nms_threshold, MatOfInt indices)
-
NMSBoxesBatched
public static void NMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices, float eta, int top_k)
Performs batched non maximum suppression on given boxes and corresponding scores across different classes.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。class_ids- 対応するクラス ID の集合。ID は整数で、通常は 0 から始まる。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。eta- 適応的しきい値の式における係数: \(nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\)。top_k->0の場合、最大でtop_k個の選択されたインデックスを保持する。
-
NMSBoxesBatched
public static void NMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices, float eta)
Performs batched non maximum suppression on given boxes and corresponding scores across different classes.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。class_ids- 対応するクラス ID の集合。ID は整数で、通常は 0 から始まる。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。eta- 適応的しきい値の式における係数: \(nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\)。
-
NMSBoxesBatched
public static void NMSBoxesBatched​(MatOfRect2d bboxes, MatOfFloat scores, MatOfInt class_ids, float score_threshold, float nms_threshold, MatOfInt indices)
Performs batched non maximum suppression on given boxes and corresponding scores across different classes.- 引数:
bboxes- NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。class_ids- 対応するクラス ID の集合。ID は整数で、通常は 0 から始まる。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。
-
softNMSBoxes
public static void softNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices, long top_k, float sigma)
Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503- 引数:
bboxes- Soft NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。updated_scores- 対応する更新後の確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。top_k- 最大でtop_k個の選択されたインデックスを保持する。sigma- ガウス重み付けのパラメータ。 SEE: SoftNMSMethod
-
softNMSBoxes
public static void softNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices, long top_k)
Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503- 引数:
bboxes- Soft NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。updated_scores- 対応する更新後の確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS 後に保持された bboxes のインデックス。top_k- 選択するインデックスを最大でtop_k個に保持する。 SEE: SoftNMSMethod
-
softNMSBoxes
public static void softNMSBoxes​(MatOfRect bboxes, MatOfFloat scores, MatOfFloat updated_scores, float score_threshold, float nms_threshold, MatOfInt indices)
Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503- 引数:
bboxes- Soft NMS を適用するバウンディングボックスの集合。scores- 対応する確信度の集合。updated_scores- 対応する更新後の確信度の集合。score_threshold- スコアによってボックスをフィルタリングするために使用するしきい値。nms_threshold- non maximum suppression で使用するしきい値。indices- NMS適用後に保持されたバウンディングボックスのインデックス。 SEE: SoftNMSMethod
-
getInferenceEngineBackendType
@Deprecated public static java.lang.String getInferenceEngineBackendType()
Deprecated.Returns Inference Engine internal backend API. See values ofCV_DNN_BACKEND_INFERENCE_ENGINE_*macros.OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPEruntime parameter (environment variable) is ignored since 4.6.0.- 戻り値:
- 自動生成
-
setInferenceEngineBackendType
@Deprecated public static java.lang.String setInferenceEngineBackendType​(java.lang.String newBackendType)
Deprecated.Specify Inference Engine internal backend API. See values ofCV_DNN_BACKEND_INFERENCE_ENGINE_*macros.- 引数:
newBackendType- 自動生成- 戻り値:
- 内部バックエンド API の以前の値
-
resetMyriadDevice
public static void resetMyriadDevice()
Release a Myriad device (binded by OpenCV). Single Myriad device cannot be shared across multiple processes which uses Inference Engine's Myriad plugin.
-
getInferenceEngineVPUType
public static java.lang.String getInferenceEngineVPUType()
Returns Inference Engine VPU type. See values ofCV_DNN_INFERENCE_ENGINE_VPU_TYPE_*macros.- 戻り値:
- 自動生成
-
getInferenceEngineCPUType
public static java.lang.String getInferenceEngineCPUType()
Returns Inference Engine CPU type. Specify OpenVINO plugin: CPU or ARM.- 戻り値:
- 自動生成
-
releaseHDDLPlugin
public static void releaseHDDLPlugin()
Release a HDDL plugin.
-
-