cv.Net/Net - MATLAB File Help
cv.Net/Net

Constructor and importer of trained serialized models from different dnn-frameworks

net = cv.Net()

net = cv.Net('Caffe', prototxt)
net = cv.Net('Caffe', prototxt, caffeModel)

net = cv.Net('Tensorflow', modelmodel)
net = cv.Net('Tensorflow', model, config)

net = cv.Net('Torch', filename)
net = cv.Net('Torch', filename, isBinary)

net = cv.Net('Darknet', cfgFile)
net = cv.Net('Darknet', cfgFile, darknetModel)

Input

The first variant creates an empty network.

The second variant reads a network model stored in Caffe framework's format.

The third variant reads a network model stored in TensorFlow framework's format.

The fourth variant reads a network model stored in Torch7 framework's format.

The fifth variant reads a network model stored in Darknet model files.

The importers first create a net, add loaded layers into it, and set connections between them.

Notes for Torch

NOTE: ASCII mode of Torch serializer is more preferable, because binary mode extensively use long type of C language, which has various bit-length on different systems.

The loading file must contain serialized nn.Module object with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors.

List of supported layers (i.e. object instances derived from Torch nn.Module class):

Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported.

See also