Net class
Net allows you to create and manipulate comprehensive artificial neural networks.
For further details, please see: https://docs.opencv.org/master/db/d30/classcv_1_1dnn_1_1Net.html
Constructors
- Net.empty()
-
factory
- Net.fromBytes(String framework, Uint8List bufferModel, {Uint8List? bufferConfig})
-
Read deep learning network represented in one of the supported formats.
factory
- Net.fromCaffe(String prototxt, String caffeModel)
-
Reads a network model stored in Caffe framework's format.
https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga7117752a0216d9f84a9677eefdabf514
factory
- Net.fromCaffeBytes(Uint8List bufferProto, Uint8List bufferModel)
-
Reads a network model stored in Caffe model in memory.
https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga5b1fd56ca658f10c3bd544ea46f57164
factory
- Net.fromFile(String path, {String config = "", String framework = ""})
-
Read deep learning network represented in one of the supported formats.
factory
- Net.fromOnnx(String path)
-
Reads a network model ONNX.
factory
- Net.fromOnnxBytes(Uint8List bufferModel)
-
Reads a network model from ONNX in-memory buffer.
factory
- Net.fromPointer(NetPtr ptr, [bool attach = true])
-
factory
- Net.fromTensorflow(String path, {String config = ""})
-
Reads a network model stored in TensorFlow framework's format.
factory
- Net.fromTensorflowBytes(Uint8List bufferModel, {Uint8List? bufferConfig})
-
Reads a network model stored in TensorFlow framework's format.
factory
- Net.fromTFLite(String path)
-
Reads a network model stored in TFLite framework's format.
factory
- Net.fromTFLiteBytes(Uint8List bufferModel)
-
Reads a network model stored in TensorFlow framework's format.
factory
- Net.fromTorch(String path, {bool isBinary = true, bool evaluate = true})
-
Reads a network model stored in Torch7 framework's format.
https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga73785dd1e95cd3070ef36f3109b053fe
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Empty returns true if there are no layers in the network.
no setter
-
props
→ List<
Object?> -
no setterinherited
-
ptr
↔ Pointer<
Net> -
getter/setter pairinherited
- ref → Net
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
dump(
) → String -
forward(
{String outputName = ""}) → Mat - Forward runs forward pass to compute output of layer with name outputName.
-
forwardAsync(
{String outputName = ""}) → Future< Mat> -
forwardLayers(
List< String> names) → VecMat - OpenVINO not supported yet, this is not available ForwardAsync runs forward pass to compute output of layer with name outputName.
-
forwardLayersAsync(
List< String> names) → Future<VecMat> -
getInputDetails(
) → (VecF32, VecI32) - Returns input scale and zeropoint for a quantized Net. https://docs.opencv.org/4.x/db/d30/classcv_1_1dnn_1_1Net.html#af82a1c7e7de19712370a34667056102d
-
getInputDetailsAsync(
) → Future< (VecF32, VecI32)> -
getLayer(
int index) → Layer - GetLayer returns pointer to layer with specified id from the network.
-
getLayerNames(
) → List< String> - GetLayerNames returns all layer names.
-
getLayerNamesAsync(
) → Future< List< String> > -
getPerfProfile(
) → (int, VecF64) - GetPerfProfile returns overall time for inference and timings (in ticks) for layers
-
getPerfProfileAsync(
) → Future< (int, VecF64)> -
getUnconnectedOutLayers(
) → List< int> - GetUnconnectedOutLayers returns indexes of layers with unconnected outputs.
-
getUnconnectedOutLayersAsync(
) → Future< VecI32> -
getUnconnectedOutLayersNames(
) → List< String> - getUnconnectedOutLayersNames
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInput(
InputArray blob, {String name = "", double scalefactor = 1.0, Scalar? mean}) → void - SetInput sets the new value for the layer output blob.
-
setInputAsync(
InputArray blob, {String name = "", double scalefactor = 1.0, Scalar? mean}) → Future< void> -
setPreferableBackend(
int backendId) → void - SetPreferableBackend ask network to use specific computation backend.
-
setPreferableTarget(
int targetId) → void - SetPreferableTarget ask network to make computations on specific target device.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- finalizer → NativeFinalizer
-
final