1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #15189 from dvd42:keypoints_module

Keypoints module
This commit is contained in:
Diego
2019-12-13 16:00:06 +01:00
committed by Alexander Alekhin
parent c2b6c67431
commit 5b0b59ecfb
3 changed files with 141 additions and 0 deletions
+32
View File
@@ -1135,6 +1135,38 @@ CV__DNN_INLINE_NS_BEGIN
CV_WRAP void classify(InputArray frame, CV_OUT int& classId, CV_OUT float& conf);
};
/** @brief 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
*/
class CV_EXPORTS_W KeypointsModel: public Model
{
public:
/**
* @brief Create keypoints model from network represented in one of the supported formats.
* An order of @p model and @p config arguments does not matter.
* @param[in] model Binary file contains trained weights.
* @param[in] config Text file contains network configuration.
*/
CV_WRAP KeypointsModel(const String& model, const String& config = "");
/**
* @brief Create model from deep learning network.
* @param[in] network Net object.
*/
CV_WRAP KeypointsModel(const Net& network);
/** @brief Given the @p input frame, create input blob, run net
* @param[in] frame The input image.
* @param thresh minimum confidence threshold to select a keypoint
* @returns a vector holding the x and y coordinates of each detected keypoint
*
*/
CV_WRAP std::vector<Point2f> estimate(InputArray frame, float thresh=0.5);
};
/** @brief This class represents high-level API for segmentation models
*
* SegmentationModel allows to set params for preprocessing input image.