Skip to content

Commit 452cd35

Browse files
authored
Fix typos (#3531)
1 parent d082987 commit 452cd35

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/module_usage/tutorials/ocr_modules/text_detection.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ python main.py -c paddlex/configs/modules/text_detection/PP-OCRv4_mobile_det.yam
464464
```
465465
The steps required are:
466466

467-
* Specify the path to the model's `.yaml` configuration file (here it's `PP-OCRv4_mobile_det.yaml`,When training other models, you need to specify the corresponding configuration files. The relationship between the model and configuration files can be found in the [PaddleX Model List (CPU/GPU)](../../../support_list/models_list.en.md))
467+
* Specify the path to the model's `.yaml` configuration file (here it's `PP-OCRv4_mobile_det.yaml`. When training other models, you need to specify the corresponding configuration files. The relationship between the model and configuration files can be found in the [PaddleX Model List (CPU/GPU)](../../../support_list/models_list.en.md))
468468
* Set the mode to model training: `-o Global.mode=train`
469469
* Specify the path to the training dataset: `-o Global.dataset_dir`
470470
Other related parameters can be set by modifying the `Global` and `Train` fields in the `.yaml` configuration file or adjusted by appending parameters in the command line. For example, to specify training on the first two GPUs: `-o Global.device=gpu:0,1`; to set the number of training epochs to 10: `-o Train.epochs_iters=10`. For more modifiable parameters and their detailed explanations, refer to the [PaddleX Common Configuration Parameters Documentation](../../../module_usage/instructions/config_parameters_common.en.md).

paddlex/inference/models/text_detection/processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def box_score_fast(self, bitmap, _box):
394394
return cv2.mean(bitmap[ymin : ymax + 1, xmin : xmax + 1], mask)[0]
395395

396396
def box_score_slow(self, bitmap, contour):
397-
"""box_score_slow: use polyon mean score as the mean score"""
397+
"""box_score_slow: use polygon mean score as the mean score"""
398398
h, w = bitmap.shape[:2]
399399
contour = contour.copy()
400400
contour = np.reshape(contour, (-1, 2))

paddlex/inference/utils/io/readers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def get_fps(self):
403403
return self._cap.get_avg_fps()
404404

405405
def read_file(self, in_path):
406-
"""read vidio file from path"""
406+
"""read video file from path"""
407407
self._cap = self.decord_module.VideoReader(in_path)
408408
frame_len = len(self._cap)
409409
if self.sample_type == "uniform":

paddlex/paddlex_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def _copy_additional_files(input_dir, output_dir):
417417

418418
# for CLI
419419
def main():
420-
"""API for commad line"""
420+
"""API for command line"""
421421
parser, pipeline_args = args_cfg()
422422
args = parser.parse_args()
423423

paddlex/utils/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def parse_config(cfg_file):
7171
def print_dict(d, delimiter=0):
7272
"""
7373
Recursively visualize a dict and
74-
indenting acrrording by the relationship of keys.
74+
indenting according by the relationship of keys.
7575
"""
7676
placeholder = "-" * 60
7777
for k, v in sorted(d.items()):
@@ -125,7 +125,7 @@ def parse_str(s):
125125
return s
126126

127127
assert isinstance(dl, (list, dict)), "{} should be a list or a dict"
128-
assert len(ks) > 0, "lenght of keys should larger than 0"
128+
assert len(ks) > 0, "length of keys should larger than 0"
129129
if isinstance(dl, list):
130130
k = parse_str(ks[0])
131131
if len(ks) == 1:

0 commit comments

Comments
 (0)