Forráskód Böngészése

[Infra] Prune and sort imports (#3694)

* Fix style

* Fix comment

* Improve

* Align opencv variants

* Fix header comments

* Fix 3D op bugs

* Rename 3d_bev_detection to legal module name m_3d_bev_detection

* Fix bug

* Fix requirements

* Remove added deps

* Add default constraints

* Add constraint

* Remove albumentations
Lin Manhui 7 hónapja
szülő
commit
bc54f1bb90
100 módosított fájl, 238 hozzáadás és 239 törlés
  1. 10 1
      .pre-commit-config.yaml
  2. 6 3
      .precommit/check_custom.py
  3. 1 1
      api_examples/pipelines/test_3d_bev_detection.py
  4. 2 2
      api_examples/pipelines/test_anomaly_detection.py
  5. 1 1
      api_examples/pipelines/test_doc_preprocessor.py
  6. 1 1
      api_examples/pipelines/test_formula_recognition.py
  7. 1 1
      api_examples/pipelines/test_image_classification.py
  8. 1 1
      api_examples/pipelines/test_image_multilabel_classification.py
  9. 1 1
      api_examples/pipelines/test_layout_parsing.py
  10. 1 1
      api_examples/pipelines/test_multilingual_speech_recognition.py
  11. 4 4
      api_examples/pipelines/test_object_detection.py
  12. 1 1
      api_examples/pipelines/test_ocr.py
  13. 1 1
      api_examples/pipelines/test_pedestrian_attribute_rec.py
  14. 1 1
      api_examples/pipelines/test_pp_chatocrv3.py
  15. 1 1
      api_examples/pipelines/test_pp_chatocrv4.py
  16. 1 1
      api_examples/pipelines/test_pp_structure_v3.py
  17. 1 1
      api_examples/pipelines/test_seal_recognition.py
  18. 1 1
      api_examples/pipelines/test_shitu.py
  19. 1 1
      api_examples/pipelines/test_table_recognition.py
  20. 1 1
      api_examples/pipelines/test_table_recognition_v2.py
  21. 2 2
      api_examples/pipelines/test_ts_anomaly_detection.py
  22. 2 2
      api_examples/pipelines/test_ts_classification.py
  23. 2 2
      api_examples/pipelines/test_ts_forecast.py
  24. 1 1
      api_examples/pipelines/test_vehicle_attribute_rec.py
  25. 1 1
      api_examples/pipelines/test_video_classification.py
  26. 1 1
      api_examples/pipelines/test_video_detection.py
  27. 1 1
      docs/other_devices_support/multi_devices_use_guide.en.md
  28. 14 16
      docs/practical_tutorials/layout_detection.en.md
  29. 1 1
      docs/practical_tutorials/table_recognition_v2_tutorial.md
  30. 2 2
      docs/practical_tutorials/ts_anomaly_detection.en.md
  31. 1 1
      docs/practical_tutorials/ts_classification.en.md
  32. 4 3
      install_pdx.py
  33. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/__init__.py
  34. 6 6
      libs/paddlex-hpi/src/paddlex_hpi/_config.py
  35. 3 3
      libs/paddlex-hpi/src/paddlex_hpi/_model_info.py
  36. 2 2
      libs/paddlex-hpi/src/paddlex_hpi/_strategy.py
  37. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/_utils/__init__.py
  38. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/_utils/compat.py
  39. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/_utils/misc.py
  40. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/_utils/typing.py
  41. 1 1
      libs/paddlex-hpi/src/paddlex_hpi/models/__init__.py
  42. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/anomaly_detection.py
  43. 5 14
      libs/paddlex-hpi/src/paddlex_hpi/models/base.py
  44. 3 4
      libs/paddlex-hpi/src/paddlex_hpi/models/face_recognition.py
  45. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/formula_recognition.py
  46. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/general_recognition.py
  47. 5 5
      libs/paddlex-hpi/src/paddlex_hpi/models/image_classification.py
  48. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/image_unwarping.py
  49. 5 5
      libs/paddlex-hpi/src/paddlex_hpi/models/instance_segmentation.py
  50. 6 6
      libs/paddlex-hpi/src/paddlex_hpi/models/multilabel_classification.py
  51. 5 5
      libs/paddlex-hpi/src/paddlex_hpi/models/object_detection.py
  52. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/semantic_segmentation.py
  53. 6 8
      libs/paddlex-hpi/src/paddlex_hpi/models/table_recognition.py
  54. 5 5
      libs/paddlex-hpi/src/paddlex_hpi/models/text_detection.py
  55. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/text_recognition.py
  56. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/ts_ad.py
  57. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/ts_cls.py
  58. 4 4
      libs/paddlex-hpi/src/paddlex_hpi/models/ts_fc.py
  59. 1 1
      libs/paddlex-hpi/tests/__init__.py
  60. 1 1
      libs/paddlex-hpi/tests/models/__init__.py
  61. 1 2
      libs/paddlex-hpi/tests/models/base.py
  62. 3 3
      libs/paddlex-hpi/tests/models/test_anomaly_detection.py
  63. 3 3
      libs/paddlex-hpi/tests/models/test_face_recognition.py
  64. 3 3
      libs/paddlex-hpi/tests/models/test_formula_recognition.py
  65. 3 3
      libs/paddlex-hpi/tests/models/test_general_recognition.py
  66. 3 3
      libs/paddlex-hpi/tests/models/test_image_classification.py
  67. 3 3
      libs/paddlex-hpi/tests/models/test_image_unwarping.py
  68. 3 3
      libs/paddlex-hpi/tests/models/test_instance_segmentation.py
  69. 3 3
      libs/paddlex-hpi/tests/models/test_multilabel_classification.py
  70. 3 3
      libs/paddlex-hpi/tests/models/test_object_detection.py
  71. 3 3
      libs/paddlex-hpi/tests/models/test_semantic_segmentation.py
  72. 3 3
      libs/paddlex-hpi/tests/models/test_table_recognition.py
  73. 3 3
      libs/paddlex-hpi/tests/models/test_text_detection.py
  74. 3 3
      libs/paddlex-hpi/tests/models/test_text_recognition.py
  75. 3 3
      libs/paddlex-hpi/tests/models/test_ts_ad.py
  76. 3 3
      libs/paddlex-hpi/tests/models/test_ts_cls.py
  77. 3 3
      libs/paddlex-hpi/tests/models/test_ts_fc.py
  78. 1 1
      libs/paddlex-hpi/tests/testing_utils/__init__.py
  79. 1 1
      libs/paddlex-hpi/tests/testing_utils/cv.py
  80. 1 1
      libs/paddlex-hpi/tests/testing_utils/download.py
  81. 1 1
      libs/paddlex-hpi/tests/testing_utils/misc.py
  82. 1 1
      libs/ultra-infer/CMakeLists.txt
  83. 1 1
      libs/ultra-infer/cmake/build_tools.cmake
  84. 1 1
      libs/ultra-infer/cmake/cvcuda.cmake
  85. 1 1
      libs/ultra-infer/cmake/faiss.cmake
  86. 1 1
      libs/ultra-infer/cmake/fast_tokenizer.cmake
  87. 1 1
      libs/ultra-infer/cmake/flycv.cmake
  88. 1 1
      libs/ultra-infer/cmake/gflags.cmake
  89. 1 1
      libs/ultra-infer/cmake/glog.cmake
  90. 1 1
      libs/ultra-infer/cmake/gtest.cmake
  91. 1 1
      libs/ultra-infer/cmake/onnxruntime.cmake
  92. 1 1
      libs/ultra-infer/cmake/opencv.cmake
  93. 1 1
      libs/ultra-infer/cmake/openvino.cmake
  94. 1 1
      libs/ultra-infer/cmake/paddle2onnx.cmake
  95. 1 1
      libs/ultra-infer/cmake/paddle_inference.cmake
  96. 1 1
      libs/ultra-infer/cmake/paddlelite.cmake
  97. 1 1
      libs/ultra-infer/cmake/poros.cmake
  98. 1 1
      libs/ultra-infer/cmake/summary.cmake
  99. 1 1
      libs/ultra-infer/python/__init__.py
  100. 2 1
      libs/ultra-infer/python/requirements.txt

+ 10 - 1
.pre-commit-config.yaml

@@ -39,10 +39,19 @@ repos:
     -   id: flake8
         args:
             - --count
-            - --select=E9,F63,F7,F82,E721
+            - --select=E9,F63,F7,F82,E721,F401
+            - --per-file-ignores=__init__.py:F401
             - --show-source
             - --statistics
 
+# isort
+-   repo: https://github.com/pycqa/isort
+    rev: 5.12.0
+    hooks:
+    -   id: isort
+        args:
+            - --profile=black
+
 # check license
 -   repo: local
     hooks:

+ 6 - 3
.precommit/check_custom.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -16,7 +16,9 @@ import os
 import re
 import sys
 
-LICENSE_TEXT = """# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+YEAR_PATTERN = r"(?:20\d\d)"
+LICENSE_TEXT = re.escape(
+    """# Copyright (c) <YEAR_PATTERN> PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -30,6 +32,7 @@ LICENSE_TEXT = """# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """
+).replace("<YEAR_PATTERN>", YEAR_PATTERN)
 
 
 def check(file_path):
