|
1 | | -__version__ = "3.2.10.4393" |
| 1 | +__version__ = "3.2.10.4484" |
2 | 2 |
|
3 | 3 | if __package__ or "." in __name__: |
4 | 4 | from .core import * |
@@ -848,7 +848,7 @@ def output_settings(self, template_name: str, include_default_values: bool = Fal |
848 | 848 | include_default_values (bool): Specifies whether to include default values in the exported template. Default values is False. |
849 | 849 |
|
850 | 850 | Returns: |
851 | | - A tuple containing an error code, error message, and a string containing the exported template. |
| 851 | + A tuple containing an error code, a string containing the exported template, and error message. |
852 | 852 | """ |
853 | 853 | return _DynamsoftCaptureVisionRouter.CCaptureVisionRouter_OutputSettings( |
854 | 854 | self, template_name, include_default_values |
@@ -1234,9 +1234,42 @@ def append_model_buffer(model_name: str, model_buffer: bytes, max_model_instance |
1234 | 1234 | - error_code (int): The error code indicating the status of the operation. |
1235 | 1235 | - error_message (str): A descriptive message explaining the error. |
1236 | 1236 | """ |
| 1237 | + import warnings |
| 1238 | + warnings.warn( |
| 1239 | + "Function 'append_model_buffer' Will be removed in future versions. Please use `append_dl_model_buffer` function instead.", |
| 1240 | + DeprecationWarning, |
| 1241 | + stacklevel=2 |
| 1242 | + ) |
1237 | 1243 | return _DynamsoftCaptureVisionRouter.CCaptureVisionRouter_AppendModelBuffer( |
1238 | 1244 | model_name, model_buffer, max_model_instances |
1239 | 1245 | ) |
| 1246 | + |
| 1247 | + @staticmethod |
| 1248 | + def append_dl_model_buffer(model_name: str, model_buffer: bytes, max_model_instances: int) -> Tuple[int, str]: |
| 1249 | + """ |
| 1250 | + Appends a deep learning model to the memory buffer. |
| 1251 | +
|
| 1252 | + Args: |
| 1253 | + model_name (str): The name of the model. |
| 1254 | + model_buffer (bytes): The bytes of the model. |
| 1255 | + max_model_instances (int): The max instances created for the model. |
| 1256 | +
|
| 1257 | + Returns: |
| 1258 | + A tuple containing following elements: |
| 1259 | + - error_code (int): The error code indicating the status of the operation. |
| 1260 | + - error_message (str): A descriptive message explaining the error. |
| 1261 | + """ |
| 1262 | + return _DynamsoftCaptureVisionRouter.CCaptureVisionRouter_AppendDLModelBuffer( |
| 1263 | + model_name, model_buffer, max_model_instances |
| 1264 | + ) |
| 1265 | + |
| 1266 | + @staticmethod |
| 1267 | + def clear_dl_model_buffers() -> None: |
| 1268 | + """ |
| 1269 | + Clears all deep learning models from buffer to free up memory. |
| 1270 | + """ |
| 1271 | + _DynamsoftCaptureVisionRouter.CCaptureVisionRouter_ClearDLModelBuffers() |
| 1272 | + |
1240 | 1273 | def switch_capturing_template(self, template_name: str) -> Tuple[int, str]: |
1241 | 1274 | """ |
1242 | 1275 | Switch the capturing template during the image processing workflow. |
|
0 commit comments