Scanbot SDK
|
Barcode recognizer initialization parameters. More...
Public Member Functions | |
None | __init__ (self, BarcodeRecognitionEngineMode engine_mode, List[BarcodeFormat] formats=None, bool use_tensorrt=False, int tensorrt_max_input_width=0, int tensorrt_max_input_height=0, int tensorrt_max_workspace_size=0) |
Public Attributes | |
engine_mode | |
The engine mode. | |
use_tensorrt | |
If true, the barcode recognizer will use the TensorRT backend for GPU acceleration. | |
tensorrt_max_input_width | |
The maximum input image width in pixels for TensorRT. | |
tensorrt_max_input_height | |
The maximum input image height in pixels for TensorRT. | |
tensorrt_max_workspace_size | |
The maximum workspace size in bytes for TensorRT. | |
formats | |
The barcode formats to be recognized. | |
Barcode recognizer initialization parameters.
None __init__ | ( | self, | |
BarcodeRecognitionEngineMode | engine_mode, | ||
List[BarcodeFormat] | formats = None , |
||
bool | use_tensorrt = False , |
||
int | tensorrt_max_input_width = 0 , |
||
int | tensorrt_max_input_height = 0 , |
||
int | tensorrt_max_workspace_size = 0 |
||
) |
engine_mode | The engine mode (see BarcodeRecognitionEngineMode for details) |
formats | A list of the barcode formats to be recognized. If None or empty, all supported formats are recognized. |
use_tensorrt | If True, the barcode recognizer will use the TensorRT backend for GPU acceleration. |
tensorrt_max_input_width | The maximum input image width in pixels for TensorRT. If 0, the default value will be used. |
tensorrt_max_input_height | The maximum input image height in pixels for TensorRT. If 0, the default value will be used. |
tensorrt_max_workspace_size | The maximum workspace size in bytes for TensorRT. If 0, the default value will be used. |
engine_mode |
The engine mode.
See scanbotsdk.scanbotsdk.BarcodeRecognitionEngineMode for details.
formats |
The barcode formats to be recognized.
If None or empty, all supported formats are recognized.
tensorrt_max_input_height |
The maximum input image height in pixels for TensorRT.
If 0, the default value will be used.
tensorrt_max_input_width |
The maximum input image width in pixels for TensorRT.
If 0, the default value will be used.
tensorrt_max_workspace_size |
The maximum workspace size in bytes for TensorRT.
If 0, the default value will be used.
use_tensorrt |
If true, the barcode recognizer will use the TensorRT backend for GPU acceleration.
When enabling TensorRT, use the smallest input image size that fits your use case. The bigger the image size, the more memory is required at runtime. It takes around 3 minutes to build the TensorRT engine for the first time. The engine is then cached on disk and reused. The cached engine can be copied to other devices with the same device model, Jetpack version, CUDA version and TensorRT version.