@@ -38,7 +41,7 @@ def check(file_path):
     # Exclude shebang line
     if content.startswith("#!"):
         content = content[content.index("\n") + 1 :]
-    if not content.startswith(LICENSE_TEXT):
+    if not re.match(LICENSE_TEXT, content):
         print(f"License header missing in {file_path}")
         return False
     if "paddlex" in file_path.split(os.sep):

+ 1 - 1
api_examples/pipelines/test_3d_bev_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 2 - 2
api_examples/pipelines/test_anomaly_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,4 +21,4 @@ for res in output:
     print(res)
     res.print()  ## 打印预测的结构化输出
     res.save_to_img("./output/")  ## 保存结果可视化图像
-    res.save_to_json("./output/")  ## 保存预测的结构化输出
+    res.save_to_json("./output/")  ## 保存预测的结构化输出

+ 1 - 1
api_examples/pipelines/test_doc_preprocessor.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_formula_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_image_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_image_multilabel_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_layout_parsing.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_multilingual_speech_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 4 - 4
api_examples/pipelines/test_object_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ output = pipeline.predict(
     threshold={0: 0.45, 2: 0.48, 7: 0.4},
     layout_nms=True,
     layout_merge_bboxes_mode="large",
-    layout_unclip_ratio=(1.0, 1.0)
+    layout_unclip_ratio=(1.0, 1.0),
 )
 
 # output = pipeline.predict(
