#ifndef OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP #define OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP #include #include namespace op { template void connectBodyPartsCpu( Array& poseKeypoints, Array& poseScores, const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& 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); // Windows: Cuda functions do not include OP_API template void connectBodyPartsGpu( Array& poseKeypoints, Array& poseScores, const T* const heatMapGpuPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& 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 pairScoresCpu, T* pairScoresGpuPtr, const unsigned int* const bodyPartPairsGpuPtr, const unsigned int* const mapIdxGpuPtr, const T* const peaksGpuPtr); template void connectBodyPartsOcl( Array& poseKeypoints, Array& poseScores, const T* const heatMapGpuPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& 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 pairScoresCpu = Array{}, T* pairScoresGpuPtr = nullptr, const unsigned int* const bodyPartPairsGpuPtr = nullptr, const unsigned int* const mapIdxGpuPtr = nullptr, const T* const peaksGpuPtr = nullptr, const int gpuID = 0); // Private functions used by the 2 above functions template std::vector, T>> createPeopleVector( const T* const heatMapPtr, const T* const peaksPtr, const PoseModel poseModel, const Point& heatMapSize, const int maxPeaks, const T interThreshold, const T interMinAboveThreshold, const std::vector& bodyPartPairs, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs, const T defaultNmsThreshold, const Array& precomputedPAFs = Array()); template void removePeopleBelowThresholdsAndFillFaces( std::vector& validSubsetIndexes, int& numberPeople, std::vector, T>>& subsets, const unsigned int numberBodyParts, const int minSubsetCnt, const T minSubsetScore, const bool maximizePositives, const T* const peaksPtr); template void peopleVectorToPeopleArray( Array& poseKeypoints, Array& poseScores, const T scaleFactor, const std::vector, T>>& subsets, const std::vector& validSubsetIndexes, const T* const peaksPtr, const int numberPeople, const unsigned int numberBodyParts, const unsigned int numberBodyPartPairs); template std::vector> pafPtrIntoVector( const Array& pairScores, const T* const peaksPtr, const int maxPeaks, const std::vector& bodyPartPairs, const unsigned int numberBodyPartPairs); template std::vector, T>> pafVectorIntoPeopleVector( const std::vector>& pairScores, const T* const peaksPtr, const int maxPeaks, const std::vector& bodyPartPairs, const unsigned int numberBodyParts); } #endif // OPENPOSE_POSE_BODY_PARTS_CONNECTOR_HPP