Explorar el Código

add pipelines for paddlex (#2796)

* add pipelines for paddlex

* add pipelines for paddlex
Sunflower7788 hace 10 meses
padre
commit
56f13df762
Se han modificado 30 ficheros con 468 adiciones y 3 borrados
  1. 24 0
      api_examples/pipelines/test_anomaly_detection.py
  2. 23 0
      api_examples/pipelines/test_ts_anomaly_detection.py
  3. 23 0
      api_examples/pipelines/test_ts_classification.py
  4. 23 0
      api_examples/pipelines/test_ts_forecast.py
  5. 8 0
      paddlex/configs/pipelines/anomaly_detection.yaml
  6. 8 0
      paddlex/configs/pipelines/ts_anomaly_detection.yaml
  7. 8 0
      paddlex/configs/pipelines/ts_classification.yaml
  8. 8 0
      paddlex/configs/pipelines/ts_forecast.yaml
  9. 3 3
      paddlex/inference/models_new/__init__.py
  10. 0 0
      paddlex/inference/models_new/ts_anomaly_detection/__init__.py
  11. 0 0
      paddlex/inference/models_new/ts_anomaly_detection/predictor.py
  12. 0 0
      paddlex/inference/models_new/ts_anomaly_detection/processors.py
  13. 0 0
      paddlex/inference/models_new/ts_anomaly_detection/result.py
  14. 0 0
      paddlex/inference/models_new/ts_classification/__init__.py
  15. 0 0
      paddlex/inference/models_new/ts_classification/predictor.py
  16. 0 0
      paddlex/inference/models_new/ts_classification/processors.py
  17. 0 0
      paddlex/inference/models_new/ts_classification/result.py
  18. 0 0
      paddlex/inference/models_new/ts_forecasting/__init__.py
  19. 0 0
      paddlex/inference/models_new/ts_forecasting/predictor.py
  20. 0 0
      paddlex/inference/models_new/ts_forecasting/processors.py
  21. 0 0
      paddlex/inference/models_new/ts_forecasting/result.py
  22. 4 0
      paddlex/inference/pipelines_new/__init__.py
  23. 15 0
      paddlex/inference/pipelines_new/anomaly_detection/__init__.py
  24. 69 0
      paddlex/inference/pipelines_new/anomaly_detection/pipeline.py
  25. 15 0
      paddlex/inference/pipelines_new/ts_anomaly_detection/__init__.py
  26. 69 0
      paddlex/inference/pipelines_new/ts_anomaly_detection/pipeline.py
  27. 15 0
      paddlex/inference/pipelines_new/ts_classification/__init__.py
  28. 69 0
      paddlex/inference/pipelines_new/ts_classification/pipeline.py
  29. 15 0
      paddlex/inference/pipelines_new/ts_forecasting/__init__.py
  30. 69 0
      paddlex/inference/pipelines_new/ts_forecasting/pipeline.py

+ 24 - 0
api_examples/pipelines/test_anomaly_detection.py

@@ -0,0 +1,24 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from paddlex import create_pipeline
+
+pipeline = create_pipeline(pipeline="anomaly_detection")
+output = pipeline.predict("./test_samples/uad_grid.png")
+
+for res in output:
+    print(res)
+    res.print()  ## 打印预测的结构化输出
+    res.save_to_img("./output/")  ## 保存结果可视化图像
+    res.save_to_json("./output/")  ## 保存预测的结构化输出

+ 23 - 0
api_examples/pipelines/test_ts_anomaly_detection.py

@@ -0,0 +1,23 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from paddlex import create_pipeline
+
+pipeline = create_pipeline(pipeline="ts_anomaly_detection")
+output = pipeline.predict("./test_samples/ts_ad.csv")
+
+for res in output:
+    print(res)
+    res.print()  ## 打印预测的结构化输出
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 23 - 0
api_examples/pipelines/test_ts_classification.py

@@ -0,0 +1,23 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from paddlex import create_pipeline
+
+pipeline = create_pipeline(pipeline="ts_classification")
+output = pipeline.predict("./test_samples/ts_cls.csv")
+
+for res in output:
+    print(res)
+    res.print()  ## 打印预测的结构化输出
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 23 - 0
api_examples/pipelines/test_ts_forecast.py

@@ -0,0 +1,23 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from paddlex import create_pipeline
+
+pipeline = create_pipeline(pipeline="ts_forecast")
+output = pipeline.predict("./test_samples/ts_fc.csv")
+
+for res in output:
+    print(res)
+    res.print()  ## 打印预测的结构化输出
+    res.save_to_csv("./output/")  ## 保存结果到csv文件

+ 8 - 0
paddlex/configs/pipelines/anomaly_detection.yaml

@@ -0,0 +1,8 @@
+pipeline_name: anomaly_detection
+
+SubModules:
+  AnomalyDetection:
+    module_name: anomaly_detection
+    model_name: STFPM
+    model_dir: null
+    batch_size: 1   

+ 8 - 0
paddlex/configs/pipelines/ts_anomaly_detection.yaml

@@ -0,0 +1,8 @@
+pipeline_name: ts_anomaly_detection
+
+SubModules:
+  TSAnomalyDetection:
+    module_name: ts_anomaly_detection
+    model_name: DLinear_ad
+    model_dir: null
+    batch_size: 1   

+ 8 - 0
paddlex/configs/pipelines/ts_classification.yaml

@@ -0,0 +1,8 @@
+pipeline_name: ts_classification
+
+SubModules:
+  TSClassification:
+    module_name: ts_classification
+    model_name: TimesNet_cls
+    model_dir: null
+    batch_size: 1   

+ 8 - 0
paddlex/configs/pipelines/ts_forecast.yaml

@@ -0,0 +1,8 @@
+pipeline_name: ts_forecast
+
+SubModules:
+  TSForecast:
+    module_name: ts_forecast
+    model_name: DLinear
+    model_dir: null
+    batch_size: 1   

+ 3 - 3
paddlex/inference/models_new/__init__.py

@@ -28,9 +28,9 @@ from .formula_recognition import FormulaRecPredictor
 from .instance_segmentation import InstanceSegPredictor
 from .semantic_segmentation import SegPredictor
 from .image_feature import ImageFeaturePredictor
-from .ts_forecast import TSFcPredictor
-from .ts_anomaly import TSAdPredictor
-from .ts_classify import TSClsPredictor
+from .ts_forecasting import TSFcPredictor
+from .ts_anomaly_detection import TSAdPredictor
+from .ts_classification import TSClsPredictor
 from .image_unwarping import WarpPredictor
 from .image_multilabel_classification import MLClasPredictor
 

+ 0 - 0
paddlex/inference/models_new/ts_anomaly/__init__.py → paddlex/inference/models_new/ts_anomaly_detection/__init__.py


+ 0 - 0
paddlex/inference/models_new/ts_anomaly/predictor.py → paddlex/inference/models_new/ts_anomaly_detection/predictor.py


+ 0 - 0
paddlex/inference/models_new/ts_anomaly/processors.py → paddlex/inference/models_new/ts_anomaly_detection/processors.py


+ 0 - 0
paddlex/inference/models_new/ts_anomaly/result.py → paddlex/inference/models_new/ts_anomaly_detection/result.py


+ 0 - 0
paddlex/inference/models_new/ts_classify/__init__.py → paddlex/inference/models_new/ts_classification/__init__.py


+ 0 - 0
paddlex/inference/models_new/ts_classify/predictor.py → paddlex/inference/models_new/ts_classification/predictor.py


+ 0 - 0
paddlex/inference/models_new/ts_classify/processors.py → paddlex/inference/models_new/ts_classification/processors.py


+ 0 - 0
paddlex/inference/models_new/ts_classify/result.py → paddlex/inference/models_new/ts_classification/result.py


+ 0 - 0
paddlex/inference/models_new/ts_forecast/__init__.py → paddlex/inference/models_new/ts_forecasting/__init__.py


+ 0 - 0
paddlex/inference/models_new/ts_forecast/predictor.py → paddlex/inference/models_new/ts_forecasting/predictor.py


+ 0 - 0
paddlex/inference/models_new/ts_forecast/processors.py → paddlex/inference/models_new/ts_forecasting/processors.py


+ 0 - 0
paddlex/inference/models_new/ts_forecast/result.py → paddlex/inference/models_new/ts_forecasting/result.py


+ 4 - 0
paddlex/inference/pipelines_new/__init__.py

@@ -26,6 +26,10 @@ from .image_classification import ImageClassificationPipeline
 from .seal_recognition import SealRecognitionPipeline
 from .table_recognition import TableRecognitionPipeline
 from .video_classification import VideoClassificationPipeline
+from .anomaly_detection import AnomalyDetectionPipeline
+from .ts_forecasting import TSFcPipeline
+from .ts_anomaly_detection import TSAnomalyDetPipeline
+from .ts_classification import TSClsPipeline
 
 
 def get_pipeline_path(pipeline_name: str) -> str:

+ 15 - 0
paddlex/inference/pipelines_new/anomaly_detection/__init__.py

@@ -0,0 +1,15 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .pipeline import AnomalyDetectionPipeline

+ 69 - 0
paddlex/inference/pipelines_new/anomaly_detection/pipeline.py

@@ -0,0 +1,69 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Any, Dict, Optional
+import numpy as np
+
+from ...utils.pp_option import PaddlePredictorOption
+from ..base import BasePipeline
+
+# [TODO] 待更新models_new到models
+from ...models_new.anomaly_detection.result import UadResult
+
+
+class AnomalyDetectionPipeline(BasePipeline):
+    """Image AnomalyDetectionPipeline Pipeline"""
+
+    entities = "anomaly_detection"
+
+    def __init__(
+        self,
+        config: Dict,
+        device: str = None,
+        pp_option: PaddlePredictorOption = None,
+        use_hpip: bool = False,
+        hpi_params: Optional[Dict[str, Any]] = None,
+    ) -> None:
+        """Initializes the image anomaly detection pipeline.
+
+        Args:
+            config (Dict): Configuration dictionary containing various settings.
+            device (str, optional): Device to run the predictions on. Defaults to None.
+            pp_option (PaddlePredictorOption, optional): PaddlePredictor options. Defaults to None.
+            use_hpip (bool, optional): Whether to use high-performance inference (hpip) for prediction. Defaults to False.
+            hpi_params (Optional[Dict[str, Any]], optional): HPIP parameters. Defaults to None.
+        """
+
+        super().__init__(
+            device=device, pp_option=pp_option, use_hpip=use_hpip, hpi_params=hpi_params
+        )
+
+        anomaly_detetion_model_config = config["SubModules"]["AnomalyDetection"]
+        self.anomaly_detetion_model = self.create_model(
+            anomaly_detetion_model_config
+        )
+
+    def predict(
+        self, input: str | list[str] | np.ndarray | list[np.ndarray], **kwargs
+    ) -> UadResult:
+        """Predicts anomaly detection results for the given input.
+
+        Args:
+            input (str | list[str] | np.ndarray | list[np.ndarray]): The input image(s) or path(s) to the images.
+            **kwargs: Additional keyword arguments that can be passed to the function.
+
+        Returns:
+            UadResult: The predicted anomaly results.
+        """
+        yield from self.anomaly_detetion_model(input)

+ 15 - 0
paddlex/inference/pipelines_new/ts_anomaly_detection/__init__.py

@@ -0,0 +1,15 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .pipeline import TSAnomalyDetPipeline

+ 69 - 0
paddlex/inference/pipelines_new/ts_anomaly_detection/pipeline.py

@@ -0,0 +1,69 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Any, Dict, Optional
+import pandas as pd
+
+from ...utils.pp_option import PaddlePredictorOption
+from ..base import BasePipeline
+
+# [TODO] 待更新models_new到models
+from ...models_new.ts_anomaly_detection.result import TSAdResult
+
+
+class TSAnomalyDetPipeline(BasePipeline):
+    """TSAnomalyDetPipeline Pipeline"""
+
+    entities = "ts_anomaly_detection"
+
+    def __init__(
+        self,
+        config: Dict,
+        device: str = None,
+        pp_option: PaddlePredictorOption = None,
+        use_hpip: bool = False,
+        hpi_params: Optional[Dict[str, Any]] = None,
+    ) -> None:
+        """Initializes the Time Series ad pipeline.
+
+        Args:
+            config (Dict): Configuration dictionary containing various settings.
+            device (str, optional): Device to run the predictions on. Defaults to None.
+            pp_option (PaddlePredictorOption, optional): PaddlePredictor options. Defaults to None.
+            use_hpip (bool, optional): Whether to use high-performance inference (hpip) for prediction. Defaults to False.
+            hpi_params (Optional[Dict[str, Any]], optional): HPIP parameters. Defaults to None.
+        """
+
+        super().__init__(
+            device=device, pp_option=pp_option, use_hpip=use_hpip, hpi_params=hpi_params
+        )
+
+        ts_ad_model_config = config["SubModules"]["TSAnomalyDetection"]
+        self.ts_ad_model = self.create_model(
+            ts_ad_model_config
+        )
+
+    def predict(
+        self, input: str | list[str] | pd.DataFrame | list[pd.DataFrame], **kwargs
+    ) -> TSAdResult:
+        """Predicts time series anomaly detection results for the given input.
+
+        Args:
+            input (str | list[str] | pd.DataFrame | list[pd.DataFrame]): The input image(s) or path(s) to the images.
+            **kwargs: Additional keyword arguments that can be passed to the function.
+
+        Returns:
+            TSAdResult: The predicted time series anomaly detection results.
+        """
+        yield from self.ts_ad_model(input)

+ 15 - 0
paddlex/inference/pipelines_new/ts_classification/__init__.py

@@ -0,0 +1,15 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .pipeline import TSClsPipeline

+ 69 - 0
paddlex/inference/pipelines_new/ts_classification/pipeline.py

@@ -0,0 +1,69 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Any, Dict, Optional
+import pandas as pd
+
+from ...utils.pp_option import PaddlePredictorOption
+from ..base import BasePipeline
+
+# [TODO] 待更新models_new到models
+from ...models_new.ts_classification.result import TSClsResult
+
+
+class TSClsPipeline(BasePipeline):
+    """TSClsPipeline Pipeline"""
+
+    entities = "ts_classification"
+
+    def __init__(
+        self,
+        config: Dict,
+        device: str = None,
+        pp_option: PaddlePredictorOption = None,
+        use_hpip: bool = False,
+        hpi_params: Optional[Dict[str, Any]] = None,
+    ) -> None:
+        """Initializes the Time Series classification pipeline.
+
+        Args:
+            config (Dict): Configuration dictionary containing various settings.
+            device (str, optional): Device to run the predictions on. Defaults to None.
+            pp_option (PaddlePredictorOption, optional): PaddlePredictor options. Defaults to None.
+            use_hpip (bool, optional): Whether to use high-performance inference (hpip) for prediction. Defaults to False.
+            hpi_params (Optional[Dict[str, Any]], optional): HPIP parameters. Defaults to None.
+        """
+
+        super().__init__(
+            device=device, pp_option=pp_option, use_hpip=use_hpip, hpi_params=hpi_params
+        )
+
+        ts_classification_model_config = config["SubModules"]["TSClassification"]
+        self.ts_classification_model = self.create_model(
+            ts_classification_model_config
+        )
+
+    def predict(
+        self, input: str | list[str] | pd.DataFrame | list[pd.DataFrame], **kwargs
+    ) -> TSClsResult:
+        """Predicts time series classification results for the given input.
+
+        Args:
+            input (str | list[str] | pd.DataFrame | list[pd.DataFrame]): The input image(s) or path(s) to the images.
+            **kwargs: Additional keyword arguments that can be passed to the function.
+
+        Returns:
+            TSFcResult: The predicted time series classification results.
+        """
+        yield from self.ts_classification_model(input)

+ 15 - 0
paddlex/inference/pipelines_new/ts_forecasting/__init__.py

@@ -0,0 +1,15 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .pipeline import TSFcPipeline

+ 69 - 0
paddlex/inference/pipelines_new/ts_forecasting/pipeline.py

@@ -0,0 +1,69 @@
+# copyright (c) 2025 PaddlePaddle Authors. All Rights Reserve.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import Any, Dict, Optional
+import pandas as pd
+
+from ...utils.pp_option import PaddlePredictorOption
+from ..base import BasePipeline
+
+# [TODO] 待更新models_new到models
+from ...models_new.ts_forecasting.result import TSFcResult
+
+
+class TSFcPipeline(BasePipeline):
+    """TSFcPipeline Pipeline"""
+
+    entities = "ts_forecast"
+
+    def __init__(
+        self,
+        config: Dict,
+        device: str = None,
+        pp_option: PaddlePredictorOption = None,
+        use_hpip: bool = False,
+        hpi_params: Optional[Dict[str, Any]] = None,
+    ) -> None:
+        """Initializes the Time Series Forecast pipeline.
+
+        Args:
+            config (Dict): Configuration dictionary containing various settings.
+            device (str, optional): Device to run the predictions on. Defaults to None.
+            pp_option (PaddlePredictorOption, optional): PaddlePredictor options. Defaults to None.
+            use_hpip (bool, optional): Whether to use high-performance inference (hpip) for prediction. Defaults to False.
+            hpi_params (Optional[Dict[str, Any]], optional): HPIP parameters. Defaults to None.
+        """
+
+        super().__init__(
+            device=device, pp_option=pp_option, use_hpip=use_hpip, hpi_params=hpi_params
+        )
+
+        ts_forecast_model_config = config["SubModules"]["TSForecast"]
+        self.ts_forecast_model = self.create_model(
+            ts_forecast_model_config
+        )
+
+    def predict(
+        self, input: str | list[str] | pd.DataFrame | list[pd.DataFrame], **kwargs
+    ) -> TSFcResult:
+        """Predicts time series forecast results for the given input.
+
+        Args:
+            input (str | list[str] | pd.DataFrame | list[pd.DataFrame]): The input image(s) or path(s) to the images.
+            **kwargs: Additional keyword arguments that can be passed to the function.
+
+        Returns:
+            TSFcResult: The predicted time series forecast results.
+        """
+        yield from self.ts_forecast_model(input)