Fix typos (#14941)
parent
33fa33e4a9
commit
715b1d9aa4
|
@ -33,7 +33,7 @@ class RandomScale:
|
|||
def __init__(self, scales, random_rate):
|
||||
"""
|
||||
:param scales: 尺度
|
||||
:param ramdon_rate: 随机系数
|
||||
:param random_rate: 随机系数
|
||||
:return:
|
||||
"""
|
||||
self.random_rate = random_rate
|
||||
|
@ -64,7 +64,7 @@ class RandomRotateImgBox:
|
|||
def __init__(self, degrees, random_rate, same_size=False):
|
||||
"""
|
||||
:param degrees: 角度,可以是一个数值或者list
|
||||
:param ramdon_rate: 随机系数
|
||||
:param random_rate: 随机系数
|
||||
:param same_size: 是否保持和原图一样大
|
||||
:return:
|
||||
"""
|
||||
|
@ -145,7 +145,7 @@ class RandomResize:
|
|||
def __init__(self, size, random_rate, keep_ratio=False):
|
||||
"""
|
||||
:param input_size: resize尺寸,数字或者list的形式,如果为list形式,就是[w,h]
|
||||
:param ramdon_rate: 随机系数
|
||||
:param random_rate: 随机系数
|
||||
:param keep_ratio: 是否保持长宽比
|
||||
:return:
|
||||
"""
|
||||
|
@ -280,7 +280,7 @@ class HorizontalFlip:
|
|||
return data
|
||||
|
||||
|
||||
class VerticallFlip:
|
||||
class VerticalFlip:
|
||||
def __init__(self, random_rate):
|
||||
"""
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class BasicBlock(nn.Layer):
|
|||
planes, planes, kernel_size=3, padding=1, bias_attr=False
|
||||
)
|
||||
else:
|
||||
from paddle.version.ops import DeformConv2D
|
||||
from paddle.vision.ops import DeformConv2D
|
||||
|
||||
deformable_groups = dcn.get("deformable_groups", 1)
|
||||
offset_channels = 18
|
||||
|
|
|
@ -35,7 +35,7 @@ from utils.util import draw_bbox, save_result
|
|||
class InferenceEngine(object):
|
||||
"""InferenceEngine
|
||||
|
||||
Inference engina class which contains preprocess, run, postprocess
|
||||
Inference engine class which contains preprocess, run, postprocess
|
||||
"""
|
||||
|
||||
def __init__(self, args):
|
||||
|
|
|
@ -69,7 +69,7 @@ class PaddleModel:
|
|||
|
||||
def predict(self, img_path: str, is_output_polygon=False, short_size: int = 1024):
|
||||
"""
|
||||
对传入的图像进行预测,支持图像地址,opecv 读取图片,偏慢
|
||||
对传入的图像进行预测,支持图像地址,opencv 读取图片,偏慢
|
||||
:param img_path: 图像地址
|
||||
:param is_numpy:
|
||||
:return:
|
||||
|
|
|
@ -209,7 +209,7 @@ class DetectionDetEvalEvaluator(object):
|
|||
precision = 0 if len(detRects) > 0 else 1
|
||||
|
||||
if len(detRects) > 0:
|
||||
# Calculate recall and precision matrixs
|
||||
# Calculate recall and precision matrixes
|
||||
outputShape = [len(gtRects), len(detRects)]
|
||||
recallMat = np.empty(outputShape)
|
||||
precisionMat = np.empty(outputShape)
|
||||
|
|
|
@ -187,7 +187,7 @@ class DetectionICDAR2013Evaluator(object):
|
|||
precision = 0 if len(detRects) > 0 else 1
|
||||
|
||||
if len(detRects) > 0:
|
||||
# Calculate recall and precision matrixs
|
||||
# Calculate recall and precision matrixes
|
||||
outputShape = [len(gtRects), len(detRects)]
|
||||
recallMat = np.empty(outputShape)
|
||||
precisionMat = np.empty(outputShape)
|
||||
|
|
|
@ -303,7 +303,7 @@ class Config(object):
|
|||
def print_cfg(self, print_func=print):
|
||||
"""
|
||||
Recursively visualize a dict and
|
||||
indenting acrrording by the relationship of keys.
|
||||
indenting according by the relationship of keys.
|
||||
"""
|
||||
print_func("----------- Config -----------")
|
||||
print_dict(self.cfg, print_func)
|
||||
|
|
Loading…
Reference in New Issue