-
Notifications
You must be signed in to change notification settings - Fork 465
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
Add new model PaddleSeg #30
Conversation
felixhjh
commented
Jul 19, 2022
•
edited
Loading
edited
- 支持PaddleSeg部署
- 支持PaddleSeg可视化
Fix bug while the inference result is empty with YOLOv5 (PaddlePaddle#29)
fastdeploy/vision/ppseg/model.cc
Outdated
int height = mat->Height(); | ||
output->name = InputInfoOfRuntime(0).name; | ||
output->SetExternalData({1, channel, height, width}, FDDataType::FP32, | ||
mat->GetCpuMat()->ptr()); |
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.
这个mat->GetCpuMat()后面可能会删除,现在改成使用
mat->ShareWithTensor(&output);
output->shape.insert(output->shape.begin(), 1);
|
||
bool Model::Postprocess(const FDTensor& infer_result, | ||
SegmentationResult* result) { | ||
result->Clear(); |
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.
看这里是设定模型的输入是已经过完argmax,输出的int64的值,那在函数初始加一个判断吧
FDASSERT(infer_result.dtype == FDDataType::INT64, "Require the data type of output is int64, but now it's " + Str(infer_result.dtype) + ".");
@@ -27,8 +27,11 @@ class FASTDEPLOY_DECL Visualize { | |||
static const std::vector<int>& GetColorMap(int num_classes = 1000); | |||
static void VisDetection(cv::Mat* im, const DetectionResult& result, | |||
int line_size = 2, float font_size = 0.5f); | |||
static void VisSegmentation(const cv::Mat& im, | |||
const SegmentationResult& result, | |||
cv::Mat* vis_img, const int& num_classes = 19); |
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.
这里默认值也设成1000吧
* Add new model PaddleSeg (#30) * Support new model PaddleSeg * Fix conflict * PaddleSeg add visulization function * fix bug * Fix BindPPSeg wrong name * Fix variable name * Update by comments * Add ppseg-unet example python version Co-authored-by: Jason <jiangjiajun@baidu.com> * Add NanoDet-Plus Model support (#32) * update .gitignore * Added checking for cmake include dir * fixed missing trt_backend option bug when init from trt * remove un-need data layout and add pre-check for dtype * changed RGB2BRG to BGR2RGB in ppcls model * add model_zoo yolov6 c++/python demo * fixed CMakeLists.txt typos * update yolov6 cpp/README.md * add yolox c++/pybind and model_zoo demo * move some helpers to private * fixed CMakeLists.txt typos * add normalize with alpha and beta * add version notes for yolov5/yolov6/yolox * add copyright to yolov5.cc * revert normalize * fixed some bugs in yolox * Add NanoDet-Plus Model support Co-authored-by: Jason <jiangjiajun@baidu.com> * Add Paddle Inference as backend (#33) * Add Paddle Inference as backend * Update CMakeLists.txt * Fix default backend option * Fix some log bug and backend choosing strategy * Add version of g++ Co-authored-by: huangjianhui <852142024@qq.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
* [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>
* [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [YOLOv8] add PaddleYOLOv8 pybind11 (#1144) (#31) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [benchmark] add PaddleYOLOv8 -> benchmark * [benchmark] add PaddleYOLOv8 -> benchmark * [Lite] Support PaddleYOLOv8 with Lite Backend Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>
* [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [YOLOv8] add PaddleYOLOv8 pybind11 (#1144) (#31) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [benchmark] add PaddleYOLOv8 -> benchmark * [benchmark] add PaddleYOLOv8 -> benchmark * [Lite] Support PaddleYOLOv8 with Lite Backend * [Pick] Update from latest develop (#32) * [Model] Support Insightface model inferenceing on RKNPU (#1113) * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * 更新交叉编译 * Update issues.md * Update fastdeploy_init.sh * 更新交叉编译 * 更新insightface系列模型的rknpu2支持 * 更新insightface系列模型的rknpu2支持 * 更新说明文档 * 更新insightface * 尝试解决pybind问题 Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Jason <jiangjiajun@baidu.com> * [Other] Add Function For Aligning Face With Five Points (#1124) * 更新5点人脸对齐的代码 * 更新代码格式 * 解决comment * update example * 更新注释 Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com> * [Lite] Support PaddleYOLOv8 with Lite Backend (#1145) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [YOLOv8] add PaddleYOLOv8 pybind11 (#1144) (#31) * [Model] Support PaddleYOLOv8 model * [YOLOv8] Add PaddleYOLOv8 pybind * [Other] update from latest develop (#30) * [Backend] Remove all lite options in RuntimeOption (#1109) * Remove all lite options in RuntimeOption * Fix code error * move pybind * Fix build error * [Backend] Add TensorRT FP16 support for AdaptivePool2d (#1116) * add fp16 cuda kernel * fix code bug * update code * [Doc] Fix KunlunXin doc (#1139) fix kunlunxin doc * [Model] Support PaddleYOLOv8 model (#1136) Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [benchmark] add PaddleYOLOv8 -> benchmark * [benchmark] add PaddleYOLOv8 -> benchmark * [Lite] Support PaddleYOLOv8 with Lite Backend Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> * [Model] Add Silero VAD example (#1107) * add vad example * fix typo * fix typo * rename file * remove model and wav * delete Vad.cc * delete Vad.h * rename and format * fix max and min * update readme * rename var * format * add params * update readme * update readme * Update README.md * Update README_CN.md Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com> Co-authored-by: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Qianhe Chen <54462604+chenqianhe@users.noreply.github.com> * [YOLOv8] Support PaddleYOLOv8 on Kunlunxin&Ascend * [YOLOv8] Add PaddleYOLOv8 model download links * [YOLOv8] Add PaddleYOLOv8 Box AP Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Co-authored-by: Zheng-Bicheng <58363586+Zheng-Bicheng@users.noreply.github.com> Co-authored-by: Jason <928090362@qq.com> Co-authored-by: Qianhe Chen <54462604+chenqianhe@users.noreply.github.com>