Skip to content

Commit

Permalink
[Model] Fix nms problem (#2230)
Browse files Browse the repository at this point in the history
fix nms problem
  • Loading branch information
jiangjiajun committed Oct 10, 2023
1 parent aab27b3 commit d910d61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fastdeploy/vision/detection/ppdet/ppdet_pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ void BindPPDet(pybind11::module& m) {
[](vision::detection::PaddleDetPostprocessor& self) {
self.ApplyNMS();
})
.def("apply_nms",
[](vision::detection::PaddleDetPostprocessor& self,
vision::detection::NMSOption& option) {
self.ApplyNMS();
self.SetNMSOption(option);
})
.def("run", [](vision::detection::PaddleDetPostprocessor& self,
std::vector<pybind11::array>& input_array) {
std::vector<vision::DetectionResult> results;
Expand Down
1 change: 0 additions & 1 deletion python/fastdeploy/vision/detection/ppdet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ def __init__(self,

super(PPYOLOE, self).__init__(runtime_option)

assert model_format == ModelFormat.PADDLE, "PaddleYOLOv5 model only support model format of ModelFormat.Paddle now."
self._model = C.vision.detection.PaddleYOLOv5(
model_file, params_file, config_file, self._runtime_option,
model_format)
Expand Down

0 comments on commit d910d61

Please sign in to comment.