@@ -32,7 +32,7 @@ output = pipeline.predict(
 #     "./test_samples/general_layout.png",
 #     threshold={0: 0.45, 2: 0.48, 7: 0.4},
 #     layout_nms=False,
-#     layout_merge_bboxes_mode="small", 
+#     layout_merge_bboxes_mode="small",
 #     layout_unclip_ratio=1.1
 # )
 
@@ -40,4 +40,4 @@ for res in output:
     print(res)
     res.print()  ## 打印预测的结构化输出
     res.save_to_img("./output/")  ## 保存结果可视化图像
-    res.save_to_json("./output/")  ## 保存预测的结构化输出
+    res.save_to_json("./output/")  ## 保存预测的结构化输出

+ 1 - 1
api_examples/pipelines/test_ocr.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_pedestrian_attribute_rec.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_pp_chatocrv3.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_pp_chatocrv4.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_pp_structure_v3.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_seal_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_shitu.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_table_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_table_recognition_v2.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 2 - 2
api_examples/pipelines/test_ts_anomaly_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,4 +20,4 @@ output = pipeline.predict("./test_samples/ts_ad.csv")
 for res in output:
     print(res)
     res.print()  ## 打印预测的结构化输出
-    res.save_to_csv("./output/")  ## 保存结果到csv文件
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 2 - 2
api_examples/pipelines/test_ts_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,4 +20,4 @@ output = pipeline.predict("./test_samples/ts_cls.csv")
 for res in output:
     print(res)
     res.print()  ## 打印预测的结构化输出
-    res.save_to_csv("./output/")  ## 保存结果到csv文件
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 2 - 2
api_examples/pipelines/test_ts_forecast.py

@@ -1,4 +1,4 @@
-# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,4 +20,4 @@ output = pipeline.predict("./test_samples/ts_fc.csv")
 for res in output:
     print(res)
     res.print()  ## 打印预测的结构化输出
-    res.save_to_csv("./output/")  ## 保存结果到csv文件
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 1 - 1
api_examples/pipelines/test_vehicle_attribute_rec.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_video_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
api_examples/pipelines/test_video_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
docs/other_devices_support/multi_devices_use_guide.en.md

@@ -166,7 +166,7 @@ All packages are installed.
 
 ## 2. Usage
 
-The usage of PaddleX model pipeline development tool on hardware platforms such as Ascend NPU, Cambricon MLU, Kunlun XPU, Hygon DCU and Enflame GCU is identical to that on GPU. You only need to modify the device configuration parameters according to your hardware platform. 
+The usage of PaddleX model pipeline development tool on hardware platforms such as Ascend NPU, Cambricon MLU, Kunlun XPU, Hygon DCU and Enflame GCU is identical to that on GPU. You only need to modify the device configuration parameters according to your hardware platform.
 Taking the general OCR pipeline as an example to introduce the pipeline development tools.The General OCR Pipeline is designed to solve text recognition tasks, extracting text information from images and outputting it in text form. PP-OCRv4 is an end-to-end OCR system that achieves millisecond-level text content prediction on CPUs, reaching state-of-the-art (SOTA) performance in open-source projects for general scenarios.You can directly use the pre-trained models provided by OCR pipeline for inference.
 * Command line
 

+ 14 - 16
docs/practical_tutorials/layout_detection.en.md

@@ -222,7 +222,7 @@ SubModules:
   ObjectDetection:
     module_name: object_detection
     model_name: PP-DocLayout-L  # Modify it to the layout region detection model name from the model list in the previous text.
-    model_dir: null 
+    model_dir: null
     batch_size: 1
     img_size: null
     threshold: null
@@ -272,7 +272,7 @@ The above command-line method allows you to quickly experience and check the res
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
 
 output = pipeline.predict("layout_test_0.jpg", threshold=0.5)
 for res in output:
@@ -304,7 +304,7 @@ Before running the following code, please download the [sample image](https://pa
 from paddlex import create_pipeline
 
 pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") # 阈值参数不设置时,默认为0.5
-output = pipeline.predict("layout_test_2.jpg") 
+output = pipeline.predict("layout_test_2.jpg")
 for res in output:
     res.print()
     res.save_to_img("./output/")
@@ -318,7 +318,7 @@ In this case, you can enable `threshold={2: 0.6}` to set the detection score thr
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
 output = pipeline.predict("layout_test_2.jpg", threshold={2: 0.6}) # To set the detection score threshold specifically for category 2 (text) to 0.6 while keeping the default threshold of 0.5 for other categories
 for res in output:
     res.print()
@@ -350,7 +350,7 @@ When the overlapping box filtering feature is not enabled, you may notice overla
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
 # output = pipeline.predict("layout_test_2.jpg", threshold=0.5)  # Disabling the overlapping box filtering feature
 output = pipeline.predict("layout_test_2.jpg", threshold=0.5, layout_nms=True)  # Enabling the overlapping box filtering feature
 for res in output:
@@ -380,7 +380,7 @@ The `layout_unclip_ratio` parameter allows you to adjust the side length of the
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
 # output = pipeline.predict("layout_test_2.jpg",  threshold={2: 0.6})  # Without adjusting the scaling factor of the detection box
 output = pipeline.predict("layout_test_2.jpg",  threshold={2: 0.6}, layout_unclip_ratio=(1.0, 1.05))  # Adjust the scaling factor of the height of the detection box to 1.05.
 for res in output:
@@ -411,8 +411,8 @@ The visualization results in the saved directory are as follows. It can be obser
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
-output = pipeline.predict("PMC4836298_00004.jpg") # not setting 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
+output = pipeline.predict("PMC4836298_00004.jpg") # not setting
 # output = pipeline.predict("PMC4836298_00004.jpg", layout_merge_bboxes_mode="small") # 'small' mode
 # output = pipeline.predict("PMC4836298_00004.jpg", layout_merge_bboxes_mode="large") # 'large' mode
 for res in output:
@@ -454,7 +454,7 @@ class LayoutOCRPipeline():
     def __init__(self):
         self.layout_pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")  # Load the custom configuration file mentioned above to create a layout detection pipeline.
         self.ocr_pipeline = create_pipeline(pipeline="OCR") # init OCR pipeline
-        
+
     def crop_table(self, layout_res, layout_name):
         img_path = layout_res["input_path"]
         img = cv2.imread(img_path)
@@ -466,7 +466,7 @@ class LayoutOCRPipeline():
             table_img = img[ymin:ymax, xmin:xmax]
             table_img_list.append(table_img)
         return table_img_list
-    
+
     def predict(self, data, layout_name):
         for layout_res in self.layout_pipeline.predict(data):  # do layout detection
             final_res = {}
@@ -474,8 +474,8 @@ class LayoutOCRPipeline():
             if len(crop_img_list) == 0:
                 continue
             ocr_res = list(self.ocr_pipeline.predict(    # do OCR
-                                                input=crop_img_list, 
-                                                use_doc_orientation_classify=False, 
+                                                input=crop_img_list,
+                                                use_doc_orientation_classify=False,
                                                 use_doc_unwarping=False,
                                                 use_textline_orientation=False
                                                 ))
@@ -510,7 +510,7 @@ If the layout detection performance meets your requirements for inference speed
 ```python
 from paddlex import create_pipeline
 
-pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml") 
+pipeline = create_pipeline(pipeline="./my_path/object_detection.yaml")
 output = pipeline.predict("layout_test_2.jpg", threshold=0.5, layout_nms=True, layout_merge_bboxes_mode="large")
 for res in output:
     res.print()
@@ -535,7 +535,7 @@ tar -xvf paddlex_hps_object_detection_sdk.tar.gz
 
 - In the "Open Source Model Pipeline Deployment Serial Number Consultation and Acquisition" section of the [PaddlePaddle AI Studio Galaxy Community - AI Learning and Training Community](https://aistudio.baidu.com/paddlex/commercialization), select "Get Now," as shown in the image below:
 
-<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/pipeline_deploy/image-1.png"> 
+<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/pipeline_deploy/image-1.png">
 
 Select the target detection pipeline and click "Get." Then, you can find the acquired serial number in the "Open Source Pipeline Deployment SDK Serial Number Management" section at the bottom of the page:
 
@@ -622,5 +622,3 @@ The `client.py` script in the `client` directory contains examples of service ca
 * Edge Deployment: Edge deployment is a method that places computing and data processing capabilities directly on user devices, allowing devices to process data without relying on remote servers. PaddleX supports deploying models on edge devices such as Android. For detailed edge deployment procedures, please refer to the [PaddleX Edge Deployment Guide](../pipeline_deploy/edge_deploy.en.md).
 
 You can choose the appropriate method to deploy the model pipeline based on your needs, and then proceed with the subsequent integration of AI applications.
-
-

+ 1 - 1
docs/practical_tutorials/table_recognition_v2_tutorial.md

@@ -1016,4 +1016,4 @@ python -m pip install paddlex_hps_client-*.whl
 * 基础服务化部署:服务化部署是实际生产环境中常见的一种部署形式。通过将推理功能封装为服务,客户端可以通过网络请求来访问这些服务,以获取推理结果。PaddleX 支持用户以低成本实现产线的服务化部署,详细的服务化部署流程请参考 [PaddleX 服务化部署指南](../pipeline_deploy/serving.md)。
 * 端侧部署:端侧部署是一种将计算和数据处理功能放在用户设备本身上的方式,设备可以直接处理数据,而不需要依赖远程的服务器。PaddleX 支持将模型部署在 Android 等端侧设备上,详细的端侧部署流程请参考 [PaddleX端侧部署指南](../pipeline_deploy/edge_deploy.md)。
 
-您可以根据需要选择合适的方式部署模型产线,进而进行后续的 AI 应用集成。
+您可以根据需要选择合适的方式部署模型产线,进而进行后续的 AI 应用集成。

+ 2 - 2
docs/practical_tutorials/ts_anomaly_detection.en.md

@@ -349,8 +349,8 @@ from paddlex import create_pipeline
 pipeline = create_pipeline(pipeline="my_path/ts_anomaly_detection.yaml")
 output = pipeline.predict("pre_ts.csv")
 for res in output:
-    res.print() 
-    res.save_to_csv("./output/") 
+    res.print()
+    res.save_to_csv("./output/")
 ```
 
 For more parameters, please refer to the [Time Series Anomaly Detection Pipeline Usage Tutorial](../pipeline_usage/tutorials/time_series_pipelines/time_series_anomaly_detection.en.md)

+ 1 - 1
docs/practical_tutorials/ts_classification.en.md

@@ -321,7 +321,7 @@ from paddlex import create_pipeline
 pipeline = create_pipeline(pipeline="my_path/ts_classification.yaml")
 output = pipeline.predict("pre_ts.csv")
 for res in output:
-    res.print() 
+    res.print()
     res.save_to_csv("./output/")
 ```
 

+ 4 - 3
install_pdx.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,9 +13,10 @@
 # limitations under the License.
 
 
-import os
 import argparse
-from paddlex.repo_manager import setup, get_all_supported_repo_names
+import os
+
+from paddlex.repo_manager import get_all_supported_repo_names, setup
 
 if __name__ == "__main__":
     # Enable debug info

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 6 - 6
libs/paddlex-hpi/src/paddlex_hpi/_config.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,16 +15,16 @@
 import os
 import warnings
 from pathlib import Path
-from typing import Any, Dict, Literal, List, Mapping, Optional, Tuple, Type, Union
+from typing import Any, Dict, List, Literal, Mapping, Optional, Tuple, Type, Union
 
 import ultra_infer as ui
-from paddlex.utils import logging
+from paddlex_hpi._model_info import get_model_info
+from paddlex_hpi._strategy import SelectFirstStrategy, SelectSpecificStrategy
+from paddlex_hpi._utils.typing import Backend, DeviceType
 from pydantic import BaseModel, ConfigDict, Field, field_validator
 from typing_extensions import Annotated, TypeAlias, TypedDict, assert_never
 
-from paddlex_hpi._model_info import get_model_info
-from paddlex_hpi._strategy import SelectSpecificStrategy, SelectFirstStrategy
-from paddlex_hpi._utils.typing import Backend, DeviceType
+from paddlex.utils import logging
 
 
 class _BackendConfig(BaseModel):

+ 3 - 3
libs/paddlex-hpi/src/paddlex_hpi/_model_info.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -18,10 +18,10 @@ from functools import lru_cache
 from typing import Optional
 
 from importlib_resources import files
-from paddlex.utils import logging
-
 from paddlex_hpi._utils.typing import DeviceType
 
+from paddlex.utils import logging
+
 _DB_PATH: str = "model_info_collection.json"
 
 

+ 2 - 2
libs/paddlex-hpi/src/paddlex_hpi/_strategy.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 import abc
-from typing import List, Dict, Tuple, Union, Final
+from typing import Dict, Final, List, Tuple, Union
 
 
 class BackendSelectionStrategy(metaclass=abc.ABCMeta):

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/_utils/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/_utils/compat.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/_utils/misc.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/_utils/typing.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/src/paddlex_hpi/models/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/anomaly_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.anomaly_detection.result import UadResult
 from paddlex.modules.anomaly_detection.model_list import MODELS
 
-from paddlex_hpi.models.base import CVPredictor
-
 
 class UadPredictor(CVPredictor):
     entities = MODELS

+ 5 - 14
libs/paddlex-hpi/src/paddlex_hpi/models/base.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,28 +15,19 @@
 import abc
 from os import PathLike
 from pathlib import Path
-from typing import (
-    Any,
-    Dict,
-    Final,
-    Iterator,
-    Optional,
-    TypedDict,
-    Union,
-)
+from typing import Any, Dict, Final, Iterator, Optional, TypedDict, Union
 
 import ultra_infer as ui
+from paddlex_hpi._config import HPIConfig
+from typing_extensions import assert_never
 from ultra_infer.model import BaseUltraInferModel
+
 from paddlex.inference.common.reader import ReadImage, ReadTS
 from paddlex.inference.models import BasePredictor
 from paddlex.inference.utils.new_ir_blocklist import NEWIR_BLOCKLIST
 from paddlex.utils import device as device_helper
 from paddlex.utils import logging
 from paddlex.utils.subclass_register import AutoRegisterABCMetaClass
-from typing_extensions import assert_never
-
-from paddlex_hpi._config import HPIConfig
-from paddlex_hpi._utils.typing import Backend
 
 HPI_CONFIG_KEY: Final[str] = "Hpi"
 

+ 3 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/face_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,12 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from typing import List
-
-from paddlex.modules.face_recognition.model_list import MODELS
 
 from paddlex_hpi.models.general_recognition import ShiTuRecPredictor
 
+from paddlex.modules.face_recognition.model_list import MODELS
+
 
 class FaceRecPredictor(ShiTuRecPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/formula_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.formula_recognition.result import FormulaRecResult
 from paddlex.modules.formula_recognition.model_list import MODELS
 
-from paddlex_hpi.models.base import CVPredictor
-
 
 class LaTeXOCRPredictor(CVPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/general_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.image_feature.result import IdentityResult
 from paddlex.modules.general_recognition.model_list import MODELS
 
-from paddlex_hpi.models.base import CVPredictor
-
 
 class ShiTuRecPredictor(CVPredictor):
     entities = MODELS

+ 5 - 5
libs/paddlex-hpi/src/paddlex_hpi/models/image_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,14 +15,14 @@
 import os
 from typing import Any, Dict, List, Optional, Union
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+from pydantic import BaseModel
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.image_classification.result import TopkResult
 from paddlex.modules.image_classification.model_list import MODELS
-from pydantic import BaseModel
-
-from paddlex_hpi.models.base import CVPredictor, HPIParams
 
 
 class _ClasPPParams(BaseModel):

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/image_unwarping.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.image_unwarping.result import DocTrResult
 from paddlex.modules.image_unwarping.model_list import MODELS
 
-from paddlex_hpi.models.base import CVPredictor
-
 
 class WarpPredictor(CVPredictor):
     entities = MODELS

+ 5 - 5
libs/paddlex-hpi/src/paddlex_hpi/models/instance_segmentation.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,15 +15,15 @@
 import os
 from typing import Any, Dict, List, Optional, Union
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+from pydantic import BaseModel
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.instance_segmentation.result import InstanceSegResult
 from paddlex.modules.instance_segmentation.model_list import MODELS
 from paddlex.utils import logging
-from pydantic import BaseModel
-
-from paddlex_hpi.models.base import CVPredictor, HPIParams
 
 
 class _InstanceSegPPParams(BaseModel):

+ 6 - 6
libs/paddlex-hpi/src/paddlex_hpi/models/multilabel_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,13 +13,15 @@
 # limitations under the License.
 
 import os
+import tempfile
+from pathlib import Path
 from typing import Any, Dict, List, Optional, Union
 
-import ultra_infer as ui
 import numpy as np
-from pathlib import Path
-import tempfile
+import ultra_infer as ui
 import yaml
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.image_multilabel_classification.result import (
     MLClassResult,
@@ -27,8 +29,6 @@ from paddlex.inference.models.image_multilabel_classification.result import (
 from paddlex.modules.multilabel_classification.model_list import MODELS
 from paddlex.utils import logging
 
-from paddlex_hpi.models.base import CVPredictor, HPIParams
-
 
 class MLClasPredictor(CVPredictor):
     entities = MODELS

+ 5 - 5
libs/paddlex-hpi/src/paddlex_hpi/models/object_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,15 +15,15 @@
 import os
 from typing import Any, Dict, List, Optional, Tuple, Union
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+from pydantic import BaseModel
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.object_detection.result import DetResult
 from paddlex.modules.object_detection.model_list import MODELS
 from paddlex.utils import logging
-from pydantic import BaseModel
-
-from paddlex_hpi.models.base import CVPredictor, HPIParams
 
 
 class _DetPPParams(BaseModel):

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/semantic_segmentation.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,15 +15,15 @@
 import os
 from typing import Any, Dict, List, Optional, Tuple, Union
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.semantic_segmentation.result import SegResult
 from paddlex.modules.semantic_segmentation.model_list import MODELS
 from paddlex.utils import logging
 
-from paddlex_hpi.models.base import CVPredictor, HPIParams
-
 
 class SegPredictor(CVPredictor):
     entities = MODELS

+ 6 - 8
libs/paddlex-hpi/src/paddlex_hpi/models/table_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,17 +15,15 @@
 import tempfile
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
-from paddlex.inference.common.batch_sampler import ImageBatchSampler
-from paddlex.inference.models.table_structure_recognition.result import (
-    TableRecResult,
-)
-from paddlex.modules.table_recognition.model_list import MODELS
-
+import ultra_infer as ui
 from paddlex_hpi._utils.compat import get_compat_version
 from paddlex_hpi.models.base import CVPredictor
 
+from paddlex.inference.common.batch_sampler import ImageBatchSampler
+from paddlex.inference.models.table_structure_recognition.result import TableRecResult
+from paddlex.modules.table_recognition.model_list import MODELS
+
 
 class TablePredictor(CVPredictor):
     entities = MODELS

+ 5 - 5
libs/paddlex-hpi/src/paddlex_hpi/models/text_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,16 +15,16 @@
 import os
 from typing import Any, Dict, List, Optional, Union
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi._utils.misc import parse_scale
+from paddlex_hpi.models.base import CVPredictor, HPIParams
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.text_detection.result import TextDetResult
 from paddlex.modules.text_detection.model_list import CURVE_MODELS, MODELS
 from paddlex.utils import logging
 
-from paddlex_hpi._utils.misc import parse_scale
-from paddlex_hpi.models.base import CVPredictor, HPIParams
-
 
 class TextDetPredictor(CVPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/text_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,14 +15,14 @@
 import tempfile
 from typing import Any, Dict, List
 
-import ultra_infer as ui
 import numpy as np
+import ultra_infer as ui
+from paddlex_hpi.models.base import CVPredictor
+
 from paddlex.inference.common.batch_sampler import ImageBatchSampler
 from paddlex.inference.models.text_recognition.result import TextRecResult
 from paddlex.modules.text_recognition.model_list import MODELS
 
-from paddlex_hpi.models.base import CVPredictor
-
 
 class TextRecPredictor(CVPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/ts_ad.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List, Union
 
-import ultra_infer as ui
 import pandas as pd
+import ultra_infer as ui
+from paddlex_hpi.models.base import TSPredictor
+
 from paddlex.inference.common.batch_sampler import TSBatchSampler
 from paddlex.inference.models.ts_anomaly_detection.result import TSAdResult
 from paddlex.modules.ts_anomaly_detection.model_list import MODELS
 
-from paddlex_hpi.models.base import TSPredictor
-
 
 class TSAdPredictor(TSPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/ts_cls.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List, Union
 
-import ultra_infer as ui
 import pandas as pd
+import ultra_infer as ui
+from paddlex_hpi.models.base import TSPredictor
+
 from paddlex.inference.common.batch_sampler import TSBatchSampler
 from paddlex.inference.models.ts_classification.result import TSClsResult
 from paddlex.modules.ts_classification.model_list import MODELS
 
-from paddlex_hpi.models.base import TSPredictor
-
 
 class TSClsPredictor(TSPredictor):
     entities = MODELS

+ 4 - 4
libs/paddlex-hpi/src/paddlex_hpi/models/ts_fc.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 from typing import Any, Dict, List, Union
 
-import ultra_infer as ui
 import pandas as pd
+import ultra_infer as ui
+from paddlex_hpi.models.base import TSPredictor
+
 from paddlex.inference.common.batch_sampler import TSBatchSampler
 from paddlex.inference.models.ts_forecasting.result import TSFcResult
 from paddlex.modules.ts_forecast.model_list import MODELS
 
-from paddlex_hpi.models.base import TSPredictor
-
 
 class TSFcPredictor(TSPredictor):
     entities = MODELS

+ 1 - 1
libs/paddlex-hpi/tests/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/tests/models/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 2
libs/paddlex-hpi/tests/models/base.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
 # limitations under the License.
 
 import json
-import shutil
 import tempfile
 from pathlib import Path
 from types import GeneratorType

+ 3 - 3
libs/paddlex-hpi/tests/models/test_anomaly_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,10 +13,10 @@
 # limitations under the License.
 
 import numpy as np
-from paddlex.inference.results import SegResult
+from paddlex_hpi.models import UadPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import UadPredictor
+from paddlex.inference.results import SegResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/uad_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/uad_input.png"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_face_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,10 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import BaseResult
+from paddlex_hpi.models import FaceRecPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import FaceRecPredictor
+from paddlex.inference.results import BaseResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/face_rec_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/face_rec_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_formula_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,10 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import FormulaRecResult
+from paddlex_hpi.models import LaTeXOCRPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import LaTeXOCRPredictor
+from paddlex.inference.results import FormulaRecResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/latex_ocr_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/latex_ocr_input.png"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_general_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,10 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import BaseResult
+from paddlex_hpi.models import ShiTuRecPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import ShiTuRecPredictor
+from paddlex.inference.results import BaseResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/shitu_rec_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/shitu_rec_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_image_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,10 +13,10 @@
 # limitations under the License.
 
 import numpy as np
-from paddlex.inference.results import TopkResult
+from paddlex_hpi.models import ClasPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import ClasPredictor
+from paddlex.inference.results import TopkResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/clas_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/clas_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_image_unwarping.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,10 +13,10 @@
 # limitations under the License.
 
 import numpy as np
-from paddlex.inference.results import DocTrResult
+from paddlex_hpi.models import WarpPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import WarpPredictor
+from paddlex.inference.results import DocTrResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/warp_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/warp_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_instance_segmentation.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,11 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import InstanceSegResult
+from paddlex_hpi.models import InstanceSegPredictor
 from tests.models.base import BaseTestPredictor
 from tests.testing_utils.cv import compare_det_results
 
-from paddlex_hpi.models import InstanceSegPredictor
+from paddlex.inference.results import InstanceSegResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/instance_seg_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/instance_seg_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_multilabel_classification.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
 
 import numpy as np
 import pytest
-from paddlex.inference.results import MLClassResult
+from paddlex_hpi.models import MLClasPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import MLClasPredictor
+from paddlex.inference.results import MLClassResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ml_clas_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ml_clas_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_object_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,11 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import DetResult
+from paddlex_hpi.models import DetPredictor
 from tests.models.base import BaseTestPredictor
 from tests.testing_utils.cv import compare_det_results
 
-from paddlex_hpi.models import DetPredictor
+from paddlex.inference.results import DetResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/det_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/det_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_semantic_segmentation.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
 
 import numpy as np
 import pytest
-from paddlex.inference.results import SegResult
+from paddlex_hpi.models import SegPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import SegPredictor
+from paddlex.inference.results import SegResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/seg_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/seg_input.png"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_table_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,11 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import TableRecResult
+from paddlex_hpi.models import TablePredictor
 from tests.models.base import BaseTestPredictor
 from tests.testing_utils.cv import compare_det_results
 
-from paddlex_hpi.models import TablePredictor
+from paddlex.inference.results import TableRecResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/table_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/table_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_text_detection.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,11 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from paddlex.inference.results import TextDetResult
+from paddlex_hpi.models import TextDetPredictor
 from tests.models.base import BaseTestPredictor
 from tests.testing_utils.cv import compare_det_results
 
-from paddlex_hpi.models import TextDetPredictor
+from paddlex.inference.results import TextDetResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/text_det_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/text_det_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_text_recognition.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,10 +13,10 @@
 # limitations under the License.
 
 import numpy as np
-from paddlex.inference.results import TextRecResult
+from paddlex_hpi.models import TextRecPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import TextRecPredictor
+from paddlex.inference.results import TextRecResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/text_rec_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/text_rec_input.jpg"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_ts_ad.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
 
 import json
 
-from paddlex.inference.results import TSAdResult
+from paddlex_hpi.models import TSAdPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import TSAdPredictor
+from paddlex.inference.results import TSAdResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_ad_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_ad_input.csv"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_ts_cls.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
 
 import json
 
-from paddlex.inference.results import TSClsResult
+from paddlex_hpi.models import TSClsPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import TSClsPredictor
+from paddlex.inference.results import TSClsResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_cls_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_cls_input.csv"

+ 3 - 3
libs/paddlex-hpi/tests/models/test_ts_fc.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@
 
 import json
 
-from paddlex.inference.results import TSFcResult
+from paddlex_hpi.models import TSFcPredictor
 from tests.models.base import BaseTestPredictor
 
-from paddlex_hpi.models import TSFcPredictor
+from paddlex.inference.results import TSFcResult
 
 MODEL_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_fc_model.zip"
 INPUT_DATA_URL = "https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/deploy/paddlex_hpi/tests/models/ts_fc_input.csv"

+ 1 - 1
libs/paddlex-hpi/tests/testing_utils/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/tests/testing_utils/cv.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/tests/testing_utils/download.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/paddlex-hpi/tests/testing_utils/misc.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/CMakeLists.txt

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/build_tools.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/cvcuda.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/faiss.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/fast_tokenizer.cmake

@@ -1,6 +1,6 @@
 
 
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/flycv.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/gflags.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/glog.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/gtest.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/onnxruntime.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/opencv.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/openvino.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/paddle2onnx.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/paddle_inference.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/paddlelite.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/poros.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/cmake/summary.cmake

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 1 - 1
libs/ultra-infer/python/__init__.py

@@ -1,4 +1,4 @@
-# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
+# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.

+ 2 - 1
libs/ultra-infer/python/requirements.txt

@@ -2,7 +2,8 @@ wheel
 requests
 tqdm
 numpy<2
-opencv-python
+# Compatible with paddlex
+opencv-contrib-python
 pyyaml
 pillow<10.0.0
 pandas>=0.25.0,<=1.3.5

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott