mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 09:31:35 +08:00

* 重构insightface代码 * 重写insightface example代码 * 重写insightface example代码 * 删除多余代码 * 修改预处理代码 * 修改文档 * 修改文档 * 恢复误删除的文件 * 修改cpp example * 修改cpp example * 测试python代码 * 测试python代码 * 测试python代码 * 测试python代码 * 测试python代码 * 测试python代码 * 测试python代码 * 跑通python代码 * 修复重复初始化的bug * 更新adaface的python代码 * 修复c++重复初始化的问题 * 修复c++重复初始化的问题 * 修复Python重复初始化的问题 * 新增preprocess的几个参数的获取方式 * 修复注释的错误 * 按照要求修改 * 修改文档中的图片为图片压缩包 * 修改编译完成后程序的提示 * 更新错误include * 删除无用文件 * 更新文档
51 lines
1.6 KiB
C++
Executable File
51 lines
1.6 KiB
C++
Executable File
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#pragma once
|
|
#include "fastdeploy/vision/common/processors/transform.h"
|
|
#include "fastdeploy/vision/common/result.h"
|
|
|
|
namespace fastdeploy {
|
|
namespace vision {
|
|
|
|
namespace faceid {
|
|
/*! @brief Postprocessor object for AdaFace serials model.
|
|
*/
|
|
class FASTDEPLOY_DECL AdaFacePostprocessor {
|
|
public:
|
|
/** \brief Create a postprocessor instance for AdaFace serials model
|
|
*/
|
|
AdaFacePostprocessor();
|
|
|
|
/** \brief Process the result of runtime and fill to FaceRecognitionResult structure
|
|
*
|
|
* \param[in] tensors The inference result from runtime
|
|
* \param[in] result The output result of FaceRecognitionResult
|
|
* \return true if the postprocess successed, otherwise false
|
|
*/
|
|
bool Run(std::vector<FDTensor>& infer_result,
|
|
std::vector<FaceRecognitionResult>* results);
|
|
|
|
void SetL2Normalize(bool& l2_normalize) { l2_normalize_ = l2_normalize; }
|
|
|
|
bool GetL2Normalize() { return l2_normalize_; }
|
|
|
|
private:
|
|
bool l2_normalize_;
|
|
};
|
|
|
|
} // namespace faceid
|
|
} // namespace vision
|
|
} // namespace fastdeploy
|