JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
yolov8pose_postprocess.C File Reference
#include <iostream>
#include <vector>
#include <jevois/DNN/hailo/common/math.hpp>
#include <jevois/DNN/hailo/common/hailo_objects.hpp>
#include <jevois/DNN/hailo/common/tensors.hpp>
#include <jevois/DNN/hailo/common/labels/coco_eighty.hpp>
#include <jevois/DNN/hailo/yolov8pose_postprocess.hpp>
Include dependency graph for yolov8pose_postprocess.C:

Go to the source code of this file.

Macros

#define NUM_CLASSES   1
 

Functions

std::pair< std::vector< KeyPt >, std::vector< PairPairs > > filter_keypoints (std::vector< Decodings > filtered_decodings, std::vector< int > network_dims, float joint_threshold)
 
float iou_calc (const HailoBBox &box_1, const HailoBBox &box_2)
 
std::vector< Decodings > nms (std::vector< Decodings > &decodings, const float iou_thr, bool should_nms_cross_classes=false)
 
float dequantize_value (uint8_t val, float32_t qp_scale, float32_t qp_zp)
 
void dequantize_box_values (xt::xarray< float > &dequantized_outputs, int index, xt::xarray< uint8_t > &quantized_outputs, size_t dim1, size_t dim2, float32_t qp_scale, float32_t qp_zp)
 
float dequantize_value16 (uint16_t val, float32_t qp_scale, float32_t qp_zp)
 
void dequantize_box_values16 (xt::xarray< float > &dequantized_outputs, int index, xt::xarray< uint16_t > &quantized_outputs, size_t dim1, size_t dim2, float32_t qp_scale, float32_t qp_zp)
 
std::vector< xt::xarray< double > > get_centers (std::vector< int > &strides, std::vector< int > &network_dims, std::size_t boxes_num, int strided_width, int strided_height)
 
std::vector< Decodings > decode_boxes_and_keypoints (std::vector< HailoTensorPtr > raw_boxes_outputs, xt::xarray< float > scores, std::vector< HailoTensorPtr > raw_keypoints, std::vector< int > network_dims, std::vector< int > strides, int regression_length, float score_threshold)
 
Triple get_boxes_scores_keypoints (std::vector< HailoTensorPtr > &tensors, int num_classes, int)
 
std::vector< Decodings > yolov8pose_postprocess (std::vector< HailoTensorPtr > &tensors, std::vector< int > network_dims, std::vector< int > strides, int regression_length, int num_classes, float score_threshold, float iou_threshold)
 

Variables

std::vector< std::pair< int, int > > JOINT_PAIRS
 

Macro Definition Documentation

◆ NUM_CLASSES

#define NUM_CLASSES   1

Definition at line 27 of file yolov8pose_postprocess.C.

Function Documentation

◆ decode_boxes_and_keypoints()

std::vector< Decodings > decode_boxes_and_keypoints ( std::vector< HailoTensorPtr >  raw_boxes_outputs,
xt::xarray< float >  scores,
std::vector< HailoTensorPtr >  raw_keypoints,
std::vector< int >  network_dims,
std::vector< int >  strides,
int  regression_length,
float  score_threshold 
)

◆ dequantize_box_values()

void dequantize_box_values ( xt::xarray< float > &  dequantized_outputs,
int  index,
xt::xarray< uint8_t > &  quantized_outputs,
size_t  dim1,
size_t  dim2,
float32_t  qp_scale,
float32_t  qp_zp 
)

Definition at line 130 of file yolov8pose_postprocess.C.

References dequantize_value().

Referenced by decode_boxes_and_keypoints().

◆ dequantize_box_values16()

void dequantize_box_values16 ( xt::xarray< float > &  dequantized_outputs,
int  index,
xt::xarray< uint16_t > &  quantized_outputs,
size_t  dim1,
size_t  dim2,
float32_t  qp_scale,
float32_t  qp_zp 
)

Definition at line 145 of file yolov8pose_postprocess.C.

References dequantize_value16().

Referenced by decode_boxes_and_keypoints().

◆ dequantize_value()

float dequantize_value ( uint8_t  val,
float32_t  qp_scale,
float32_t  qp_zp 
)

Definition at line 125 of file yolov8pose_postprocess.C.

Referenced by dequantize_box_values().

◆ dequantize_value16()

float dequantize_value16 ( uint16_t  val,
float32_t  qp_scale,
float32_t  qp_zp 
)

Definition at line 140 of file yolov8pose_postprocess.C.

Referenced by dequantize_box_values16().

◆ filter_keypoints()

std::pair< std::vector< KeyPt >, std::vector< PairPairs > > filter_keypoints ( std::vector< Decodings >  filtered_decodings,
std::vector< int >  network_dims,
float  joint_threshold 
)

Definition at line 37 of file yolov8pose_postprocess.C.

References JOINT_PAIRS.

Referenced by jevois::dnn::PostProcessorPose::process().

◆ get_boxes_scores_keypoints()

Triple get_boxes_scores_keypoints ( std::vector< HailoTensorPtr > &  tensors,
int  num_classes,
int   
)

Definition at line 286 of file yolov8pose_postprocess.C.

Referenced by yolov8pose_postprocess().

◆ get_centers()

std::vector< xt::xarray< double > > get_centers ( std::vector< int > &  strides,
std::vector< int > &  network_dims,
std::size_t  boxes_num,
int  strided_width,
int  strided_height 
)

Definition at line 155 of file yolov8pose_postprocess.C.

Referenced by decode_boxes_and_keypoints().

◆ iou_calc()

float iou_calc ( const HailoBBox &  box_1,
const HailoBBox &  box_2 
)

Definition at line 72 of file yolov8pose_postprocess.C.

Referenced by nms().

◆ nms()

std::vector< Decodings > nms ( std::vector< Decodings > &  decodings,
const float  iou_thr,
bool  should_nms_cross_classes = false 
)

Definition at line 87 of file yolov8pose_postprocess.C.

References iou_calc().

Referenced by yolov8pose_postprocess().

◆ yolov8pose_postprocess()

std::vector< Decodings > yolov8pose_postprocess ( std::vector< HailoTensorPtr > &  tensors,
std::vector< int >  network_dims,
std::vector< int >  strides,
int  regression_length,
int  num_classes,
float  score_threshold,
float  iou_threshold 
)

Variable Documentation

◆ JOINT_PAIRS

std::vector<std::pair<int, int> > JOINT_PAIRS
Initial value:
= {
{0, 1}, {1, 3}, {0, 2}, {2, 4},
{5, 6}, {5, 7}, {7, 9}, {6, 8}, {8, 10},
{5, 11}, {6, 12}, {11, 12},
{11, 13}, {12, 14}, {13, 15}, {14, 16}
}

Definition at line 29 of file yolov8pose_postprocess.C.

Referenced by filter_keypoints().