1 Star 24 Fork 5

Quard/QFacefusion

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
utils.h 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
# ifndef UTILS
# define UTILS
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include "opencv2/opencv.hpp"
namespace FaceFusionUtils {
typedef struct
{
float xmin;
float ymin;
float xmax;
float ymax;
} Bbox;
typedef struct
{
float x;
float y;
} KeyPoint;
typedef struct
{
float xmin;
float ymin;
float xmax;
float ymax;
float score;
KeyPoint kp5[5];
} BboxWithKP5;
float GetIoU(const Bbox box1, const Bbox box2);
std::vector<int> nms(std::vector<Bbox> boxes, std::vector<float> confidences, const float nms_thresh);
cv::Mat warp_face_by_face_landmark_5(const cv::Mat temp_vision_frame, cv::Mat &crop_img, const std::vector<cv::Point2f> face_landmark_5, const std::vector<cv::Point2f> normed_template, const cv::Size crop_size);
cv::Mat create_static_box_mask(const int *crop_size, const float face_mask_blur, const int *face_mask_padding);
cv::Mat paste_back(cv::Mat temp_vision_frame, cv::Mat crop_vision_frame, cv::Mat crop_mask, cv::Mat affine_matrix);
cv::Mat blend_frame(cv::Mat temp_vision_frame, cv::Mat paste_vision_frame, const int FACE_ENHANCER_BLEND=80);
float dot_product(const std::vector<float>& vec1, const std::vector<float>& vec2);
}
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/QQxiaoming/QFacefusion.git
git@gitee.com:QQxiaoming/QFacefusion.git
QQxiaoming
QFacefusion
QFacefusion
main

搜索帮助