Bobholamovic пре 2 година
родитељ
комит
3fa21dd1f8
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      docs/apis/infer_cn.md
  2. 2 2
      docs/apis/infer_en.md

+ 1 - 1
docs/apis/infer_cn.md

@@ -172,7 +172,7 @@ def slider_predict(self,
 |`img_file`|`str`|输入影像路径。||
 |`save_dir`|`str`|预测结果输出路径。||
 |`block_size`|`list[int]` \| `tuple[int]` \| `int`|滑窗的窗口大小(以列表或元组指定宽度、高度或以一个整数指定相同的宽高)。||
-|`overlap`|`list[int]` \| `tuple[int]` \| `int`|滑窗的滑动步长(以列表或元组指定宽度、高度或以一个整数指定相同的宽高)。|`36`|
+|`overlap`|`list[int]` \| `tuple[int]` \| `int`|相邻滑窗的重叠像素数(以列表或元组指定宽度、高度或以一个整数指定相同的宽高)。|`36`|
 |`transforms`|`paddlers.transforms.Compose` \| `None`|对输入数据应用的数据变换算子。若为`None`,则使用训练器在验证阶段使用的数据变换算子。|`None`|
 |`invalid_value`|`int`|输出影像中用于标记无效像素的数值。|`255`|
 |`merge_strategy`|`str`|合并滑窗重叠区域使用的策略。`'keep_first'`表示保留遍历顺序(从左至右,从上往下,列优先)最靠前的窗口的预测类别;`'keep_last'`表示保留遍历顺序最靠后的窗口的预测类别;`'accum'`表示通过将各窗口在重叠区域给出的预测概率累加,计算最终预测类别。需要注意的是,在对大尺寸影像进行`overlap`较大的密集推理时,使用`'accum'`策略可能导致较长的推理时间,但一般能够在窗口交界部分取得更好的表现。|`'keep_last'`|

+ 2 - 2
docs/apis/infer_en.md

@@ -171,8 +171,8 @@ Input parameter list:
 |-------|----|--------|-----|
 |`img_file`|`str`|Input image path.||
 |`save_dir`|`str`|Directory to store predicted results.||
-|`block_size`|`list[int]` \| `tuple[int]` \| `int`|Size of the sliding window (specifying the width and height in a list or tuple, or the same width and height in an integer).||
-|`overlap`|`list[int]` \| `tuple[int]` \| `int`|Sliding step size of the sliding window (specifying the width and height in a list or tuple, or the same width and height in an integer).|`36`|
+|`block_size`|`list[int]` \| `tuple[int]` \| `int`|Size of the sliding window. Specify the width and height in a list or tuple, or the same width and height in an integer.||
+|`overlap`|`list[int]` \| `tuple[int]` \| `int`|Overlap of adjacent windows in pixels. Specify the width and height in a list or tuple, or the same width and height in an integer).|`36`|
 |`transforms`|`paddlers.transforms.Compose` \| `None`|Apply data transformation operators to input data. If `None`, the data transformation operators of trainer in the validation phase is used.|`None`|
 |`invalid_value`|`int`|Value used to mark invalid pixels in the output image.|`255`|
 |`merge_strategy`|`str`|Strategies used to merge sliding window overlapping areas.`'keep_first'` means retaining the prediction category of the first window in the traversal order (left to right, top to bottom, column first); `'keep_last'` stands for keeping the prediction category of the last window in the traversal order; `'accum'` means determining the final prediction categories in the overlapping area by summing the prediction probabilities given by each window. It should be noted that when dense inference with large `overlap` is carried out for large size images, using `'accum'` strategy may lead to longer inference time, but generally it can achieve better performance at the window boundary.|`'keep_last'`|