Skip to content

Commit d910d61

Browse files
authored
[Model] Fix nms problem (#2230)
fix nms problem
1 parent aab27b3 commit d910d61

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

fastdeploy/vision/detection/ppdet/ppdet_pybind.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ void BindPPDet(pybind11::module& m) {
8787
[](vision::detection::PaddleDetPostprocessor& self) {
8888
self.ApplyNMS();
8989
})
90+
.def("apply_nms",
91+
[](vision::detection::PaddleDetPostprocessor& self,
92+
vision::detection::NMSOption& option) {
93+
self.ApplyNMS();
94+
self.SetNMSOption(option);
95+
})
9096
.def("run", [](vision::detection::PaddleDetPostprocessor& self,
9197
std::vector<pybind11::array>& input_array) {
9298
std::vector<vision::DetectionResult> results;

python/fastdeploy/vision/detection/ppdet/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ def __init__(self,
494494

495495
super(PPYOLOE, self).__init__(runtime_option)
496496

497-
assert model_format == ModelFormat.PADDLE, "PaddleYOLOv5 model only support model format of ModelFormat.Paddle now."
498497
self._model = C.vision.detection.PaddleYOLOv5(
499498
model_file, params_file, config_file, self._runtime_option,
500499
model_format)

0 commit comments

Comments
 (0)