-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【Hackathon4 No.185】 Add "Deploy PaddleDetection by Java" RFC #377
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ea08d4f
使用java完成PaddleDetection部署提案
huajiao-hjyp 7a1a1b8
deploy paddledetection by java
huajiao-hjyp e4b08c1
Merge branch 'master' of https://github.com/PaddlePaddle/community in…
huajiao-hjyp f1221a4
modify RFC
huajiao-hjyp 7281b89
update RFC
huajiao-hjyp 9022e2f
Merge branch 'master' of https://github.com/PaddlePaddle/community in…
huajiao-hjyp ef23955
update RFC
huajiao-hjyp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
rfcs/FastDeploy/20230222_deploy_PaddleDetection_by_Java.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 使用java完成PaddleDetection部署设计文档 | ||
|属性 | 内容 | | ||
|-|---| | ||
|提交作者<input type="checkbox" class="rowselector hidden"> | Tomoko-hjf | | ||
|提交时间<input type="checkbox" class="rowselector hidden"> | 2023-02-22 | | ||
|版本号 | V0.0 | | ||
|文件名 | 20230222_deploy_PaddleDetection_by_Java.md<br> | | ||
|
||
|
||
# 一、概述 | ||
## 1、相关背景 | ||
随着人工智能应用的不断发展,不仅要求在`服务端`进行部署,也需要在`移动安卓端`进行部署。 | ||
## 2、功能目标 | ||
在`FastDeploy`中使用`java`完成`PaddleDetection`中`PP-YOLOE`, `PaddleYOLOv8`, `PaddleYOLOv5`等模型的部署。 | ||
|
||
## 3、意义 | ||
可以使用Java在移动端部署`PP-YOLOE`, `PaddleYOLOv8`, `PaddleYOLOv5`等目标检测模型。 | ||
|
||
# 二、飞桨现状 | ||
在`使用Java部署目标检测模型`方面,`FastDeploy`目前只支持`PicoDet`,缺乏其他的目标检测模型。 | ||
|
||
# 三、设计思路与实现方案 | ||
|
||
## 总体思路 | ||
在`Java`层面新增模型部署可以分为几个步骤:定义模型对应的调用本地`native`方法的`Java`类、使用C++实现`JNI`函数、修改`CMakeLists.txt`文件。 | ||
|
||
## 定义模型对应的调用本地`native`方法的`Java`类 | ||
* 在`fastdeploy/src/main/java/com/baidu/paddle/fastdeploy/vision/detection`下定义目标检测模型对应的Java类,如`PPYOLOE`类。 | ||
* 在类中定义`构造方法`,`predict方法`、`release方法`。 | ||
|
||
## 使用C++实现`JNI`函数 | ||
在`fastdeploy/src/main/cpp/fastdeploy_jni/vision/detection/`下使用`C++`实现对应模型的`JNI`函数(`Java`类中调用的`native`方法)。 | ||
|
||
# 四、测试和验收的考量 | ||
在`Android`端部署增加的检测模型,并进行测试。 | ||
|
||
# 五、可行性分析和排期规划 | ||
通过`JNI`调用`C++`函数,方案可行。预计需要一周。 | ||
|
||
# 六、影响面 | ||
对其他模块没有影响。 | ||
|
||
# 附件及参考资料 | ||
参考仓库下已经实现的`PicoDet`。 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
实现的代码需要放在FastDeploy/examples/application/java目录下