forked from NVIDIA-AI-IOT/deepstream_pose_estimation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
post_process.hpp
50 lines (40 loc) · 1.3 KB
/
post_process.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "pair_graph.hpp"
#include "cover_table.hpp"
//#include "munkres_algorithm.cpp"
#include "munkres_algorithm.hpp"
#include <gst/gst.h>
#include <glib.h>
#include <stdio.h>
#include "gstnvdsmeta.h"
#include "gstnvdsinfer.h"
#include "nvdsgstutils.h"
#include "nvbufsurface.h"
#include <stdio.h>
#include <vector>
#include <array>
#include <queue>
#include <cmath>
#define EPS 1e-6
template <class T>
using Vec1D = std::vector<T>;
template <class T>
using Vec2D = std::vector<Vec1D<T>>;
template <class T>
using Vec3D = std::vector<Vec2D<T>>;
void find_peaks(Vec1D<int> &counts_out, Vec3D<int> &peaks_out, void *cmap_data,
NvDsInferDims &cmap_dims, float threshold, int window_size, int max_count);
Vec3D<float>
refine_peaks(Vec1D<int> &counts,
Vec3D<int> &peaks, void *cmap_data, NvDsInferDims &cmap_dims,
int window_size);
Vec3D<float>
paf_score_graph(void *paf_data, NvDsInferDims &paf_dims,
Vec2D<int> &topology, Vec1D<int> &counts,
Vec3D<float> &peaks, int num_integral_samples);
Vec3D<int>
assignment(Vec3D<float> &score_graph,
Vec2D<int> &topology, Vec1D<int> &counts, float score_threshold, int max_count);
Vec2D<int>
connect_parts(
Vec3D<int> &connections, Vec2D<int> &topology, Vec1D<int> &counts,
int max_count);