Scanbot SDK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BarcodeRecognizerInitParams

Barcode recognizer initialization parameters. More...

Inheritance diagram for BarcodeRecognizerInitParams:

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.
 

Detailed Description

Barcode recognizer initialization parameters.

Constructor & Destructor Documentation

◆ __init__()

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 
)
Parameters
engine_modeThe engine mode (see BarcodeRecognitionEngineMode for details)
formatsA list of the barcode formats to be recognized. If None or empty, all supported formats are recognized.
use_tensorrtIf True, the barcode recognizer will use the TensorRT backend for GPU acceleration.
tensorrt_max_input_widthThe maximum input image width in pixels for TensorRT. If 0, the default value will be used.
tensorrt_max_input_heightThe maximum input image height in pixels for TensorRT. If 0, the default value will be used.
tensorrt_max_workspace_sizeThe maximum workspace size in bytes for TensorRT. If 0, the default value will be used.

Member Data Documentation

◆ engine_mode

engine_mode

The engine mode.

See scanbotsdk.scanbotsdk.BarcodeRecognitionEngineMode for details.

◆ formats

formats

The barcode formats to be recognized.

If None or empty, all supported formats are recognized.

◆ tensorrt_max_input_height

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

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

tensorrt_max_workspace_size

The maximum workspace size in bytes for TensorRT.

If 0, the default value will be used.

◆ use_tensorrt

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.


The documentation for this class was generated from the following file: