Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
1caff3fd
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
接近 2 年 前同步成功
通知
116
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1caff3fd
编写于
3月 14, 2022
作者:
L
lubin10
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update some code and README.md
上级
a37659eb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
10 deletion
+13
-10
deploy/lite_shitu/Makefile
deploy/lite_shitu/Makefile
+3
-2
deploy/lite_shitu/README.md
deploy/lite_shitu/README.md
+6
-4
deploy/lite_shitu/include/vector_search.h
deploy/lite_shitu/include/vector_search.h
+1
-0
deploy/lite_shitu/src/feature_extractor.cc
deploy/lite_shitu/src/feature_extractor.cc
+0
-1
deploy/lite_shitu/src/main.cc
deploy/lite_shitu/src/main.cc
+3
-3
未找到文件。
deploy/lite_shitu/Makefile
浏览文件 @
1caff3fd
...
...
@@ -9,8 +9,9 @@ endif
${info ARM_ABI
:
${ARM_ABI}}
${info ARM_PLAT
:
${ARM_PLAT}; option[arm7/arm8]}
LITE_ROOT
=
libs/inference_lite_lib.android.armv8
include
${LITE_ROOT}/demo/cxx/Makefile.def
include
../Makefile.def
LITE_ROOT
=
../../../
${info LITE_ROOT
:
$(abspath ${LITE_ROOT})}
THIRD_PARTY_DIR
=
third_party
...
...
deploy/lite_shitu/README.md
浏览文件 @
1caff3fd
...
...
@@ -92,9 +92,9 @@ PaddleClas 提供了转换并优化后的推理模型,可以直接参考下方
```
shell
# 进入lite_ppshitu目录
cd
$PaddleClas
/deploy/lite_shitu
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/lite/ppshitu_lite_models_v1.0.tar
.gz
tar
-xf
ppshitu_lite_models_v1.0.tar
.gz
rm
-f
ppshitu_lite_models_v1.0.tar
.gz
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/lite/ppshitu_lite_models_v1.0.tar
tar
-xf
ppshitu_lite_models_v1.0.tar
rm
-f
ppshitu_lite_models_v1.0.tar
```
#### 2.1.2 使用其他模型
...
...
@@ -312,7 +312,9 @@ chmod 777 pp_shitu
运行效果如下:
```
```
`
images/demo.jpg:
result0: bbox[253, 275, 1146, 872], score: 0.974196, label: 伊藤园_果蔬汁
```
## FAQ
Q1:如果想更换模型怎么办,需要重新按照流程走一遍吗?
...
...
deploy/lite_shitu/include/vector_search.h
浏览文件 @
1caff3fd
...
...
@@ -45,6 +45,7 @@ public:
LoadIndexFile
();
this
->
I
.
resize
(
this
->
return_k
*
this
->
max_query_number
);
this
->
D
.
resize
(
this
->
return_k
*
this
->
max_query_number
);
printf
(
"faiss index load success!
\n
"
);
};
void
LoadIdMap
();
...
...
deploy/lite_shitu/src/feature_extractor.cc
浏览文件 @
1caff3fd
...
...
@@ -51,7 +51,6 @@ void FeatureExtract::RunRecModel(const cv::Mat &img,
for
(
auto
dim
:
output_tensor
->
shape
())
{
output_size
*=
dim
;
}
std
::
cout
<<
"output len is: "
<<
output_size
<<
std
::
endl
;
feature
.
resize
(
output_size
);
output_tensor
->
CopyToCpu
(
feature
.
data
());
...
...
deploy/lite_shitu/src/main.cc
浏览文件 @
1caff3fd
...
...
@@ -208,9 +208,9 @@ int main(int argc, char **argv) {
RT_Config
[
"Global"
][
"max_det_results"
].
as
<
int
>
(),
false
,
&
det
);
// add the whole image for recognition to improve recall
PPShiTu
::
ObjectResult
result_whole_img
=
{
{
0
,
0
,
srcimg
.
cols
,
srcimg
.
rows
},
0
,
1.0
};
det_result
.
push_back
(
result_whole_img
);
//
PPShiTu::ObjectResult result_whole_img = {
//
{0, 0, srcimg.cols, srcimg.rows}, 0, 1.0};
//
det_result.push_back(result_whole_img);
// get rec result
PPShiTu
::
SearchResult
search_result
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录