|
| KeypointsModel (const String &model, const String &config="") |
| Create keypoints model from network represented in one of the supported formats. An order of model and config arguments does not matter. More...
|
|
| KeypointsModel (const Net &network) |
| Create model from deep learning network. More...
|
|
std::vector< Point2f > | estimate (InputArray frame, float thresh=0.5) |
| Given the input frame, create input blob, run net. More...
|
|
| Model () |
| Default constructor. More...
|
|
| Model (const String &model, const String &config="") |
| Create model from deep learning network represented in one of the supported formats. An order of model and config arguments does not matter. More...
|
|
| Model (const Net &network) |
| Create model from deep learning network. More...
|
|
void | predict (InputArray frame, OutputArrayOfArrays outs) |
| Given the input frame, create input blob, run net and return the output blobs . More...
|
|
Model & | setInputCrop (bool crop) |
| Set flag crop for frame. More...
|
|
Model & | setInputMean (const Scalar &mean) |
| Set mean value for frame. More...
|
|
void | setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false) |
| Set preprocessing parameters for frame. More...
|
|
Model & | setInputScale (double scale) |
| Set scalefactor value for frame. More...
|
|
Model & | setInputSize (const Size &size) |
| Set input size for frame. More...
|
|
Model & | setInputSize (int width, int height) |
| Set input size for frame. More...
|
|
Model & | setInputSwapRB (bool swapRB) |
| Set flag swapRB for frame. More...
|
|
| Net () |
| Default constructor. More...
|
|
| ~Net () |
| Destructor frees the net only if there aren't references to the net anymore. More...
|
|
int | addLayer (const String &name, const String &type, LayerParams ¶ms) |
| Adds new layer to the net. More...
|
|
int | addLayerToPrev (const String &name, const String &type, LayerParams ¶ms) |
| Adds new layer and connects its first input to the first output of previously added layer. More...
|
|
void | connect (String outPin, String inpPin) |
| Connects output of the first layer to input of the second layer. More...
|
|
void | connect (int outLayerId, int outNum, int inpLayerId, int inpNum) |
| Connects #outNum output of the first layer to #inNum input of the second layer. More...
|
|
String | dump () |
| Dump net to String. More...
|
|
void | dumpToFile (const String &path) |
| Dump net structure, hyperparameters, backend, target and fusion to dot file. More...
|
|
bool | empty () const |
|
void | enableFusion (bool fusion) |
| Enables or disables layer fusion in the network. More...
|
|
Mat | forward (const String &outputName=String()) |
| Runs forward pass to compute output of layer with name outputName . More...
|
|
void | forward (OutputArrayOfArrays outputBlobs, const String &outputName=String()) |
| Runs forward pass to compute output of layer with name outputName . More...
|
|
void | forward (OutputArrayOfArrays outputBlobs, const std::vector< String > &outBlobNames) |
| Runs forward pass to compute outputs of layers listed in outBlobNames . More...
|
|
void | forward (std::vector< std::vector< Mat > > &outputBlobs, const std::vector< String > &outBlobNames) |
| Runs forward pass to compute outputs of layers listed in outBlobNames . More...
|
|
AsyncArray | forwardAsync (const String &outputName=String()) |
| Runs forward pass to compute output of layer with name outputName . More...
|
|
int64 | getFLOPS (const std::vector< MatShape > &netInputShapes) const |
| Computes FLOP for whole loaded model with specified input shapes. More...
|
|
int64 | getFLOPS (const MatShape &netInputShape) const |
|
int64 | getFLOPS (const int layerId, const std::vector< MatShape > &netInputShapes) const |
|
int64 | getFLOPS (const int layerId, const MatShape &netInputShape) const |
|
Ptr< Layer > | getLayer (LayerId layerId) |
| Returns pointer to layer with specified id or name which the network use. More...
|
|
int | getLayerId (const String &layer) |
| Converts string name of the layer to the integer identifier. More...
|
|
std::vector< Ptr< Layer > > | getLayerInputs (LayerId layerId) |
| Returns pointers to input layers of specific layer. More...
|
|
std::vector< String > | getLayerNames () const |
|
int | getLayersCount (const String &layerType) const |
| Returns count of layers of specified type. More...
|
|
void | getLayerShapes (const MatShape &netInputShape, const int layerId, std::vector< MatShape > &inLayerShapes, std::vector< MatShape > &outLayerShapes) const |
| Returns input and output shapes for layer with specified id in loaded model; preliminary inferencing isn't necessary. More...
|
|
void | getLayerShapes (const std::vector< MatShape > &netInputShapes, const int layerId, std::vector< MatShape > &inLayerShapes, std::vector< MatShape > &outLayerShapes) const |
|
void | getLayersShapes (const std::vector< MatShape > &netInputShapes, std::vector< int > &layersIds, std::vector< std::vector< MatShape > > &inLayersShapes, std::vector< std::vector< MatShape > > &outLayersShapes) const |
| Returns input and output shapes for all layers in loaded model; preliminary inferencing isn't necessary. More...
|
|
void | getLayersShapes (const MatShape &netInputShape, std::vector< int > &layersIds, std::vector< std::vector< MatShape > > &inLayersShapes, std::vector< std::vector< MatShape > > &outLayersShapes) const |
|
void | getLayerTypes (std::vector< String > &layersTypes) const |
| Returns list of types for layer used in model. More...
|
|
void | getMemoryConsumption (const std::vector< MatShape > &netInputShapes, size_t &weights, size_t &blobs) const |
| Computes bytes number which are required to store all weights and intermediate blobs for model. More...
|
|
void | getMemoryConsumption (const MatShape &netInputShape, size_t &weights, size_t &blobs) const |
|
void | getMemoryConsumption (const int layerId, const std::vector< MatShape > &netInputShapes, size_t &weights, size_t &blobs) const |
|
void | getMemoryConsumption (const int layerId, const MatShape &netInputShape, size_t &weights, size_t &blobs) const |
|
void | getMemoryConsumption (const std::vector< MatShape > &netInputShapes, std::vector< int > &layerIds, std::vector< size_t > &weights, std::vector< size_t > &blobs) const |
| Computes bytes number which are required to store all weights and intermediate blobs for each layer. More...
|
|
void | getMemoryConsumption (const MatShape &netInputShape, std::vector< int > &layerIds, std::vector< size_t > &weights, std::vector< size_t > &blobs) const |
|
Mat | getParam (LayerId layer, int numParam=0) |
| Returns parameter blob of the layer. More...
|
|
int64 | getPerfProfile (std::vector< double > &timings) |
| Returns overall time for inference and timings (in ticks) for layers. Indexes in returned vector correspond to layers ids. Some layers can be fused with others, in this case zero ticks count will be return for that skipped layers. More...
|
|
std::vector< int > | getUnconnectedOutLayers () const |
| Returns indexes of layers with unconnected outputs. More...
|
|
std::vector< String > | getUnconnectedOutLayersNames () const |
| Returns names of layers with unconnected outputs. More...
|
|
void | setHalideScheduler (const String &scheduler) |
| Compile Halide layers. More...
|
|
void | setInput (InputArray blob, const String &name="", double scalefactor=1.0, const Scalar &mean=Scalar()) |
| Sets the new input value for the network. More...
|
|
void | setInputsNames (const std::vector< String > &inputBlobNames) |
| Sets outputs names of the network input pseudo layer. More...
|
|
void | setParam (LayerId layer, int numParam, const Mat &blob) |
| Sets the new value for the learned param of the layer. More...
|
|
void | setPreferableBackend (int backendId) |
| Ask network to use specific computation backend where it supported. More...
|
|
void | setPreferableTarget (int targetId) |
| Ask network to make computations on specific target device. More...
|
|
This class represents high-level API for keypoints models.
KeypointsModel allows to set params for preprocessing input image. KeypointsModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and returns the x and y coordinates of each detected keypoint