mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Model] Refactor YOLOv7 module (#611)
* add paddle_trt in benchmark * update benchmark in device * update benchmark * update result doc * fixed for CI * update python api_docs * update index.rst * add runtime cpp examples * deal with comments * Update infer_paddle_tensorrt.py * Add runtime quick start * deal with comments * fixed reused_input_tensors&&reused_output_tensors * fixed docs * fixed headpose typo * fixed typo * refactor yolov5 * update model infer * refactor pybind for yolov5 * rm origin yolov5 * fixed bugs * rm cuda preprocess * fixed bugs * fixed bugs * fixed bug * fixed bug * fix pybind * rm useless code * add convert_and_permute * fixed bugs * fixed im_info for bs_predict * fixed bug * add bs_predict for yolov5 * Add runtime test and batch eval * deal with comments * fixed bug * update testcase * fixed batch eval bug * fixed preprocess bug * refactor yolov7 * add yolov7 testcase * rm resize_after_load and add is_scale_up * fixed bug * set multi_label true Co-authored-by: Jason <928090362@qq.com>
This commit is contained in:
@@ -41,9 +41,19 @@ class YOLOv5Preprocessor:
|
||||
|
||||
@property
|
||||
def padding_value(self):
|
||||
"""
|
||||
padding value for preprocessing, default [114.0, 114.0, 114.0]
|
||||
"""
|
||||
# padding value, size should be the same as channels
|
||||
return self._preprocessor.padding_value
|
||||
|
||||
@property
|
||||
def is_scale_up(self):
|
||||
"""
|
||||
is_scale_up for preprocessing, the input image only can be zoom out, the maximum resize scale cannot exceed 1.0, default true
|
||||
"""
|
||||
return self._preprocessor.is_scale_up
|
||||
|
||||
@size.setter
|
||||
def size(self, wh):
|
||||
assert isinstance(wh, (list, tuple)),\
|
||||
@@ -60,6 +70,13 @@ class YOLOv5Preprocessor:
|
||||
list), "The value to set `padding_value` must be type of list."
|
||||
self._preprocessor.padding_value = value
|
||||
|
||||
@is_scale_up.setter
|
||||
def is_scale_up(self, value):
|
||||
assert isinstance(
|
||||
value,
|
||||
bool), "The value to set `is_scale_up` must be type of bool."
|
||||
self._preprocessor.is_scale_up = value
|
||||
|
||||
|
||||
class YOLOv5Postprocessor:
|
||||
def __init__(self):
|
||||
@@ -93,7 +110,7 @@ class YOLOv5Postprocessor:
|
||||
@property
|
||||
def multi_label(self):
|
||||
"""
|
||||
multi_label for postprocessing, default is true
|
||||
multi_label for postprocessing, set true for eval, default is True
|
||||
"""
|
||||
return self._postprocessor.multi_label
|
||||
|
||||
|
Reference in New Issue
Block a user