mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-30 11:26:39 +08:00
[docs] update win build docs with cmake-gui+vs2019 (#280)
* Delete redundant Chinese comments * [docs] update win build docs with cmake-gui+vs2019 * [docs] update win build docs with cmake-gui+vs2019 * [examples] replace some cn comments with en * [cmake] update FastDeploy.cmake.in * [docs] update windows c++ sdk usage docs * [cmake] update FastDeploy.cmake.in * [docs] update windows sdk usage docs Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
|
||||
// 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.
|
||||
|
||||
@@ -37,12 +37,10 @@ void CpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -76,12 +74,10 @@ void GpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -117,12 +113,10 @@ void TrtInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
|
||||
@@ -37,12 +37,10 @@ void CpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -76,12 +74,10 @@ void GpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -117,12 +113,10 @@ void TrtInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
|
||||
@@ -37,12 +37,10 @@ void CpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -76,12 +74,10 @@ void GpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -117,12 +113,10 @@ void TrtInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
|
||||
@@ -37,12 +37,10 @@ void CpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -76,12 +74,10 @@ void GpuInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
@@ -117,12 +113,10 @@ void TrtInfer(const std::string& model_file,
|
||||
|
||||
std::cout << "Prediction Done!" << std::endl;
|
||||
|
||||
// 输出预测框结果
|
||||
std::cout << "--- [Face 0]:" << res0.Str();
|
||||
std::cout << "--- [Face 1]:" << res1.Str();
|
||||
std::cout << "--- [Face 2]:" << res2.Str();
|
||||
|
||||
// 计算余弦相似度
|
||||
float cosine01 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
res0.embedding, res1.embedding, model.l2_normalize);
|
||||
float cosine02 = fastdeploy::vision::utils::CosineSimilarity(
|
||||
|
||||
@@ -21,7 +21,6 @@ void CpuInfer(const std::string& model_file, const std::string& image_file,
|
||||
std::cerr << "Failed to initialize." << std::endl;
|
||||
return;
|
||||
}
|
||||
// 设置推理size, 必须和模型文件一致
|
||||
model.size = {256, 256};
|
||||
auto im = cv::imread(image_file);
|
||||
auto im_bak = im.clone();
|
||||
@@ -52,7 +51,6 @@ void GpuInfer(const std::string& model_file, const std::string& image_file,
|
||||
std::cerr << "Failed to initialize." << std::endl;
|
||||
return;
|
||||
}
|
||||
// 设置推理size, 必须和模型文件一致
|
||||
model.size = {256, 256};
|
||||
|
||||
auto im = cv::imread(image_file);
|
||||
@@ -86,7 +84,6 @@ void TrtInfer(const std::string& model_file, const std::string& image_file,
|
||||
std::cerr << "Failed to initialize." << std::endl;
|
||||
return;
|
||||
}
|
||||
// 设置推理size, 必须和模型文件一致
|
||||
model.size = {256, 256};
|
||||
auto im = cv::imread(image_file);
|
||||
auto im_bak = im.clone();
|
||||
|
||||
@@ -36,8 +36,8 @@ void InitAndInfer(const std::string& det_model_dir, const std::string& cls_model
|
||||
assert(det_model.Initialized());
|
||||
assert(cls_model.Initialized());
|
||||
assert(rec_model.Initialized());
|
||||
|
||||
// 其中分类模型可选,因此也可使用如下方式串联OCR系统
|
||||
|
||||
// The classification model is optional, so the OCR system can also be connected in series as follows
|
||||
// auto ocr_system_v2 = fastdeploy::application::ocrsystem::PPOCRSystemv2(&det_model, &rec_model);
|
||||
auto ocr_system_v2 = fastdeploy::application::ocrsystem::PPOCRSystemv2(&det_model, &cls_model, &rec_model);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void InitAndInfer(const std::string& det_model_dir, const std::string& cls_model
|
||||
assert(cls_model.Initialized());
|
||||
assert(rec_model.Initialized());
|
||||
|
||||
// 其中分类模型可选,因此也可使用如下方式串联OCR系统
|
||||
// The classification model is optional, so the OCR system can also be connected in series as follows
|
||||
// auto ocr_system_v3 = fastdeploy::application::ocrsystem::PPOCRSystemv3(&det_model, &rec_model);
|
||||
auto ocr_system_v3 = fastdeploy::application::ocrsystem::PPOCRSystemv3(&det_model, &cls_model, &rec_model);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user