SaigeHandleConfig¶
#include <SaigeVisionAPI.h>
Structure containing configuration settings for the inference handle, which can impact GPU memory and inference time.
Public Attributes¶
| Type | Name |
|---|---|
| int | batchSize Sets the number of images to be processed simultaneously in one inference operation. |
| int | inspectionSizeWidth (SEG, OCR, IEN) Sets the width of the image for inference. |
| int | inspectionSizeHeight (SEG, OCR, IEN) Sets the height of the image for inference. |
Public Attributes Documentation¶
batchSize¶
Sets the number of images to be processed simultaneously in one inference operation.
int batchSize;
(OCR) For OCR, which is split into two stages—detecting character areas and recognizing character types—there can be considerable variation in processing time per image. Thus, in OCR, it operates differently, and setting this value to 2 is recommended.
- Only positive integers are allowed.
- Depending on machine resources (e.g., GPU memory), the specified value may not be feasible for inference. If the desired value fails, reduce it and recreate the inference handle.
See also: SaigeInferFromMultipleByteArray
inspectionSizeWidth¶
(SEG, OCR, IEN) Sets the width of the image for inference.
int inspectionSizeWidth;
- The width is adjusted to this value for inference via resizing and padding, regardless of the original image width.
- Only positive integers are allowed.
inspectionSizeHeight¶
(SEG, OCR, IEN) Sets the height of the image for inference.
int inspectionSizeHeight;
- The height is adjusted to this value for inference via resizing and padding, regardless of the original image height.
- Only positive integers are allowed.