Jan 8 hónapja
szülő
commit
e09646c8cb

+ 1 - 1
docs/module_usage/tutorials/ocr_modules/text_detection.en.md

@@ -464,7 +464,7 @@ python main.py -c paddlex/configs/modules/text_detection/PP-OCRv4_mobile_det.yam
 ```
 The steps required are:
 
-* 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))
+* 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))
 * Set the mode to model training: `-o Global.mode=train`
 * Specify the path to the training dataset: `-o Global.dataset_dir`
 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).

+ 1 - 1
paddlex/inference/models/text_detection/processors.py

@@ -398,7 +398,7 @@ class DBPostProcess:
         return cv2.mean(bitmap[ymin : ymax + 1, xmin : xmax + 1], mask)[0]
 
     def box_score_slow(self, bitmap, contour):
-        """box_score_slow: use polyon mean score as the mean score"""
+        """box_score_slow: use polygon mean score as the mean score"""
         h, w = bitmap.shape[:2]
         contour = contour.copy()
         contour = np.reshape(contour, (-1, 2))

+ 1 - 1
paddlex/inference/utils/io/readers.py

@@ -403,7 +403,7 @@ class DecordVideoReaderBackend(_VideoReaderBackend):
         return self._cap.get_avg_fps()
 
     def read_file(self, in_path):
-        """read vidio file from path"""
+        """read video file from path"""
         self._cap = self.decord_module.VideoReader(in_path)
         frame_len = len(self._cap)
         if self.sample_type == "uniform":

+ 1 - 1
paddlex/paddlex_cli.py

@@ -425,7 +425,7 @@ def paddle_to_onnx(paddle_model_dir, onnx_model_dir, *, opset_version):
 
 # for CLI
 def main():
-    """API for commad line"""
+    """API for command line"""
     parser, pipeline_args = args_cfg()
     args = parser.parse_args()
 

+ 2 - 2
paddlex/utils/config.py

@@ -71,7 +71,7 @@ def parse_config(cfg_file):
 def print_dict(d, delimiter=0):
     """
     Recursively visualize a dict and
-    indenting acrrording by the relationship of keys.
+    indenting according by the relationship of keys.
     """
     placeholder = "-" * 60
     for k, v in sorted(d.items()):
@@ -125,7 +125,7 @@ def override(dl, ks, v):
             return s
 
     assert isinstance(dl, (list, dict)), "{} should be a list or a dict"
-    assert len(ks) > 0, "lenght of keys should larger than 0"
+    assert len(ks) > 0, "length of keys should larger than 0"
     if isinstance(dl, list):
         k = parse_str(ks[0])
         if len(ks) == 1: