[Model] Fix nms problem (#2230)

fix nms problem
This commit is contained in:
Jason
2023-10-10 01:24:33 -07:00
committed by GitHub
parent aab27b3db5
commit d910d6116c
2 changed files with 6 additions and 1 deletions

View File

@@ -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;

View File

@@ -494,7 +494,6 @@ class PaddleYOLOv5(PPYOLOE):
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)