1 Star 1 Fork 0

折秋水/deep-head-pose-lite-ncnn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
HeadPoseDetector.h 822 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kim, Gunho 提交于 2020-01-30 16:08 . Initial commit
#ifndef HEADPOSEDETECTOR_H
#define HEADPOSEDETECTOR_H
#include <opencv2/opencv.hpp>
#include <ncnn/platform.h>
#include <ncnn/net.h>
#include <memory>
class HeadPoseDetector
{
public:
HeadPoseDetector(HeadPoseDetector const&) = delete;
HeadPoseDetector& operator=(HeadPoseDetector const&) = delete;
static std::shared_ptr<HeadPoseDetector> instance()
{
static std::shared_ptr<HeadPoseDetector> s { new HeadPoseDetector };
return s;
}
private:
HeadPoseDetector();
public:
bool detect(const cv::Mat &rgb, /*out*/double &yaw, /*out*/double &pitch, /*out*/double &roll);
private:
double __calc(ncnn::Extractor &ex, int id);
private:
ncnn::Net m_net;
std::unique_ptr<ncnn::Layer> m_softmaxPtr;
bool m_initialized = false;
};
#endif // HEADPOSEDETECTOR_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ZHEQIUSHUI/deep-head-pose-lite-ncnn.git
[email protected]:ZHEQIUSHUI/deep-head-pose-lite-ncnn.git
ZHEQIUSHUI
deep-head-pose-lite-ncnn
deep-head-pose-lite-ncnn
master

搜索帮助