소스 검색

fixed predict threh set (#3678)

学卿 8 달 전
부모
커밋
76b6ebcf40
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      paddlex/inference/models/object_detection/predictor.py

+ 1 - 1
paddlex/inference/models/object_detection/predictor.py

@@ -245,7 +245,7 @@ class DetPredictor(BasicPredictor):
         boxes = self.post_op(
             preds_list,
             datas,
-            threshold=threshold or self.threshold,
+            threshold=threshold if threshold is not None else self.threshold,
             layout_nms=layout_nms or self.layout_nms,
             layout_unclip_ratio=layout_unclip_ratio or self.layout_unclip_ratio,
             layout_merge_bboxes_mode=layout_merge_bboxes_mode