[Model] Refactor PaddleDetection module (#575)

* Add namespace for functions

* Refactor PaddleDetection module

* finish all the single image test

* Update preprocessor.cc

* fix some litte detail

* add python api

* Update postprocessor.cc
This commit is contained in:
Jason
2022-11-15 10:43:23 +08:00
committed by GitHub
parent aa21272eaa
commit beaa0fd190
39 changed files with 1282 additions and 1438 deletions

View File

@@ -18,31 +18,8 @@ namespace fastdeploy {
void BindPPTinyPosePipeline(pybind11::module& m) {
pybind11::class_<pipeline::PPTinyPose>(m, "PPTinyPose")
// explicitly pybind more kinds of detection models here
.def(pybind11::init<fastdeploy::vision::detection::PPYOLOE*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::PicoDet*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::PPYOLO*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::PPYOLOv2*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::PaddleYOLOX*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::FasterRCNN*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::YOLOv3*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def(pybind11::init<fastdeploy::vision::detection::MaskRCNN*,
fastdeploy::vision::keypointdetection::PPTinyPose*>())
.def("predict", [](pipeline::PPTinyPose& self,
pybind11::array& data) {
auto mat = PyArrayToCvMat(data);