1 #ifndef OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
2 #define OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP
11 Array<T>& poseKeypoints,
Array<T>& poseScores,
const T*
const heatMapPtr,
const T*
const peaksPtr,
12 const PoseModel poseModel,
const Point<int>& heatMapSize,
const int maxPeaks,
const T interMinAboveThreshold,
13 const T interThreshold,
const int minSubsetCnt,
const T minSubsetScore,
const T defaultNmsThreshold,
14 const T scaleFactor = 1.f,
const bool maximizePositives =
false);
19 Array<T>& poseKeypoints,
Array<T>& poseScores,
const T*
const heatMapGpuPtr,
const T*
const peaksPtr,
20 const PoseModel poseModel,
const Point<int>& heatMapSize,
const int maxPeaks,
const T interMinAboveThreshold,
21 const T interThreshold,
const int minSubsetCnt,
const T minSubsetScore,
const T defaultNmsThreshold,
22 const T scaleFactor,
const bool maximizePositives,
Array<T> pairScoresCpu, T* pairScoresGpuPtr,
23 const unsigned int*
const bodyPartPairsGpuPtr,
const unsigned int*
const mapIdxGpuPtr,
24 const T*
const peaksGpuPtr);
28 Array<T>& poseKeypoints,
Array<T>& poseScores,
const T*
const heatMapGpuPtr,
const T*
const peaksPtr,
29 const PoseModel poseModel,
const Point<int>& heatMapSize,
const int maxPeaks,
const T interMinAboveThreshold,
30 const T interThreshold,
const int minSubsetCnt,
const T minSubsetScore,
const T defaultNmsThreshold,
31 const T scaleFactor = 1.f,
const bool maximizePositives =
false,
33 const unsigned int*
const bodyPartPairsGpuPtr =
nullptr,
const unsigned int*
const mapIdxGpuPtr =
nullptr,
34 const T*
const peaksGpuPtr =
nullptr,
const int gpuID = 0);
39 const T*
const heatMapPtr,
const T*
const peaksPtr,
const PoseModel poseModel,
const Point<int>& heatMapSize,
40 const int maxPeaks,
const T interThreshold,
const T interMinAboveThreshold,
41 const std::vector<unsigned int>& bodyPartPairs,
const unsigned int numberBodyParts,
42 const unsigned int numberBodyPartPairs,
const T defaultNmsThreshold,
47 std::vector<int>& validSubsetIndexes,
int& numberPeople,
48 std::vector<std::pair<std::vector<int>, T>>& subsets,
const unsigned int numberBodyParts,
49 const int minSubsetCnt,
const T minSubsetScore,
const bool maximizePositives,
const T*
const peaksPtr);
54 const std::vector<std::pair<std::vector<int>, T>>& subsets,
const std::vector<int>& validSubsetIndexes,
55 const T*
const peaksPtr,
const int numberPeople,
const unsigned int numberBodyParts,
56 const unsigned int numberBodyPartPairs);
60 const Array<T>& pairScores,
const T*
const peaksPtr,
const int maxPeaks,
61 const std::vector<unsigned int>& bodyPartPairs,
const unsigned int numberBodyPartPairs);
65 const std::vector<std::tuple<T, T, int, int, int>>& pairScores,
const T*
const peaksPtr,
const int maxPeaks,
66 const std::vector<unsigned int>& bodyPartPairs,
const unsigned int numberBodyParts);
void connectBodyPartsCpu(Array< T > &poseKeypoints, Array< T > &poseScores, const T *const heatMapPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T defaultNmsThreshold, const T scaleFactor=1.f, const bool maximizePositives=false)
std::vector< std::pair< std::vector< int >, T > > pafVectorIntoPeopleVector(const std::vector< std::tuple< T, T, int, int, int >> &pairScores, const T *const peaksPtr, const int maxPeaks, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyParts)
void peopleVectorToPeopleArray(Array< T > &poseKeypoints, Array< T > &poseScores, const T scaleFactor, const std::vector< std::pair< std::vector< int >, T >> &subsets, const std::vector< int > &validSubsetIndexes, const T *const peaksPtr, const int numberPeople, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs)
void connectBodyPartsOcl(Array< T > &poseKeypoints, Array< T > &poseScores, const T *const heatMapGpuPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T defaultNmsThreshold, const T scaleFactor=1.f, const bool maximizePositives=false, Array< T > pairScoresCpu=Array< T >{}, T *pairScoresGpuPtr=nullptr, const unsigned int *const bodyPartPairsGpuPtr=nullptr, const unsigned int *const mapIdxGpuPtr=nullptr, const T *const peaksGpuPtr=nullptr, const int gpuID=0)
void connectBodyPartsGpu(Array< T > &poseKeypoints, Array< T > &poseScores, const T *const heatMapGpuPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interMinAboveThreshold, const T interThreshold, const int minSubsetCnt, const T minSubsetScore, const T defaultNmsThreshold, const T scaleFactor, const bool maximizePositives, Array< T > pairScoresCpu, T *pairScoresGpuPtr, const unsigned int *const bodyPartPairsGpuPtr, const unsigned int *const mapIdxGpuPtr, const T *const peaksGpuPtr)
std::vector< std::tuple< T, T, int, int, int > > pafPtrIntoVector(const Array< T > &pairScores, const T *const peaksPtr, const int maxPeaks, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyPartPairs)
void removePeopleBelowThresholdsAndFillFaces(std::vector< int > &validSubsetIndexes, int &numberPeople, std::vector< std::pair< std::vector< int >, T >> &subsets, const unsigned int numberBodyParts, const int minSubsetCnt, const T minSubsetScore, const bool maximizePositives, const T *const peaksPtr)
std::vector< std::pair< std::vector< int >, T > > createPeopleVector(const T *const heatMapPtr, const T *const peaksPtr, const PoseModel poseModel, const Point< int > &heatMapSize, const int maxPeaks, const T interThreshold, const T interMinAboveThreshold, const std::vector< unsigned int > &bodyPartPairs, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs, const T defaultNmsThreshold, const Array< T > &precomputedPAFs=Array< T >())