Package org.opencv.dnn
Class KeypointsModel
java.lang.Object
org.opencv.dnn.Model
org.opencv.dnn.KeypointsModel
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
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
KeypointsModel
(long addr) KeypointsModel
(String model) Create keypoints model from network represented in one of the supported formats.KeypointsModel
(String model, String config) Create keypoints model from network represented in one of the supported formats.KeypointsModel
(Net network) Create model from deep learning network. -
Method Summary
Modifier and TypeMethodDescriptionstatic KeypointsModel
__fromPtr__
(long addr) Given theinput
frame, create input blob, run netGiven theinput
frame, create input blob, run netprotected void
finalize()
Methods inherited from class org.opencv.dnn.Model
enableWinograd, getNativeObjAddr, predict, setInputCrop, setInputMean, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setOutputNames, setPreferableBackend, setPreferableTarget
-
Constructor Details
-
KeypointsModel
protected KeypointsModel(long addr) -
KeypointsModel
Create keypoints model from network represented in one of the supported formats. An order ofmodel
andconfig
arguments does not matter.- Parameters:
model
- Binary file contains trained weights.config
- Text file contains network configuration.
-
KeypointsModel
Create keypoints model from network represented in one of the supported formats. An order ofmodel
andconfig
arguments does not matter.- Parameters:
model
- Binary file contains trained weights.
-
KeypointsModel
Create model from deep learning network.- Parameters:
network
- Net object.
-
-
Method Details
-
__fromPtr__
-
estimate
Given theinput
frame, create input blob, run net- Parameters:
frame
- automatically generatedthresh
- minimum confidence threshold to select a keypoint- Returns:
- a vector holding the x and y coordinates of each detected keypoint
-
estimate
Given theinput
frame, create input blob, run net- Parameters:
frame
- automatically generated- Returns:
- a vector holding the x and y coordinates of each detected keypoint
-
finalize
-