SaigeModelInfo¶
#include <SaigeVisionAPI.h>
Structure containing model information.
Public Attributes¶
| Type | Name |
|---|---|
| char[ ] | networkType Indicates the type of deep learning network used. |
| int | numOfClasses Number of classes. |
| char[ ][ ] | classNames |
| char[ ][ ] | classColors Class color codes. Colors are in HTML format and can be converted to RGB values using the SaigeColorCodeToRGB API. |
| bool[ ] | classIsNg Indicates whether each class is an NG class. |
| const char * | description Description provided for the model at training time. |
| const char * | usedGpuName Name of the GPU used for training. |
| const char * | numOfIterations Number of training iterations completed. |
| int | numOfTrainImages Number of images used directly in training. |
| int | numOfValidationImages Number of images used for validation during training. |
| long long | trainingTimeStarted Unix timestamp representing the start time of training. |
| long long | trainingTimeCompleted Unix timestamp representing the completion time of training. |
| long long | trainingTimeElapsed Time taken to complete training, in seconds. |
| char[ ] | developerVersion Version of SaigeVision Developer used during model training. |
| char[ ] | serverVersion Server version of the SaigeVision Developer used during model training. |
| char[ ] | moduleVersion Deep learning module version of the SaigeVision Developer used during model training. |
| SaigeRoiInfo | roiInfo ROI information. |
| float | resizeFactor (SEG) Resize factor applied to the input image, also applied to the inference image. |
| int | cropSizeWidth (DET, SEG, IEN) Width of the patch used during training, unrelated to inference images. |
| int | cropSizeHeight (DET, SEG, IEN) Height of the patch used during training, unrelated to inference images. |
| int | imageResizeWidth (IAD, CLS, DET) Width for resizing input images, applied to inference images as well. |
| int | imageResizeHeight (IAD, CLS, DET) Height for resizing input images, applied to inference images as well. |
| int | targetTextSize (OCR) Target text box height used in training, automatically adjusts the resize scale for the text box in the image. |
| const char * | targetImageQuality (IEN) Selected enhancement quality during training, either high or ultra-high. |
| const char * | inputDataProcessingMode (DET) Data preprocessing mode used during training. |
| int | cropNumOfRows (DET) Number of rows in the cropped image when the data preprocessing mode is crop_and_resize. |
| int | cropNumOfCols (DET) Number of columns in the cropped image when the data preprocessing mode is crop_and_resize. |
| const char * | targetTextShape (OCR) Target text shape used during training, either straight or curved. This may be empty for models trained in older versions. |
| int[ ] | classLabelCount (CLS, DET, SEG) Number of labels per class. Indexed identically to SaigeModelInfo::classNames; the valid length is SaigeModelInfo::numOfClasses. Unset (0) for models trained without this information. |
| SaigeValidationRoc | validationRoc (CLS, DET, SEG) Per-class validation ROC/AUROC. numClasses is 0 if the model carries no such metric. |
Public Attributes Documentation¶
networkType¶
Indicates the type of deep learning network used.
char[] networkType;
Network types ending with (v1) refer to network types used in SaigeVision 1.x.x versions (although the network type is the same, model files are not compatible).
| Functionality | Supported Network Types |
|---|---|
| IAD | Fast, Standard, Accurate |
| CLS | Fast, Standard, Accurate, Shallow (V1), Standard (V1), Deep (V1) |
| SEG | Fast, Standard, Accurate, Shallow (V1), Standard (V1), Deep (V1) |
| DET | Fast, Standard, Accurate, Extended |
| OCR | Combination of Fast, Standard / Contextual, Literal / Short, Medium, |
Long (e.g., Industry, Fast Short) For more details, refer to the SAIGE VISION Developer documentation. IEN | Fast, Standard
numOfClasses¶
Number of classes.
int numOfClasses;
The number of classes is calculated as follows based on functionality:
| Functionality | Number of Classes | Note |
|---|---|---|
| IAD | 2 | Fixed as OK and NG |
| CLS | Number of user-added classes | - |
| SEG | Number of user-added classes + 1 | Includes automatically allocated OK class |
| DET | Number of user-added classes + 1 | Includes automatically allocated OK class |
| OCR | - | Not applicable |
| IEN | - | Not applicable |
classNames¶
char[][] classNames;
class names
classColors¶
Class color codes. Colors are in HTML format and can be converted to RGB values using the SaigeColorCodeToRGB API.
char[][] classColors;
See also: SaigeColorCodeToRGB
classIsNg¶
Indicates whether each class is an NG class.
bool[] classIsNg;
description¶
Description provided for the model at training time.
const char * description;
usedGpuName¶
Name of the GPU used for training.
const char * usedGpuName;
numOfIterations¶
Number of training iterations completed.
const char * numOfIterations;
numOfTrainImages¶
Number of images used directly in training.
int numOfTrainImages;
numOfValidationImages¶
Number of images used for validation during training.
int numOfValidationImages;
trainingTimeStarted¶
Unix timestamp representing the start time of training.
long long trainingTimeStarted;
trainingTimeCompleted¶
Unix timestamp representing the completion time of training.
long long trainingTimeCompleted;
trainingTimeElapsed¶
Time taken to complete training, in seconds.
long long trainingTimeElapsed;
developerVersion¶
Version of SaigeVision Developer used during model training.
char[] developerVersion;
serverVersion¶
Server version of the SaigeVision Developer used during model training.
char[] serverVersion;
moduleVersion¶
Deep learning module version of the SaigeVision Developer used during model training.
char[] moduleVersion;
roiInfo¶
ROI information.
SaigeRoiInfo roiInfo;
See also: SaigeRoiInfo
resizeFactor¶
(SEG) Resize factor applied to the input image, also applied to the inference image.
float resizeFactor;
cropSizeWidth¶
(DET, SEG, IEN) Width of the patch used during training, unrelated to inference images.
int cropSizeWidth;
cropSizeHeight¶
(DET, SEG, IEN) Height of the patch used during training, unrelated to inference images.
int cropSizeHeight;
imageResizeWidth¶
(IAD, CLS, DET) Width for resizing input images, applied to inference images as well.
int imageResizeWidth;
imageResizeHeight¶
(IAD, CLS, DET) Height for resizing input images, applied to inference images as well.
int imageResizeHeight;
targetTextSize¶
(OCR) Target text box height used in training, automatically adjusts the resize scale for the text box in the image.
int targetTextSize;
targetImageQuality¶
(IEN) Selected enhancement quality during training, either high or ultra-high.
const char * targetImageQuality;
inputDataProcessingMode¶
(DET) Data preprocessing mode used during training.
const char * inputDataProcessingMode;
Either resize or crop_and_resize. For models trained in older versions, it may be resize or crop.
- If set to
resize, SaigeModelInfo::imageResizeWidth and SaigeModelInfo::imageResizeHeight can be obtained. - If set to
crop_and_resize, SaigeModelInfo::cropNumOfRows and SaigeModelInfo::cropNumOfCols can be obtained.
cropNumOfRows¶
(DET) Number of rows in the cropped image when the data preprocessing mode is crop_and_resize.
int cropNumOfRows;
cropNumOfCols¶
(DET) Number of columns in the cropped image when the data preprocessing mode is crop_and_resize.
int cropNumOfCols;
targetTextShape¶
(OCR) Target text shape used during training, either straight or curved. This may be empty for models trained in older versions.
const char * targetTextShape;
classLabelCount¶
(CLS, DET, SEG) Number of labels per class. Indexed identically to SaigeModelInfo::classNames; the valid length is SaigeModelInfo::numOfClasses. Unset (0) for models trained without this information.
int[] classLabelCount;
validationRoc¶
(CLS, DET, SEG) Per-class validation ROC/AUROC. numClasses is 0 if the model carries no such metric.
SaigeValidationRoc validationRoc;
See also: SaigeValidationRoc