Skip to content
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

【Hackathon 4th No.180】在FastDeploy中集成集成地平线推理引擎 #410

Merged
merged 3 commits into from
Mar 10, 2023

Conversation

seyosum
Copy link
Contributor

@seyosum seyosum commented Mar 4, 2023

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented Mar 4, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@CLAassistant
Copy link

CLAassistant commented Mar 4, 2023

CLA assistant check
All committers have signed the CLA.

@jiangjiajun
Copy link

@Zheng-Bicheng 麻烦必城帮忙Review下

Copy link
Contributor

@Zheng-Bicheng Zheng-Bicheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好,有一些小问题,麻烦您看一下,做一下针对性的修改。


4. 将backends集成进FastDeploy

5. 分类模型验证正确性
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么要有一个分类模型验证准确性啊,是说先移植分类模型再移植PPYOLO-E吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

分类模型一般情况下是可以直接通过网络输出结果的,因此,为了验证模型推理部分的正确性,所以先移植分类模型,之后再移植PPYOLO-E

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那你的意思是先在FastDeploy上移植Clas模型随后移植PPYOLOE是吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那你需要在你的RFC中提到你需要移植哪一个Clas模型哦。


5. 分类模型验证正确性

6. 编写PP-YOLOE前后处理
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么需要修改preprocess?这里是有什么不能用的算子导致需要修改后处理吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

模型推理部分不能直接得到框的位置,以yolo系列为例,需要后处理部分计算框的偏置等信息,诸如NMS部分也是不能在芯片上直接计算的,所以,需要修改后处理部分。也有可能FastDeploy之前已经实现了,若已经实现的话可不实现这部分。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • FastDeploy编写了对应的可视化代码,详情可以看一下PaddleDetection的demo,能够直接得到可视化后的图片。
  • 如果只是NMS不支持,可以裁剪掉NMS后的部分。这部分我已经实现了,你无需修改后处理代码,可以参考PaddleDetection下RKNPU2 Demo的实现。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好,我之后参考下!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是不需要移植前后处理的,把相关部分删除一下吧

[https://github.com/PaddlePaddle/Paddle/issues/50631#task180](https://github.com/PaddlePaddle/Paddle/issues/50631#task180)

## 2、功能目标
将地平线推理引擎接入FastDeploy,开发HorizonBackends部分,同时针对PP-YOLOE开发对应的前后处理部分。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上


| 领域 | 飞桨文档体验方案 |
|----------------------------------------------------------|-------------------------------------------|
| 提交作者<input type="checkbox" class="rowselector hidden"> | 晴天 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里建议用您的GithubID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

## 2、功能目标
将地平线推理引擎接入FastDeploy,开发HorizonBackends部分,同时针对PP-YOLOE开发对应的前后处理部分。
## 3、意义
为地平线芯片模型推理提供成熟API,提高开发者开发效率。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以改为为FastDeploy增添地平线推理引擎,提高开发者开发效率。开发者基本上是接触不到你写的backend的,因此并没有提供成熟API一说。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,感谢!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zheng-Bicheng 辛苦大佬再帮忙review下吧

[https://github.com/PaddlePaddle/Paddle/issues/50631#task180](https://github.com/PaddlePaddle/Paddle/issues/50631#task180)

## 2、功能目标
将地平线推理引擎接入FastDeploy,开发HorizonBackends部分,同时针对PP-YOLOE开发对应的前后处理部分。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Contributor

@Zheng-Bicheng Zheng-Bicheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有些小问题哈,再修改下


4. 将backends集成进FastDeploy

5. 分类模型验证正确性
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那你需要在你的RFC中提到你需要移植哪一个Clas模型哦。

* 测试PP-YOLOE模型的正确性,检查有无内存泄露(2023-3-23至2023-3-30)
* 提交PR(2023-3-30)

# 名词解释
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里如果没有名词解释和参考资料可以直接删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好,这块我再修改下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zheng-Bicheng 大佬有空再帮忙review下吧

Copy link
Contributor

@Zheng-Bicheng Zheng-Bicheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Zheng-Bicheng
Copy link
Contributor

@jiangjiajun 我这边没啥问题了。

@jiangjiajun jiangjiajun merged commit 30cb05b into PaddlePaddle:master Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants