19#ifdef SB_ENABLE_DL_RESERVED_PAR
6133#ifndef INCLUDE_SB_H_
6134#define INCLUDE_SB_H_
6140# define SB_EXTERN_C extern "C"
6142# define SB_EXTERN_C extern
6146# define SB_CDECL __cdecl
6153# ifdef SB_API_EXPORTS
6154# define SB_EXPORTS __declspec(dllexport)
6155# define SB_DL_EXPORTS __declspec(dllimport)
6157# define SB_EXPORTS __declspec(dllimport)
6160# ifdef SB_API_EXPORTS
6161# define SB_EXPORTS __attribute__ ((visibility ("default")))
6162# define SB_DL_EXPORTS __attribute__ ((visibility ("default")))
6167# define SB_PUBLIC(return_type) SB_EXTERN_C SB_EXPORTS return_type SB_CDECL
6168# define SB_DL_PUBLIC(return_type) SB_EXTERN_C SB_DL_EXPORTS return_type SB_CDECL
6171# ifdef SB_DL_API_EXPORTS
6172# define SB_DL_EXPORTS __declspec(dllexport)
6174# define SB_DL_EXPORTS __declspec(dllimport)
6177# ifdef SB_DL_API_EXPORTS
6178# define SB_DL_EXPORTS __attribute__ ((visibility ("default")))
6180# define SB_DL_EXPORTS
6183# define SB_PUBLIC(return_type) SB_EXTERN_C return_type SB_CDECL
6184# define SB_DL_PUBLIC(return_type) SB_EXTERN_C SB_DL_EXPORTS return_type SB_CDECL
6187#if defined __cplusplus
6188# define SB_INLINE inline
6190# define SB_INLINE static __inline
6460SB_PUBLIC(
sb_t_err)
sb_trace(
int trace_enable,
int date_time_enable,
int line_enable,
int trace_win_enable,
const char*
const filename,
sb_fp_trace_callback trace_callback,
void*
const user_data);
6666#define SB_INIT_ONLY_HW_LICENSE_KEY "ONLY_HW_KEY"
6672#define SB_INIT_ONLY_SB_LICENSE_KEY "ONLY_SB_KEY"
6678#define SB_INIT_NO_LICENSE_KEY "NO_KEY"
6685#define SB_DELIMITER ";"
6791 version.
major = major;
6792 version.
minor = minor;
6854#define SB_FRAMEWORKS_MAX_NUMBER 4
6901 char compute_capability[8];
6948 char version_str[16];
6949 char compile_date[32];
6950 char compile_time[32];
7027#define SB_VALUE_NOT_SET 1000000.0f
7028#define SB_PAR_MODELS_NUM 64
7029#define SB_PAR_PERTURBATIONS_NUM 16
7030#define SB_PAR_STRING_LEN 64
7031#define SB_IMAGE_NAME_STRING_LEN 128
7032#define SB_PAR_LEVELS_NUM 32
7033#define SB_PAR_LEVEL_SCALE_GRANULARITY 0.50f
7034#define SB_PAR_LEVEL_SCALE_MIN 1.0f
7035#define SB_PAR_LEVEL_SCALE_MAX 16.0f
7036#define SB_PAR_RETINA_OBJ_SIZE_MIN 24
7037#define SB_PAR_RETINA_OBJ_SIZE_MAX 1024
7038#define SB_PAR_RETINA_OBJ_STRIDE_COARSE_MIN 4
7039#define SB_PAR_RETINA_OBJ_STRIDE_COARSE_MAX 32
7040#define SB_PAR_RETINA_OBJ_STRIDE_FINE_MIN 1
7041#define SB_PAR_RETINA_OBJ_STRIDE_FINE_MAX 8
7042#define SB_PAR_RETINA_OBJ_DISTANCE_MIN 4
7043#define SB_PAR_RETINA_NUM_OCCURRENCES_MIN -1
7045#define SB_SAMPLE_SCALE_GRANULARITY 0.25f
7046#define SB_SAMPLE_SCALE_MIN 1.0f
7047#define SB_SAMPLE_SCALE_MAX 32.0f
7049#define SB_DL_SCALE_MIN 0.1f
7051#define SB_DL_SCALE_MAX 32.0f
7053#define SB_DL_SCALE_GRANULARITY 0.01f
7055#define SB_SVL_DL_INPUT_SDINET0_SIZE_DEFAULT 331
7056#define SB_SVL_DL_INPUT_SDINET0_SIZE_MIN 128
7057#define SB_SVL_DL_INPUT_SDINET0_SIZE_MAX 512
7059#ifdef NEW_VERSION_SDINET1
7060#define SB_SVL_DL_INPUT_SDINET1_SIZE_DEFAULT 331
7061#define SB_SVL_DL_INPUT_SDINET1_SIZE_MIN 128
7062#define SB_SVL_DL_INPUT_SDINET1_SIZE_MAX 512
7065#define SB_SVL_DL_BATCH_SIZE_MIN 4
7066#define SB_SVL_DL_BATCH_SIZE_MAX 512
7068#define SB_SVL_DL_VALIDATION_PERCENTAGE_MIN 0.0f
7069#define SB_SVL_DL_VALIDATION_PERCENTAGE_MAX 0.5f
7071#define SB_SVL_DL_LEARNING_RATE_MIN 0.000001f
7072#define SB_SVL_DL_LEARNING_RATE_MAX 0.01f
7073#define SB_SVL_DL_LEARNING_RATE_DEFAULT 0.001f
7075#define SB_SVL_DL_NUM_TILES_MIN 1
7076#define SB_SVL_DL_NUM_TILES_MAX 64
7078#define SB_SVL_DL_FEATURES_MULTIPLIER_MIN 0.5f
7079#define SB_SVL_DL_FEATURES_MULTIPLIER_MAX 1.5f
7080#define SB_SVL_DL_FEATURES_MULTIPLIER_GRANULARITY 0.1f
7081#define SB_SVL_DL_FEATURES_MULTIPLIER_DEFAULT 1.0f
7083#define SB_SVL_DL_PERTURBATION_SCALE_MIN 0.0f
7084#define SB_SVL_DL_PERTURBATION_SCALE_MAX 0.5f
7086#define SB_SVL_DL_PERTURBATION_SHIFT_MIN 0.0f
7087#define SB_SVL_DL_PERTURBATION_SHIFT_MAX 0.5f
7089#define SB_SVL_DL_PERTURBATION_STRETCH_CONTRAST_MIN 0.0f
7090#define SB_SVL_DL_PERTURBATION_STRETCH_CONTRAST_MAX 0.5f
7092#define SB_SVL_DL_PERTURBATION_DELTA_BRIGHTNESS_MIN 0.0f
7093#define SB_SVL_DL_PERTURBATION_DELTA_BRIGHTNESS_MAX 0.5f
7101#define SB_SURFACE_OPTIONAL_GRAY_LEVEL 128
7735#define SB_LICENSE_VENDOR_CODE_SIZE 32
7744 char company_role[128];
7747 char operating_system[128];
7750 char sector_of_interest[1024];
7753 char machine_id[36];
7925#define SB_LUT_POINT_NOT_EXIST 0xFFFF
8033#define SB_IMAGE_FILE_EXTENSIONS "pgm" SB_DELIMITER \
8034 "ppm" SB_DELIMITER \
8035 "bmp" SB_DELIMITER \
8036 "png" SB_DELIMITER \
8037 "tif" SB_DELIMITER \
8038 "tiff" SB_DELIMITER \
8039 "jpeg" SB_DELIMITER \
8125#ifdef SB_PUBLIC_INTERNAL_ENABLE
8523 unsigned char lut[256];
9364 unsigned char lut[256];
9686#define SB_PROJECTS_NUM 32
9687#define SB_PROJECT_UUID_LEN 36
9697 char uuid[SB_PROJECT_UUID_LEN];
9721#define SB_SOLUTION_EXT "rprj"
10255#define SB_PAR_FEATURES_NAMES_LEN 256
10405 SB_NETWORK_TYPE_NONE = 0,
10425#ifdef NEW_VERSION_SDINET1
10429 SB_NETWORK_TYPE_SDINET1 = 110,
10432#ifdef NEW_VERSION_DEEP_SURFACE_UNET
10437 SB_NETWORK_TYPE_UNET_256 = 130,
10457 SB_NETWORK_TYPE_END
10502 SB_NETWORK_FREEZE_MODE_END
10703#ifdef ENABLE_DEEP_RETINA
10707 SB_LOSS_FN_TYPE_YOLO,
10869 char inpainter_path[512];
10957#define SB_PRE_TRAINING_EXT "ptf"
11061 char pre_training_file[512];
11226#define SB_DEVICES_MAX_NUMBER 4
11289 char project_path[512];
11297 char image_ext[64];
12137#ifdef ENABLE_TILING_GET_RANGE
12143 SB_DL_TILING_CALC_TYPE_NONE = 0,
12144 SB_DL_TILING_CALC_TYPE_IMAGE_SIZE,
12150 SB_DL_TILING_CALC_TYPE_IMAGE_SCALE
12151}sb_t_dl_auto_tile_calc_type;
12160SB_PUBLIC(
const char*) sb_dl_auto_tile_calc_type_format(sb_t_dl_auto_tile_calc_type type);
13153#ifdef SB_DEBUG_PROJECT_GET_PAR_MEMORY_LEAK
13154SB_PUBLIC(
sb_t_err) sb_project_get_par_imp(
const char*
const file,
const char*
const function,
int line,
SB_HANDLE handle,
sb_t_par**
const par);
13155#define sb_project_get_par(handle, par) sb_project_get_par_imp(__FILE__, __FUNCTION__, __LINE__, handle, par)
13364#define SB_IMAGE_INFO_EXT "rtn"
14180 char file_name[2][512];
14184 int sample_index[2];
14188 int models_number[2];
14193#define SB_CLS_0 "cls0"
14194#define SB_CLS_1 "cls1"
14200#define SB_FEATURE_0A "0A"
14201#define SB_FEATURE_0B "0B"
14202#define SB_FEATURE_0A_RI "0A_RI"
14203#define SB_FEATURE_0B_RI "0B_RI"
14204#define SB_FEATURE_2A "2A"
14205#define SB_FEATURE_2B "2B"
14206#define SB_FEATURE_2C "2C"
14207#define SB_FEATURE_2D "2D"
14208#define SB_FEATURE_2A_R "2A.R"
14209#define SB_FEATURE_2AA_R "2AA.R"
14210#define SB_FEATURE_2B_R "2B.R"
14211#define SB_FEATURE_2C_R "2C.R"
14212#define SB_FEATURE_2D_R "2D.R"
14213#define SB_FEATURE_2A_G "2A.G"
14214#define SB_FEATURE_2AA_G "2AA.G"
14215#define SB_FEATURE_2B_G "2B.G"
14216#define SB_FEATURE_2C_G "2C.G"
14217#define SB_FEATURE_2D_G "2D.G"
14218#define SB_FEATURE_2A_B "2A.B"
14219#define SB_FEATURE_2AA_B "2AA.B"
14220#define SB_FEATURE_2B_B "2B.B"
14221#define SB_FEATURE_2C_B "2C.B"
14222#define SB_FEATURE_2D_B "2D.B"
14223#define SB_FEATURE_2A_RI "2A_RI"
14224#define SB_FEATURE_2B_RI "2B_RI"
14225#define SB_FEATURE_2C_RI "2C_RI"
14226#define SB_FEATURE_2A_RI_R "2A_RI.R"
14227#define SB_FEATURE_2AA_RI_R "2AA_RI.R"
14228#define SB_FEATURE_2B_RI_R "2B_RI.R"
14229#define SB_FEATURE_2C_RI_R "2C_RI.R"
14230#define SB_FEATURE_2A_RI_G "2A_RI.G"
14231#define SB_FEATURE_2AA_RI_G "2AA_RI.G"
14232#define SB_FEATURE_2B_RI_G "2B_RI.G"
14233#define SB_FEATURE_2C_RI_G "2C_RI.G"
14234#define SB_FEATURE_2A_RI_B "2A_RI.B"
14235#define SB_FEATURE_2AA_RI_B "2AA_RI.B"
14236#define SB_FEATURE_2B_RI_B "2B_RI.B"
14237#define SB_FEATURE_2C_RI_B "2C_RI.B"
14238#define SB_FEATURE_3A "3A"
14239#define SB_FEATURE_3B "3B"
14240#define SB_FEATURE_3C "3C"
14241#define SB_FEATURE_3D "3D"
14242#define SB_FEATURE_3E "3E"
14243#define SB_FEATURE_4A "4A"
14247#define SB_FEATURES SB_FEATURE_0A SB_DELIMITER \
14248 SB_FEATURE_0B SB_DELIMITER \
14249 SB_FEATURE_0A_RI SB_DELIMITER \
14250 SB_FEATURE_0B_RI SB_DELIMITER \
14251 SB_FEATURE_2A SB_DELIMITER \
14252 SB_FEATURE_2A_R SB_DELIMITER \
14253 SB_FEATURE_2A_G SB_DELIMITER \
14254 SB_FEATURE_2A_B SB_DELIMITER \
14255 SB_FEATURE_2AA_R SB_DELIMITER \
14256 SB_FEATURE_2AA_G SB_DELIMITER \
14257 SB_FEATURE_2AA_B SB_DELIMITER \
14258 SB_FEATURE_2B SB_DELIMITER \
14259 SB_FEATURE_2B_R SB_DELIMITER \
14260 SB_FEATURE_2B_G SB_DELIMITER \
14261 SB_FEATURE_2B_B SB_DELIMITER \
14262 SB_FEATURE_2C SB_DELIMITER \
14263 SB_FEATURE_2C_R SB_DELIMITER \
14264 SB_FEATURE_2C_G SB_DELIMITER \
14265 SB_FEATURE_2C_B SB_DELIMITER \
14266 SB_FEATURE_2D SB_DELIMITER \
14267 SB_FEATURE_2D_R SB_DELIMITER \
14268 SB_FEATURE_2D_G SB_DELIMITER \
14269 SB_FEATURE_2D_B SB_DELIMITER \
14270 SB_FEATURE_2A_RI SB_DELIMITER \
14271 SB_FEATURE_2A_RI_R SB_DELIMITER \
14272 SB_FEATURE_2A_RI_G SB_DELIMITER \
14273 SB_FEATURE_2A_RI_B SB_DELIMITER \
14274 SB_FEATURE_2AA_RI_R SB_DELIMITER \
14275 SB_FEATURE_2AA_RI_G SB_DELIMITER \
14276 SB_FEATURE_2AA_RI_B SB_DELIMITER \
14277 SB_FEATURE_2B_RI SB_DELIMITER \
14278 SB_FEATURE_2B_RI_R SB_DELIMITER \
14279 SB_FEATURE_2B_RI_G SB_DELIMITER \
14280 SB_FEATURE_2B_RI_B SB_DELIMITER \
14281 SB_FEATURE_2C_RI SB_DELIMITER \
14282 SB_FEATURE_2C_RI_R SB_DELIMITER \
14283 SB_FEATURE_2C_RI_G SB_DELIMITER \
14284 SB_FEATURE_2C_RI_B SB_DELIMITER \
14285 SB_FEATURE_3A SB_DELIMITER \
14286 SB_FEATURE_3B SB_DELIMITER \
14287 SB_FEATURE_3C SB_DELIMITER \
14288 SB_FEATURE_3D SB_DELIMITER \
14289 SB_FEATURE_3E SB_DELIMITER \
14546 char classificator[32];
14613#define SB_SVL_STEP_INITIALIZATION "initializing data for svl"
14614#define SB_SVL_STEP_SEARCHING_RECIPE "choosing recipe"
14615#define SB_SVL_STEP_TRAINING_RECIPE "training recipe"
14616#define SB_SVL_STEP_FINALIZATION "finalization of svl"
14617#define SB_SVL_STEP_FINISHED "svl has finished"
sb_t_err sb_blobs_plot_roi(const sb_t_blobs *const blobs, sb_t_roi *const roi, unsigned char gl)
Prints the blobs on the roi.
sb_t_blob_distance_mode
Enumerates the algorithm for calculating the distance between blobs.
sb_t_blob_deleted
Defines the deleted blob.
sb_t_err sb_blob_plot_roi(const sb_t_blob *const blob, sb_t_roi *const roi, unsigned char gl)
Prints the blob on the roi.
sb_t_pixel_connection
Defines the pixel connection.
sb_t_err sb_blobs_destroy(sb_t_blobs **const blobs)
Destroys the blobs structure.
sb_t_err sb_blob_format_par(int *const c, char *const str, int str_size, int indentation, const sb_t_blob_par *const par)
Formats the blob analysis parameters structure.
sb_t_err sb_blob_copy(sb_t_blob *const dst, const sb_t_blob *const src)
Blob copy.
sb_t_err sb_blob_init_par(sb_t_blob_par *const par)
Initializes the fields of the structure.
sb_t_err sb_blobs_clone(sb_t_blobs **const dst, const sb_t_blobs *const src)
Blobs structure clone.
sb_t_err sb_blob_destroy(sb_t_blob *const blob)
Destroys the blob.
sb_t_err sb_blob_intersect(const sb_t_blob *const blob1, const sb_t_blob *const blob2, int extract_blob_seg, sb_t_blob **const res)
Blob intersection.
sb_t_err sb_blobs_create(sb_t_blobs **const blobs)
Creates the blobs structure.
sb_t_err sb_blobs_detection(sb_t_blobs **const blobs, const sb_t_image *const image, const sb_t_roi *const roi, const sb_t_blob_par *const par, sb_t_image_circularity_type circularity_type)
Blob analysis.
@ SB_BLOB_DISTANCE_MODE_CONTOUR
The distance between blobs is calculated using the contour.
@ SB_BLOB_DISTANCE_MODE_BOUNDING_BOX
The distance between blobs is calculated using the unrotated bounding box.
@ SB_BLOB_OK
Blob is not deleted.
@ SB_BLOB_DELETED_AFTER_MERGE
Blob is deleted after merge.
@ SB_BLOB_DELETED_BEFORE_MERGE
Blob is deleted before merge.
@ SB_PIXEL_CONNECTION_8
8 connection. 8-connected pixels are neighbors to every pixel that touches one of their edges or corn...
@ SB_PIXEL_CONNECTION_4
4 connection.
sb_t_err
Errors code enum.
const char * sb_err_format(sb_t_err code)
Returns the error message.
sb_t_err sb_trace(int trace_enable, int date_time_enable, int line_enable, int trace_win_enable, const char *const filename, sb_fp_trace_callback trace_callback, void *const user_data)
Sets the options for the messages trace.
void(* sb_fp_trace_callback)(void *const user_data, const char *const msg)
Definition of the callback for message trace.
@ SB_ERR_SVL_VALIDATION_DATASET
The SVL images dataset is too small to extract a validation dataset.
@ SB_ERR_IMAGE_CREATE
An error occurred creating the image.
@ SB_ERR_FILE_READ
An error occurred reading the file.
@ SB_ERR_MACHINE_ID
Machine id has a wrong format.
@ SB_ERR_LICENSE_MACHINE_ID_MATCH
Machine id doesn't match.
@ SB_ERR_IMAGE_WARP
Image warp function returns an error.
@ SB_ERR_FILE_WRITE
An error occurred writing the file.
@ SB_ERR_PATH_SIZE
the path name exceeds the maximum size
@ SB_ERR_SOCKET_CREATE
An error occurred creating the socket.
@ SB_ERR_IMAGE_FORMAT
The image format is wrong.
@ SB_ERR_MODEL_NOT_TRAINED
The model is not trained.
@ SB_ERR_LICENSE_NOT_FOUND
License key not found.
@ SB_ERR_IMAGE_DEPTH
The image has a wrong bit depth.
@ SB_ERR_FILE_COPY
Error copying a file.
@ SB_ERR_DL_INPAINTER_NOT_ASSIGNED
Deep Learning inpainter network path is not assigned.
@ SB_ERR_DIR_RENAME
An error occurred renaming the folder.
@ SB_ERR_VERSION
Unmanaged version.
@ SB_ERR_MODEL_DISABLED
A model is disabled.
@ SB_ERR_SAMPLE_NOT_FOUND
No sample found.
@ SB_ERR_IMAGE_RESIZE
Image resize function returns an error.
@ SB_ERR_MODEL_NAME
There are two models with the same name.
@ SB_ERR_LICENSE_VERSION
License is incompatible with the library version.
@ SB_ERR_IMAGE_DECODE
An error occurred decoding image.
@ SB_ERR_SVL_CHOOSE_FEATURES_FAST
Choose features failed to find a common combination for fast.
@ SB_ERR_MODEL_NOT_FOUND
The model of the sample is unknown or not assigned.
@ SB_ERR_MODEL_DESC_UTF8
Model description is not conform to UTF - 8 format.
@ SB_ERR_IMAGE_CHANNELS
The image has a wrong number of channels.
@ SB_ERR_SAMPLE_BACKGROUND
Too few background samples to execute the training. Increase the analysis ROI or reduce the scale.
@ SB_ERR_SOCKET_INVALID_IP
IP address is invalid.
@ SB_ERR_FILE_REMOVE
Error removing a file.
@ SB_ERR_SOCKET_INVALID_PORT
Port isn't a valid number.
@ SB_ERR_FILE_VERSION
The file has no version.
@ SB_ERR_DL_PRE_TRAINING_BORDERS_EXTENSION_MODE
The borders extension mode of pre-training file is different from that of the project.
@ SB_ERR_LIBRARY_DEPENDENCIES
Library dependencies not satisfied to execute the requested operation.
@ SB_ERR_SOCKET_LISTEN
Socket listen function has returned an error.
@ SB_ERR_SAMPLE_DISTANCE
There are two samples closer than the minimum distance set.
@ SB_ERR_ENCRYPT
An error occurred encrypting data.
@ SB_ERR_DIR_REMOVE
An error occurred removing the folder.
@ SB_ERR_DL_NETWORK_FILE_NOT_FOUND
Deep Learning Network file not found.
@ SB_ERR_DL_PRE_TRAINING_FILE_NOT_FOUND
Deep Learning pre-training file not found.
@ SB_ERR_LICENSE_EXPIRED
License is expired.
@ SB_ERR_SOCKET_SELECT
Socket select function has returned an error.
@ SB_ERR_SOCKET_SEND
Socket send function has returned an error.
@ SB_ERR_DECRYPT
An error occurred decrypting data.
@ SB_ERR_SVL_WAS_NOT_DONE
The SVL wasn't done.
@ SB_ERR_FILE_EMPTY
File is empty.
@ SB_ERR_DIR_NOT_EXIST
The directory doesn't exist.
@ SB_ERR_SOCKET_SET_PARAMETER
Set socket parameter has returned an error.
@ SB_ERR_LICENSE_MODELS_NUMBER
Number of models is greater than the maximum allowed for the current license configuration.
@ SB_ERR_FILE_NAME_EMPTY
File name is empty.
@ SB_ERR_SOCKET_CONNECT
An error occurred connecting the socket.
@ SB_ERR_BUFFER_SIZE
The buffer has an insufficient size.
@ SB_ERR_LICENSE_SAME_MACHINE_ID
Two licenses have the same machine id.
@ SB_ERR_MODEL_NAME_UNDEFINED
Model name is an empty string.
@ SB_ERR_DL_ROI_DEFECTS_NOT_SET
Not enough ROI defects area in SVL or validation image dataset for at least one model....
@ SB_ERR_IMAGE_LOAD
An error occurred loading the image.
@ SB_ERR_INTERNAL
Internal error.
@ SB_ERR_IMAGE_RESOLUTION
The image has a wrong resolution.
@ SB_ERR_DL_INTERNAL
Internal Deep Learning error.
@ SB_ERR_FILE_FORMAT
Wrong data file format.
@ SB_ERR_PROJECT_LOAD_MODE
The project was loaded with the wrong load parameter.
@ SB_ERR_SOCKET
A socket function has returned an error.
@ SB_ERR_INVALID_MAIL_ADDRESS
Mail address has a wrong format.
@ SB_ERR_NO_FILE_FOUND
No file found in the folder.
@ SB_ERR_DL_PRE_TRAINING_INPUT_SIZE
The input image size of pre-training file is different from that of the project.
@ SB_ERR_SVL_PERTURBATION
A perturbation has not been defined properly.
@ SB_ERR_SOCKET_BIND
An error occurred binding the socket.
@ SB_ERR_SENTINEL_TOO_MANY_KEYS
Too many keys connected to the pc.
@ SB_ERR_LICENSE_DISABLED
License is disabled.
@ SB_ERR_MODELS_ENABLED
There are no models enabled.
@ SB_ERR_LICENSE_CORRUPTED
License file is corrupted.
@ SB_ERR_SENTINEL
Sentinel key returns an error.
@ SB_ERR_PROJECT_NOT_FOUND
Project not found.
@ SB_ERR_FILE_NAME
Wrong file name: too long or unknown extension.
@ SB_ERR_DL_PRE_TRAINING_IMAGE_FORMAT
The image format of pre-training file is different from that of the project.
@ SB_ERR_LIBRARY_FUNCTION_ADDRESS
Could not locate the function.
@ SB_ERR_LEVELS_NUMBER
There aren't levels, or the number of the levels isn't the expected one, or exceeded the maximum leve...
@ SB_ERR_FILE_EXTENSION
Wrong file extension.
@ SB_ERR_XML
Error parsing xml file.
@ SB_ERR_FILE_OPEN
An error occurred opening the file.
@ SB_ERR_SAMPLES_GT_TOO_MANY
Too many ground truth samples.
@ SB_ERR_IMAGE_CIRCULARITY
The image circularity type is wrong.
@ SB_ERR_IMAGE_SIZE
Image has a wrong data size.
@ SB_ERR_IMAGE_WIDTH_STEP
Image has a wrong width_step value.
@ SB_ERR_FILE_NAME_LENGHT
File name too long.
@ SB_ERR_DL_NO_LABELED_IMAGES
No labeled images.
@ SB_ERR_CLS_CREATE
The function for the creation of the classifier has returned an error.
@ SB_ERR_DL_FREEZE_NOT_PRE_TRAINED
You cannot run SVL from scratch with freeze_mode enabled and without a pre-training file.
@ SB_ERR_STRUCT_HEADER_WRONG_VERSION
The version of the structure sb_t_struct_header is wrong.
@ SB_ERR_SAMPLE_WRONG
The sample has wrong data.
@ SB_ERR_DIR_EXIST
Checking the existence of the folder gave error.
@ SB_ERR_IMAGE_COMPRESSION
The image compression type is wrong.
@ SB_ERR_NO_POINT_FOUND
Point isn't found.
@ SB_ERR_IMAGE_TYPE
Unknown image type, should be a sb_t_image_info_type enum value.
@ SB_ERR_STRING_EMPTY
String empty.
@ SB_ERR_DL_PRE_TRAINING_FILE_NOT_VALID
Deep Learning pre-training file is not valid.
@ SB_ERR_NO_FEATURES_AVAILABLE
No features available for the data set.
@ SB_ERR_IMAGE_SIZE_CIRCULAR
Image resolution is smaller than the minimum allowed to handle circularity, reduce the scale or incre...
@ SB_ERR_PROJECT_TYPE
Wrong project type.
@ SB_ERR_LICENSE_WAIT_SERVER
Waiting to contact the license server.
@ SB_ERR_SVL_CHOOSE_FEATURES
Choose features failed to find a good combination.
@ SB_ERR_CLS
The function of a classifier has returned an error.
@ SB_ERR_DL_TILING_MODE
Wrong tiling mode.
@ SB_ERR_INITIALIZE
You must call the initialize function.
@ SB_ERR_ROI
The ROI is wrong.
@ SB_ERR_DL_PRE_TRAINING_MODELS_NUMBER
The models number of pre-training file is different from that of the project.
@ SB_ERR_LICENSE_FEATURES_NUMBER
Number of features is greater than the maximum allowed for the current license configuration.
@ SB_ERR_LIBRARY_OPEN
Could not load the dynamic library or the shared object.
@ SB_ERR_WARP_POINT_NOT_FOUND
Point isn't found in the lut.
@ SB_ERR_FILE_SAVE
An error occurred saving the file.
@ SB_ERR_SENTINEL_MASTER_KEY
Sentinel LDK Master key not present.
@ SB_ERR_MALLOC
The function that allocates memory gave error
@ SB_ERR_BASE64_SIZE
The dimension of the base64 buffer isn't 4 bytes aligned.
@ SB_ERR_THREAD
Thread management error.
@ SB_ERR_MEMORY_LEAK
There is a memory leak.
@ SB_ERR_DL_TRAINING_DATA_MISSING
Deep Learning training data missing.
@ SB_ERR_INSUFFICIENT_FREE_MEMORY
Insufficient free memory to complete the svl.
@ SB_ERR_DL_TILING_RANGE
It is not possible to calculate the range with the set values.
@ SB_ERR_UUID
The generation of UUID has returned an error or invalid UUID.
@ SB_ERR_XML_NODE_NOT_FOUND
An xml node was not found.
@ SB_ERR_NULL_POINTER
Function has been called with a NULL pointer.
@ SB_ERR_LICENSE_TYPE
The license type is unknown.
@ SB_ERR_DL_ROI_NOT_SET
Not enough ROI analysis area in SVL or validation image dataset. Increase the analysis ROI or the til...
@ SB_ERR_LICENSE
The license isn't valid.
@ SB_ERR_STRUCT_HEADER_WRONG_SIZE
The dimension of the structure sb_t_struct_header is wrong.
@ SB_ERR_CLS_TRAINING
The training function has returned an error.
@ SB_ERR_DL_ONNX_CONVERSION
Error in conversion in onnx format.
@ SB_ERR_LICENSE_CODE
Code of the TCP/IP license protocol is wrong.
@ SB_ERR_DL_INPAINTER_NOT_FOUND
Deep Learning inpainter network file not found.
@ SB_ERR_STRUCT_HEADER_WRONG_CODE
The code of the structure sb_t_struct_header is wrong.
@ SB_ERR_WRONG_PARAMETER
The function has been called with a parameter with a wrong value.
@ SB_ERR_DL_PRE_TRAINING_NETWORK_TYPE
The network type of pre-training file is different from that of the project.
@ SB_ERR_LICENSE_FILE
License file error (not exist, not readable, wrong format, wrong mail address)
@ SB_ERR_DIR_CREATE
An error occurred creating the folder.
@ SB_ERR_NVIDIA_NVML
Nvidia NVML returns an error getting gpu information.
@ SB_ERR_LICENSE_VM
License isn't allowed on Virtual Machine.
@ SB_ERR_SVL_WRONG
SVL is wrong.
@ SB_ERR_NO_LEVELS_AVAILABLE
No levels available to be processed.
@ SB_ERR_IMAGE_ENCODE
An error occurred encoding image.
@ SB_ERR_SOCKET_IOCTL
Socket ioctl function has returned an error.
@ SB_ERR_ROI_DEFECTS
The defects ROI is wrong.
@ SB_ERR_LICENSE_TRAINING
License error: training is disabled.
@ SB_ERR_SOCKET_TIMEOUT
Timeout sending or receiving data on socket.
@ SB_ERR_VERSION_FORMAT
Version is not formatted properly.
@ SB_ERR_DL_OPENVINO_DATA_NOT_EXIST
OpenVino weights do not exist.
@ SB_ERR_DL_PRE_TRAINING_IMAGE_CHANNELS
The image number of channels of pre-training file is different from that of the project.
@ SB_ERR_DL_NOT_SUPPORTED
Deep Learning modules are not supported.
@ SB_ERR_DL_CUDA_OUT_OF_MEMORY
CUDA Out Of Memory (OOM). Insufficient free GPU memory to execute the operation. Try reducing the net...
@ SB_ERR_RPF_NAME_EMPTY
The name of solution file is empty.
@ SB_ERR_SOCKET_RECEIVE
Socket receive function has returned an error.
@ SB_ERR_NO_CLASSIFIED_IMAGE
There aren't classified images.
@ SB_ERR_CLS_PREDICT
The predict function has returned an error.
@ SB_ERR_SCALE_NOT_FOUND
The scale is not found.
@ SB_ERR_LICENSE_MAIL_ADDRESS
Mail address in the license file is wrong.
@ SB_ERR_DL_INPUT_NETWORK_SIZE
Deep Learning wrong input network size.
@ SB_ERR_ROI_BOUNDING_BOX
Wrong roi bounding box.
@ SB_ERR_FILE_NOT_EXIST
The file doesn't exist.
@ SB_ERR_SENTINEL_RUN_TIME
Sentinel_LDK_Run-time is not running.
@ SB_ERR_SAMPLE_SCALE
The sample scale is wrong.
@ SB_ERR_SAMPLE_OUT_OF_IMAGE
The sample is out of image.
@ SB_ERR_MODELS_NUMBER
There aren't models, or the number of the models isn't the expected one, or exceeded the maximum mode...
@ SB_ERR_STRING_UTF8
String does not conform to UTF-8 format.
@ SB_ERR_SOCKET_CLOSED
Socket is closed.
@ SB_ERR_MODEL_NAME_UTF8
Model name is not conform to UTF - 8 format.
@ SB_ERR_DL_PRE_TRAINING_FEATURES_MULTIPLIER
The feature multiplier parameter of pre-training file is different from that of the project.
@ SB_ERR_SOCKET_MAC
Error while looking for a valid MAC address.
@ SB_ERR_CLS_NOT_TRAINED
The training wasn't done.
@ SB_ERR_LEVELS_ENABLED
There are no levels enabled.
@ SB_ERR_DL_PRE_TRAINING_LOSS_FN
The loss function of pre-training file is different from that of the project.
@ SB_ERR_DL_FRAMEWORK
Impossible to execute the requested operation: Deep Learning Frameworks not installed or corrupted.
@ SB_ERR_NOT_IMPLEMENTED
The function isn't implemented.
@ SB_ERR_LICENSE_MARKER
Marker of the TCP/IP license protocol is wrong.
@ SB_ERR_SAMPLE_NUMBER
Too few samples to execute the training.
@ SB_ERR_SOCKET_ACCEPT
Socket accept has returned an error.
sb_t_err sb_folder_rename(const char *const oldpath, const char *const newpath)
Renames a folder.
sb_t_err sb_file_extract_folder(const char *const full, char *const folderpath, int folderpath_size)
Extracts the folder path from the full file path.
sb_t_err sb_file_extract_name(const char *const full, int with_ext, char *const name, int name_size)
Extracts the file name from the full file path.
sb_t_err sb_folder_create(const char *const path)
Creates the folder with the specified path.
sb_t_err sb_folder_destroy(sb_t_folder **folder)
Frees all the resources of the sb_t_folder structure.
sb_t_err sb_folder_filter_images(sb_t_folder *const folder, SB_HANDLE module, sb_t_image_info_type image_info_type)
Filters images by project and type.
sb_t_err sb_folder_erase(sb_t_folder *folder, int index)
Removes the file with the specified index from the list.
sb_t_err sb_folder_remove(const char *const path)
Deletes a folder and all the files and subfolder contained.
sb_t_err sb_folder_exist(const char *const path, int *const exist)
Checks if the folder with the specified path exists.
sb_t_err sb_folder_load(sb_t_folder **const f, const char *const path, const char *const ext, int sort, int verbosity)
Creates the list of the name of the files in a specified folder.
#define SB_PAR_MODELS_NUM
Maximum number of models.
#define SB_PAR_PERTURBATIONS_NUM
Maximum number of perturbation of a sample.
sb_t_dl_library_type
Deep Learning library types.
sb_t_err sb_destroy_info(sb_t_info **const info)
Destroys the structure.
sb_t_err sb_release(void)
Releases all the resources allocates in the library.
sb_t_err sb_get_info(sb_t_info **const info, int dl_devices_info)
The function gets information about the sb library and the available computational devices.
sb_t_floating_point_op_type
Enumerates the floating point precision types to perform operations.
sb_t_err sb_init(const char *const license_file)
Initializes the SB library.
sb_t_err sb_init_dl(const char *const search_path, sb_t_dl_library_type lib_type)
Initialize the Deep Learning library.
SB_INLINE sb_t_bgra sb_bgra(unsigned char b, unsigned char g, unsigned char r, unsigned char a)
Inline constructor of structure sb_t_bgra.
#define SB_PAR_LEVELS_NUM
Maximum scales levels number to be used for Surface.
sb_t_framework_type
Defines framework types.
#define SB_IMAGE_NAME_STRING_LEN
Maximum length, in byte, of the image name string.
sb_t_device_type
Defines computing device types.
sb_t_err sb_format_info(const sb_t_info *const info, char *const str, int str_size)
Formats the sb library information structure.
SB_INLINE sb_t_version sb_version(int major, int minor, int vminor, int build_major)
Inline constructor of structure sb_t_version.
void * SB_HANDLE
HANDLE definition.
sb_t_interpolation_mode
Enumerates the interpolation modes.
#define SB_PAR_STRING_LEN
Maximum length, in byte, of a parameter string.
int sb_version_check(sb_t_version version1, sb_t_version version2)
Compares two version.
SB_INLINE sb_t_rgba sb_rgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Inline constructor of structure sb_t_rgba.
#define SB_FRAMEWORKS_MAX_NUMBER
Maximum number of frameworks associable to a device managed by the sb library.
sb_t_err sb_get_file_version(sb_t_version *const ver, const char *const file)
Get the version of a file.
int sb_is_valid_utf8(const char *string)
Check if a string conforms to UTF-8 format.
sb_t_err sb_get_uuid(char *const str, size_t size)
Creates a new uuid.
@ SB_DL_LIBRARY_NONE
No libraries defined.
@ SB_DL_LIBRARY_PYTORCH
Pytorch library.
@ SB_DL_LIBRARY_OPENVINO
Openvino library. Can be used only for inference with sb_project_detection function.
@ SB_FLOATING_POINT_OPS_TYPE_SINGLE_PRECISION
Single Precision (FP32).
@ SB_FLOATING_POINT_OPS_TYPE_HALF_PRECISION
Half Precision (FP16).
@ SB_FRAMEWORK_TYPE_SB
Framework type SqueezeBrains. To be used for Retina and Surface projects.
@ SB_FRAMEWORK_TYPE_PYTORCH
Framework type Pytorch. To be used for Deep Cortex and Deep Surface projects.
@ SB_FRAMEWORK_TYPE_OPENVINO
Frameowrk type Intel OpenVino. To be used for Deep Cortex and Deep Surface projects (detection only).
@ SB_FRAMEWORK_TYPE_NONE
Framework type None.
@ SB_DEVICE_IGPU_INTEL
GPU Integrated Intel device.
@ SB_DEVICE_DGPU_INTEL
GPU Discrete Intel device.
@ SB_DEVICE_GPU_NVIDIA
GPU NVidia device.
@ SB_DEVICE_NONE
Device not defined.
@ SB_DEVICE_CPU
CPU generic device.
@ SB_INTERPOLATION_MODE_NN
Nearest Neighbor pixel interpolation.
@ SB_INTERPOLATION_MODE_BILINEAR
Bilinear interpolation.
SB_INLINE sb_t_point2d_f sb_point2d_f(float x, float y)
Inline constructor of structure sb_t_point2d_f.
SB_INLINE sb_t_range sb_range(int min, int max)
Inline constructor of structure sb_t_range.
SB_INLINE sb_t_range_flt sb_range_flt(float min, float max)
Inline constructor of structure sb_t_range_flt.
sb_t_err sb_polyline_resize(sb_t_point2d_f *points, int size, sb_t_point2d_f center, float angle, float offset)
Resize a polyline with respect of a center and an angle.
SB_INLINE sb_t_point sb_point(int x, int y)
Inline constructor of structure sb_t_point.
SB_INLINE sb_t_size sb_size(int width, int height)
Inline constructor of structure sb_t_size.
SB_INLINE sb_t_rect sb_rect(int x, int y, int width, int height)
Inline constructor of structure sb_t_rect.
SB_INLINE sb_t_size_flt sb_size_flt(float width, float height)
Inline constructor of structure sb_t_size_flt.
sb_t_err sb_image_info_get_version(const char *const image_file, sb_t_version *version, char *const version_str, int size_version_str)
Gets the version of the image information file.
sb_t_err sb_image_info_set_roi(SB_HANDLE image_info, const sb_t_roi *const roi)
Sets the ROI in a SqueezeBrains image info handle.
sb_t_err sb_image_info_get_results(SB_HANDLE image_info, sb_t_res **const res, int compressed)
Get the results of the detection from the image info handle.
sb_t_err sb_image_info_get_notes(SB_HANDLE image_info, char **const str)
Gets the note from the SqueezeBrains image info handle.
sb_t_err sb_image_info_get_samples(SB_HANDLE image_info, sb_t_samples **const samples)
Get the samples of an image from the corresponding SqueezeBrains image info handle.
sb_t_image_info_type
Defines the type of the image.
sb_t_err sb_image_info_destroy_details(sb_t_image_info_details **const details)
Destroys the array of the images info details.
sb_t_err sb_image_info_set_type(SB_HANDLE image_info, sb_t_image_info_type type)
Sets the type of the SqueezeBrains image info.
sb_t_err sb_image_info_set_notes(SB_HANDLE image_info, const char *const str)
Set a note into SqueezeBrains image info handle.
sb_t_err sb_image_info_get_type(SB_HANDLE image_info, const char *const model_name, sb_t_image_info_type *const type)
Retrieves the SqueezeBrains image info handle type.
sb_t_err sb_image_info_change_project(const char *const image_file, const sb_t_project_info *const project_info_old, SB_HANDLE module_handle_new)
Change the project to the data associated to the image.
sb_t_err sb_image_info_check_samples(const sb_t_samples *const samples, SB_HANDLE project, SB_HANDLE image_info, sb_t_size image_size)
Check the correctness of the samples metadata.
sb_t_err sb_image_info_set_results(SB_HANDLE image_info, const sb_t_res *const res)
Set the results of the detection in the image info handle.
sb_t_err sb_image_info_get_name(SB_HANDLE image_info, char *const str, int str_size)
Retrieves the name of the image.
sb_t_err sb_image_info_add_sample(SB_HANDLE image_info, const sb_t_sample *const sample)
Adds a sample into the SqueezeBrains image info handle.
sb_t_err sb_image_info_get_project_info(SB_HANDLE handle, sb_t_project_info *const project_info)
Retrieves the project information.
sb_t_err sb_image_info_get_roi(SB_HANDLE image_info, sb_t_roi **const roi, int width, int height, int compressed)
Gets the ROI from a SqueezeBrains image info handle.
sb_t_err sb_image_info_copy_labeling(SB_HANDLE dst, const char *const image_file, const sb_t_project_info *src_prj, int roi, int ground_truth, int *copied)
Copies the labeling information from the src project into the destination image info.
sb_t_err sb_image_info_clone(SB_HANDLE src, SB_HANDLE *pdst, SB_HANDLE module_handle)
Clones the SqueezeBrains image info.
sb_t_err sb_image_info_get_details(const char *const image_file, sb_t_image_info_details **details)
Load the file and get the array of the image info details.
sb_t_err sb_image_info_get_roi_defects(SB_HANDLE image_info, sb_t_roi **const defects, int width, int height, int compressed)
Gets the surface defects ROI from a SqueezeBrains image info handle.
sb_t_err sb_image_info_load(SB_HANDLE *image_info, const char *const image_file, SB_HANDLE module_handle)
Creates a SqueezeBrains image info handle.
sb_t_err sb_image_info_set_samples(SB_HANDLE image_info, const sb_t_samples *const samples)
Saves the samples in the corresponding SqueezeBrains image info handle.
sb_t_err sb_image_info_set_project_name(SB_HANDLE image_info, const char *const project_name)
Set the project name in the image info handle.
sb_t_err sb_image_info_remove_project(const char *const image_file, const char *const project_uuid)
Remove the project with the specified UUID from the data associated to the image.
sb_t_err sb_image_info_apply_par_changes(SB_HANDLE image_info, const sb_t_par_changes_info *info)
Apply the par changes to the SqueezeBrains image info handle.
sb_t_err sb_image_info_set_roi_defects(SB_HANDLE image_info, const sb_t_roi *const defects)
Sets the surface defects ROI on a SqueezeBrains image info handle.
sb_t_err sb_image_info_get_tiles_svl(SB_HANDLE handle, sb_t_tiles_info **const ptiles)
Retrieves the svl tiles information.
sb_t_err sb_image_info_get_custom_par_root(SB_HANDLE handle, SB_HANDLE *node_root)
Returns the xml root node of your own custom parameters.
sb_t_err sb_image_info_reset(SB_HANDLE image_info)
Erases all the data from the SqueezeBrains image info handle.
sb_t_err sb_image_info_destroy(SB_HANDLE *image_info)
Destroys the SqueezeBrains image info handle.
sb_t_err sb_image_info_save(SB_HANDLE image_info)
Saves the SqueezeBrains image info handle into the image file.
@ SB_IMAGE_INFO_TYPE_SVL_USED
Read-only value. Image is used for SVL and for training.
@ SB_IMAGE_INFO_TYPE_TEST
Image is used for test.
@ SB_IMAGE_INFO_TYPE_SVL
Image is used for SVL and not used for training.
@ SB_IMAGE_INFO_TYPE_NONE
Image is not used.
sb_t_err sb_image_create(sb_t_image **const pimg, int width, int height, sb_t_image_format format)
Creates an image.
sb_t_err sb_image_change_brightness(const sb_t_image *const src, sb_t_image *const dst, float delta_brightness)
Changes the image brightness by the percentage amount specified.
sb_t_image_flip_mode
Enumeration of the flip mode.
sb_t_err sb_image_convert(sb_t_image **const dst, sb_t_image *const src, sb_t_image_format format)
Convert the source image into the destination image.
sb_t_image_circularity_type
Enumeration of the image circularity type.
sb_t_err sb_image_read_size(sb_t_size *const size, const char *const file)
Get the image size from a file.
const char * sb_image_format(sb_t_image_format format)
Returns the string of the image format.
const char * sb_image_circularity_type_format(sb_t_image_circularity_type type)
Returns the string of the image circularity type.
sb_t_err sb_image_flip(const sb_t_image *const src, sb_t_image *const dst, sb_t_image_flip_mode mode)
Flips the image.
sb_t_image_compress_type
Type of image compression.
sb_t_err sb_image_change_contrast(const sb_t_image *const src, sb_t_image *const dst, float delta_contrast)
Changes the image contrast by the percentage amount specified.
sb_t_err sb_image_set_clip_blend(sb_t_image *const img, int x, int y, const sb_t_rgba *const color)
Set the pixel (x,y) with the color using also alpha blending.
sb_t_err sb_image_shift(const sb_t_image *const src, sb_t_image *const dst, int x_shift, int y_shift, int circular)
Shifts the image.
sb_t_err sb_image_copy(const sb_t_image *const src, sb_t_image *const dst)
Copies the image.
sb_t_err sb_image_get_sample(const sb_t_image *const src, sb_t_point centre, double angle_rad, float scale, sb_t_image *const dst)
Copies, rotates, resizes a rectangular roi of the source image to the destination one.
sb_t_err sb_image_destroy(sb_t_image **const pimg)
Destroys the image.
sb_t_err sb_image_save(const sb_t_image *const img, const char *const file, const int *const params)
Saves the image in a file.
sb_t_err sb_image_rotate(const sb_t_image *const src, sb_t_point centre, double angle, sb_t_interpolation_mode interpolation_mode, sb_t_image *const dst)
Rotates an image.
sb_t_err sb_image_clone(sb_t_image **const dst, const sb_t_image *const src)
Clones the image.
sb_t_err sb_image_set_data(sb_t_image *const img, unsigned char *const data)
Sets the pointer to a block of memory for image data.
sb_t_err sb_image_create_header(sb_t_image **const pimg, int width, int height, int width_step, sb_t_image_format format)
Creates an image but doesn't allocate memory for the data.
sb_t_err sb_image_decompress(sb_t_image **const dst, sb_t_image *const src)
Decompress the image.
sb_t_err sb_image_clean(sb_t_image *const img)
Cleans the image.
sb_t_err sb_image_copy_rect(const sb_t_image *const src, sb_t_rect rect, sb_t_image **const dst)
Copies a rectangular crop of an image into another one.
sb_t_err sb_image_resize(const sb_t_image *const src, sb_t_rect rect, float scale, sb_t_interpolation_mode interpolation_mode, sb_t_image *const dst)
Resizes the image.
sb_t_err sb_image_load(sb_t_image **const img, const char *const file)
Loads an image from a file.
sb_t_image_compress_par
Definitions of parameters used by the image encoders.
sb_t_err sb_image_compress(sb_t_image **const dst, sb_t_image *const src, sb_t_image_compress_type compression, const void *const params)
Compress the image with the compression method specified.
sb_t_err sb_image_get_pixel(const sb_t_image *const img, int x, int y, sb_t_rgba *const color)
Get the pixel (x,y).
sb_t_image_format
Format of image pixel.
@ SB_IMAGE_FLIP_VERTICAL
flips the image around vertical axis.
@ SB_IMAGE_FLIP_HORIZONTAL
flips the image around horizontal axis.
@ SB_IMAGE_FLIP_BOTH
flips the image around both horizontal and vertical axises, it is a rotation of 180 degrees.
@ SB_IMAGE_CIRCULARITY_TYPE_HORIZONTAL
Horizontal image circularity.
@ SB_IMAGE_CIRCULARITY_TYPE_NONE
No image circularity.
@ SB_IMAGE_CIRCULARITY_TYPE_VERTICAL
Vertical image circularity, not implemented yet.
@ SB_IMAGE_COMPRESS_JPEG
JPEG compression.
@ SB_IMAGE_COMPRESS_NONE
uncompressed or raw images
@ SB_IMAGE_COMPRESS_RLE
RLE (Run Length Encoding) lossless compression.
@ SB_IMAGE_COMPRESS_PNG
PNG compression.
@ SB_IMAGE_COMPRESS_PAR_JPEG_QUALITY
Quality of jpeg image.
@ SB_IMAGE_FORMAT_BW8
BW: one channel, 8 bit per channel.
@ SB_IMAGE_FORMAT_BGR888
BGR: three channel, 8 bit per channel.
@ SB_IMAGE_FORMAT_RGB888
RGB: three channel, 8 bit per channel.
@ SB_IMAGE_FORMAT_UI32
unsigned int 32 bit
const char * sb_license_format_type(sb_t_license_type type)
Returns the string of the license type.
sb_t_err sb_license_configuration_check(SB_HANDLE module, sb_t_license_configuration_id configuration_id, char **const msg)
Checks if the project can be used with a license configuration.
sb_t_err sb_license_get_hw_info(char **const str)
Returns the hardware information.
sb_t_err sb_license_check(SB_HANDLE module, char **const msg)
Checks the license status and if the project can be used with the current license configuration.
const char * sb_license_format_configuration(sb_t_license_configuration_id configuration)
Returns the string of the license configuration.
sb_t_err sb_license_apply_v2c(const char *const v2c, char **const msg_err, int verbosity)
Applies the v2c file to the usb dongle key.
sb_t_license_module_status
Enumerations of status of a module of the license.
sb_t_err sb_license_get_info(sb_t_license *const info)
Returns the license information.
sb_t_license_module_id
Enumerations of modules of the SB library.
const char * sb_license_format_module_id(sb_t_license_module_id code)
Returns the string of the module id.
sb_t_err sb_license_format_info(const sb_t_license *const info, char *const str, int str_size)
Formats the license structure.
#define SB_LICENSE_VENDOR_CODE_SIZE
Size, in bytes, of the string of the vendor code.
sb_t_license_configuration_id
Enumerations of the license configurations.
const char * sb_license_format_module_status(sb_t_license_module_status status)
Returns the string of the feature status.
sb_t_license_type
Enumerations of the license types.
@ SB_LICENSE_MODULE_STATUS_ACTIVE
The license is valid and active.
@ SB_LICENSE_MODULE_STATUS_DISABLED
The license is disabled.
@ SB_LICENSE_MODULE_STATUS_ERR
There is an error. See the field sb_t_license_module::err.
@ SB_LICENSE_MODULE_STATUS_NULL
The license status is undefined.
@ SB_LICENSE_MODULE_RETINA
Retina.
@ SB_LICENSE_MODULE_NUMBER
Number of modules.
@ SB_LICENSE_MODULE_NONE
Module type not defined.
@ SB_LICENSE_MODULE_DEEP_RETINA
Deep Retina.
@ SB_LICENSE_MODULE_SURFACE
Surface.
@ SB_LICENSE_MODULE_DEEP_CORTEX
Deep Cortex.
@ SB_LICENSE_MODULE_DEEP_SURFACE
Deep Surface.
@ SB_LICENSE_BASIC
Basic configuration.
@ SB_LICENSE_CONFIGURATION_NUMBER
Number of configurations.
@ SB_LICENSE_PREMIUM
Premium configuration.
@ SB_LICENSE_STANDARD
Standard configuration.
@ SB_LICENSE_NOT_PRESENT
License is not present.
@ SB_LICENSE_DISABLED
License is disabled.
@ SB_LICENSE_MASTER
Master license: hasn't an expiry date.
@ SB_LICENSE_NULL
License type isn't defined.
@ SB_LICENSE_DEMO
Demo license: has an expiry date.
sb_t_err sb_lut_destroy(SB_HANDLE *phandle)
Destroys the handle of the lut.
sb_t_err sb_lut_save(SB_HANDLE phandle, const char *const file_path)
Saves the lut in a file.
sb_t_err sb_lut_get_size(SB_HANDLE phandle, int *const width, int *const height)
Retrieves the size of the lut.
sb_t_err sb_lut_create(SB_HANDLE *phandle, int width, int height)
Creates the handle of the lut.
sb_t_err sb_lut_warp_point(SB_HANDLE phandle, const sb_t_point *const src, sb_t_point *const dst)
Warps the point.
sb_t_err sb_lut_load(SB_HANDLE *phandle, const char *const file_path)
Loads the lut from a file.
sb_t_err sb_lut_get_ptr(SB_HANDLE phandle, sb_t_lut_point **const ptr)
Retrieves, in the parameter ptr, the pointer to internal array of the lut.
void * sb_malloc(size_t size)
Allocates a memory block.
void * sb_calloc(size_t count, size_t size)
Allocates and zero-initialize an array.
void * sb_realloc(void *ptr, size_t size)
Reallocates a memory block.
sb_t_malloc_check
Type of counter for the memory leak check.
void sb_free(void *ptr)
Deallocates a memory block.
sb_t_err sb_malloc_check_memory_leak_reset(sb_t_malloc_check check)
Resets the memory leak control.
sb_t_err sb_malloc_check_memory_leak(sb_t_malloc_check check)
Checks if the library has a memory leak.
@ SB_MALLOC_CHECK_MAIN_COUNTER
The main counter.
@ SB_MALLOC_CHECK_SECOND_COUNTER
The second counter.
const char * sb_framework_type_format(sb_t_framework_type type)
Returns the string of the framework type.
const char * sb_interpolation_mode_format(sb_t_interpolation_mode mode)
Returns the string of the interpolation mode.
sb_t_err sb_par_copy(sb_t_par *const dst, const sb_t_par *const src)
Copies the project parameters structure.
sb_t_err sb_par_create(sb_t_par **const par, sb_t_project_type project_type)
Creates the project parameters structure.
const char * sb_device_type_format(sb_t_device_type type)
Returns the string of the device type.
sb_t_err sb_par_add_level(sb_t_par *const par, const char *const model_name, float scale)
Adds the level to the parameter structure.
sb_t_err sb_par_compare(const sb_t_par *const par1, const sb_t_par *const par2)
Compares content of a pair of project parameter structures.
sb_t_err sb_par_set_model_description(sb_t_par *const par, const char *const model_name, const char *const description)
Set a brief description of the model into parameters.
sb_t_err sb_par_remove_model(sb_t_par *const par, const char *const model_name)
Removes the model from the structure of the project parameters.
sb_t_err sb_par_clone(sb_t_par **const dst, const sb_t_par *const src)
Clones the project parameters structure.
sb_t_err sb_par_format(const sb_t_par *const par, char *const str, int str_size)
Formats the project parameters structure.
sb_t_err sb_par_get_collaboration(sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int *const value)
Retrieves the collaboration between two models.
sb_t_err sb_par_set_devices(sb_t_par *const par, sb_t_device_type device_type, sb_t_framework_type framework, int id, int svl)
Set device parameters.
sb_t_err sb_par_add_model(sb_t_par *const par, const char *const model_name)
Adds the model to the parameter structure.
sb_t_err sb_par_set_collaboration(sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int value)
Sets collaboration between two models.
sb_t_err sb_par_init(sb_t_par *const par, sb_t_project_type project_type)
Initializes the fields of the structure.
sb_t_err sb_par_remove_level(sb_t_par *const par, const char *const model_name, float scale)
Removes the l-th level from the structure of the project parameters.
sb_t_err sb_par_destroy(sb_t_par **const par)
Destroys the project parameters structure.
const char * sb_floating_point_precision_type_format(sb_t_floating_point_op_type type)
Returns the string of the floating point precision type.
sb_t_err sb_project_set_par(SB_HANDLE handle, const sb_t_par *const par)
Sets the parameters structure into the project handle.
sb_t_err sb_project_set_name(SB_HANDLE handle, const char *const name)
Sets the name into the project handle.
sb_t_project_training_status
Defines project training status.
sb_t_err sb_project_detection_destroy_info(sb_t_project_detection_info **const di)
Destroy the detection info structure.
sb_t_err sb_project_get_scale_offset_par(SB_HANDLE handle, sb_t_scale_offset_par *const scale_offset)
Gets the scale offset from the project handle.
sb_t_project_mode
Defines the loading or saving mode of a project.
sb_t_err sb_project_create(SB_HANDLE *phandle, const char *const project_name, sb_t_project_type project_type)
Creates a new project of the specifed type.
sb_t_err sb_project_save(SB_HANDLE handle, const char *const solution_file, sb_t_project_mode mode)
Saves the project to file.
sb_t_err sb_project_set_notes(SB_HANDLE handle, const char *const note)
Sets the note into the project handle.
sb_t_err sb_project_get_info(SB_HANDLE handle, sb_t_project_info *project_info)
Gets the project information from the handle.
sb_t_err sb_project_get_par_changes_info(SB_HANDLE handle, const sb_t_par *const par, sb_t_par_changes_info **const par_changes_info)
Returns the information on what sb_project_set_par and sb_image_info_apply_par_changes do when they a...
sb_t_err sb_project_destroy_par_changes_info(sb_t_par_changes_info **const par_changes_info)
Destroys the structure.
sb_t_err sb_project_set_sensitivity(SB_HANDLE handle, const char *const model_name, float scale, float sensitivity)
Sets the sensitivity of the detection in the project handle.
sb_t_err sb_project_get_custom_par_root(SB_HANDLE handle, SB_HANDLE *node_root)
Returns the xml root node of your own custom parameters.
sb_t_project_type
Project types enum.
sb_t_err sb_project_load(SB_HANDLE *phandle, const char *const solution_file, const char *const project_uuid, sb_t_project_mode mode)
Loads an existing project from a solution file.
sb_t_err sb_project_detection(SB_HANDLE handle, const sb_t_image *const img, const sb_t_roi *const roi, const sb_t_roi *const roi_defects, const sb_t_samples *const samples)
Detection function.
sb_t_err sb_project_set_scale_offset_par(SB_HANDLE handle, sb_t_scale_offset_par scale_offset)
Sets in the project handle the scale offset used at detection time.
const char * sb_project_training_status_format(sb_t_project_training_status training_status)
Returns the string of the training status.
sb_t_err sb_project_get_res(SB_HANDLE handle, sb_t_res **const res, int details)
Retrieves the results of the last elaborated image.
const char * sb_project_type_format(sb_t_project_type type)
Returns the string of the project type.
sb_t_err sb_project_destroy(SB_HANDLE *phandle)
Frees all the resources of the project handle.
sb_t_err sb_project_copy_labeling(const char *const path_solution_dst, const char *const path_solution_src, int copy_roi, int copy_labeling, int verbosity)
Copies the analysis roi and the labeling between two current projects of two different solutions.
sb_t_err sb_project_get_svl_version(SB_HANDLE handle, sb_t_version *const version, char *const version_str, int size_version_str)
Returns the version of the SB library when the last SVL was made.
sb_t_err sb_project_detection_get_info(SB_HANDLE handle, const sb_t_image *const src, const sb_t_roi *const roi, sb_t_project_detection_info **const di)
Returns detection information.
sb_t_err sb_project_clone(SB_HANDLE src, SB_HANDLE *pdst, sb_t_project_mode mode, int regenerate_uuid)
Clones the SqueezeBrains project.
sb_t_err sb_project_change_type(const char *const solution_file, const char *const project_uuid, sb_t_project_type project_type)
Change the project type.
sb_t_err sb_project_reset_stat(SB_HANDLE handle)
Resets the internal statistics of the elaborations.
sb_t_err sb_project_get_default_features(SB_HANDLE handle, char *str, int size)
Get the project default features depending on the project type (Retina or Surface)
sb_t_err sb_project_invalidate(SB_HANDLE handle, const char *const model_name, float scale)
Eliminates the training of the models.
sb_t_err sb_project_get_stat(SB_HANDLE handle, sb_t_stat **const stat)
Gets the statistics from the handle.
sb_t_err sb_project_openvino_conversion(SB_HANDLE handle, const char *const converter_path)
Starting from the pytorch weights, it generates the openvino weights.
sb_t_err sb_project_get_notes(SB_HANDLE handle, char **const note)
Gets the note from the project handle.
sb_t_err sb_project_get_sensitivity(SB_HANDLE handle, const char *const model_name, float scale, float *const sensitivity)
Gets the classification threshold from the project handle.
sb_t_err sb_project_get_name(SB_HANDLE handle, char **const name)
Gets the name from the project handle.
sb_t_err sb_project_get_par(SB_HANDLE handle, sb_t_par **const par)
Retrieves the project parameters structure.
sb_t_err sb_project_check_trained(SB_HANDLE handle, const char *const model_name, float scale, sb_t_project_training_status *const training_status)
Checks if the project is trained.
@ SB_PROJECT_TRAINED_NONE
Project is not trained.
@ SB_PROJECT_TRAINED
Project is trained.
@ SB_PROJECT_TRAINED_OPENVINO
Project is trained and Intel OpenVino support is available.
@ SB_PROJECT_MODE_NO_DETECTION
@ SB_PROJECT_MODE_DETECTION_ONLY
Load/save the minimum module information to allow detection.
@ SB_PROJECT_MODE_DETECTION_AND_SVL
Load/save all the module information.
@ SB_PROJECT_TYPE_RETINA
Project Retina.
@ SB_PROJECT_TYPE_DEEP_RETINA
Project Deep Retina.
@ SB_PROJECT_TYPE_SURFACE
Project Surface.
@ SB_PROJECT_TYPE_DEEP_SURFACE
Project Deep Surface.
@ SB_PROJECT_TYPE_DEEP_CORTEX
Project Deep Cortex.
sb_t_err sb_res_decompress(sb_t_res *const res)
Decompress thre results.
sb_t_surface_image_truth
Defines the surface image truth.
sb_t_err sb_tiles_info_destroy(sb_t_tiles_info **const ptiles)
Destroy the tiles information.
sb_t_tile_type
Enumerates the tile types.
sb_t_err sb_res_compress(sb_t_res *const res)
Compress the results, in particular the Surface plane images.
sb_t_err sb_tiles_info_no_overlap(sb_t_tiles_info *const tiles, sb_t_size img_size, int offset)
Rearranges the tiles so that they do not go out of the picture and do not overlap.
sb_t_err sb_res_destroy(sb_t_res **const res)
Destroys the module results structure.
const char * sb_tile_type_format(sb_t_tile_type type)
Returns the string of the tile type.
sb_t_err sb_tiles_info_clone(sb_t_tiles_info **const pdst, const sb_t_tiles_info *const src)
Clones the tile information structure.
sb_t_err sb_res_clone(sb_t_res **const dst, const sb_t_res *const src)
Copies the results of image elaboration.
@ SB_IMAGE_TRUTH_OVERKILL
False defects found.
@ SB_IMAGE_TRUTH_UNDEFINED
Undefined truth.
@ SB_IMAGE_TRUTH_GOOD
No defects.
@ SB_IMAGE_TRUTH_NO_GOOD
Defects found.
@ SB_IMAGE_TRUTH_ESCAPE
Defects not found.
@ SB_TILE_TYPE_NOT_USED
The tile is not used because it has no pixels in the ROI analysis.
@ SB_TILE_TYPE_USED
The tile is used.
@ SB_TILE_TYPE_USED_SVL
The tile is used for svl by sb_svl_run function.
sb_t_err sb_roi_apply_lut(sb_t_roi *const roi, unsigned char *lut)
Applies the gray level lut to the roi image.
sb_t_err sb_roi_set_blob(sb_t_roi *const roi, unsigned char gl, const sb_t_image *const src, const sb_t_blob_par *const par, const sb_t_point *const start_point, int fill_holes, sb_t_range hole_area, const sb_t_rect *analysis_rect)
Sets a ROI from blob analysis.
sb_t_err sb_roi_reset(sb_t_roi *const roi)
Resets the ROI.
sb_t_err sb_roi_set_circle(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius, int reset_roi)
Sets a circular ROI.
sb_t_err sb_roi_create_header(sb_t_roi **const roi, int width, int height, int width_step)
Creates a ROI but doesn't allocate memory for the data.
sb_t_err sb_roi_evaluate_bounding_box(sb_t_roi *const roi)
Calculates the bounding box of the roi depending by the lut.
sb_t_err sb_roi_set_rect(sb_t_roi *const roi, unsigned char gl, sb_t_rect rect, int reset_roi)
Sets a rectangular ROI.
sb_t_err sb_roi_set_ellipse(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius_x, int radius_y, int reset_roi)
Sets an elliptical ROI.
sb_t_err sb_roi_clone(sb_t_roi **const dst, const sb_t_roi *const src)
Copies a roi.
sb_t_err sb_roi_compress(sb_t_roi *const roi)
Compresses the ROI and deletes the uncompressed version.
sb_t_err sb_roi_create(sb_t_roi **const roi, int width, int height)
Creates a ROI.
sb_t_err sb_roi_decompress(sb_t_roi *const roi)
Decompresses the ROI and deletes the compressed version.
sb_t_err sb_roi_plot(sb_t_image *const image, const sb_t_roi *const roi, const unsigned char *lut, sb_t_rgba color)
Draws the roi on the image.
sb_t_err sb_roi_set_data(sb_t_roi *const roi, unsigned char *const data)
Sets the pointer of the ROI data into the ROI.
sb_t_err sb_roi_set_circular_crown(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius_min, int radius_max, int start_angle, int end_angle, int reset_roi)
Sets an angular circular crown ROI.
sb_t_err sb_roi_destroy(sb_t_roi **const roi)
Destroys the ROI.
sb_t_err sb_samples_destroy(sb_t_samples **const samples)
Destroy the samples structure.
sb_t_err sb_samples_clone(sb_t_samples **const dst, const sb_t_samples *const src)
Copies the samples of an image.
sb_t_err sb_sample_weights_image_overlay(sb_t_image *const image, const sb_t_sample *const s)
Draws the image of the weights of the sample on a image.
sb_t_err sb_samples_create(sb_t_samples **const samples)
Creates a samples structure.
sb_t_err sb_sample_clone(const sb_t_sample *const src, sb_t_sample *const dst)
Copies a single sample.
sb_t_err sb_sample_get_vertex(sb_t_point centre, float scale, sb_t_size obj_size, sb_t_point *const ul, sb_t_point *const br, sb_t_size *const size)
Evaluates the vertices of the rectangle of the sample.
sb_t_obj_type
Defines the type of the object.
sb_t_err sb_sample_get_model_index(const sb_t_sample *const s, SB_HANDLE handle, int *const model_index)
Returns the model index of the sample.
sb_t_err sb_sample_get_level_index(const sb_t_sample *const s, SB_HANDLE handle, int *const level_index)
Returns the index of scale level of the sample.
sb_t_sample_classify_mode
Enumeration of the classification modes of a sample.
sb_t_err sb_samples_insert(sb_t_samples *const samples, const sb_t_sample *const sample, int sample_index)
Inserts a sample in the list of the samples of an image.
sb_t_err sb_samples_distance(SB_HANDLE project, const sb_t_sample *const sample1, const sb_t_sample *const sample2, const sb_t_roi *const roi, float *const distance, int *const are_near)
Evaluates the distance between two samples.
const char * sb_format_truth(sb_t_truth truth)
Returns the string of the truth of the object.
sb_t_err sb_sample_destroy(sb_t_sample *const sample)
Destroys the content of sample structure.
sb_t_truth
Type of truth of a sample.
sb_t_err sb_samples_swap(sb_t_samples *const samples, int sample_index_1, int sample_index_2)
Swaps the samples with index sample_index_1 and sample_index_2.
sb_t_err sb_samples_remove(sb_t_samples *const samples, int sample_index)
Removes a sample from the list of the samples of an image.
@ SB_OBJ_LEARNING
Object is used for learning.
@ SB_OBJ_TEST
Object is not used for learning.
@ SB_TRUTH_MODEL_DISABLED
A sample of a disabled model.
@ SB_TRUTH_TRUE_NEGATIVE
Truth True Negative.
@ SB_TRUTH_FALSE_NEGATIVE
Truth False Negative.
@ SB_TRUTH_TRUE_POSITIVE
Truth True Positive.
@ SB_TRUTH_UNDEFINED
Truth not defined.
@ SB_TRUTH_OPTIONAL_POSITIVE
Truth Optional Positive.
@ SB_TRUTH_OPTIONAL_NEGATIVE
Truth Optional Negative.
@ SB_TRUTH_FALSE_POSITIVE
Truth False Positive.
@ SB_TRUTH_OUT_OF_ROI
Truth Out Of ROI.
sb_t_err sb_solution_set_current_project(const char *const solution_file, const char *const project_uuid)
Set current project in the solution_file.
sb_t_err sb_solution_get_info(const char *const solution_file, sb_t_solution_info **const solution)
Returns the information contained in the solution_file.
sb_t_err sb_solution_remove_project(const char *const solution_file, const char *const project_uuid)
Delete the project with the specified uuid from file.
sb_t_err sb_solution_get_version(const char *const solution_file, sb_t_version *version, char *const version_str, int size_version_str)
Gets the version of the solution file.
sb_t_err sb_solution_destroy_info(sb_t_solution_info **const solution)
Destroys the structure of the solution information.
sb_t_err sb_stat_from_res(sb_t_stat *const stat, const sb_t_res *const res)
Computes the sb_t_stat from sb_t_res.
sb_t_err sb_stat_destroy(sb_t_stat **const stat)
Destroys the sb_t_stat structure.
sb_t_err sb_stat_format(const sb_t_stat *const stat, char *const str, int str_size)
Formats the sb_t_stat structure.
sb_t_err sb_stat_reset(sb_t_stat *const stat, const sb_t_par *const par)
Resets the sb_t_stat structure.
sb_t_err sb_surface_model_to_gl(const sb_t_par *const par, const char *const model_name, unsigned char *const gl, unsigned char *const gl_opt)
Gets the model defects gray level for both required and optional model defects.
sb_t_tiling_mode
Enumerates the tiling mode.
#define SB_DEVICES_MAX_NUMBER
Maximum number of computational devices managed by the sb library.
sb_t_svl_command
Enumerates the actions that SVL has to do after a stop.
sb_t_err(* sb_fp_svl_pre_elaboration)(const SB_HANDLE image_info, void *const user_data, const char *const image_file, int image_index, sb_t_svl_pre_elaboration *const pre_elaboration)
Definition of the callback for image pre elaboration.
sb_t_perturbation_mode
Enumerates the mode of the perturbations.
sb_t_image_borders_extension_mode
Enumerate the image borders extension mode.
#define SB_PAR_FEATURES_NAMES_LEN
Maximum length, in byte, of the features names string.
sb_t_err sb_svl_stop_request(SB_HANDLE handle)
Sends a request to the SVL for stop.
sb_t_err sb_svl_destroy_res(sb_t_svl_res **const res)
Destroys the structure of the results of SVL.
const char * sb_perturbation_mode_format(sb_t_perturbation_mode mode)
Returns the string of the Deep Learning SVL image perturbation mode.
sb_t_svl_par_optimization_mode
Describes the optimization mode of SVL.
sb_t_err(* sb_fp_svl_progress)(void *const user_data, sb_t_svl_res *res, int force)
Definition of the callback for the working progress.
sb_t_network_freeze_mode
Deep learning network freeze mode.
sb_t_err sb_svl_save_pre_training(SB_HANDLE handle, const char *const file_name)
Saves the current SVL parameter configuration into a pre-training file.
sb_t_perturbation_type
Enumerates the range of application of the perturbations.
const char * sb_perturbation_type_format(sb_t_perturbation_type type)
Returns the string of the Deep Learning SVL image perturbation type.
const char * sb_network_freeze_mode_format(sb_t_network_freeze_mode freeze_mode)
Returns the string of the network freeze mode.
sb_t_err sb_svl_reset(SB_HANDLE handle)
Resets the history of previous executions of the SVL.
sb_t_loss_fn_type
Enumerates the loss functions.
sb_t_err(* sb_fp_svl_command)(void *const user_data, sb_t_svl_res *res, sb_t_svl_command *const command, const char *const msg)
Definition of the callback that the SVL calls when it needs to know how to continue.
const char * sb_loss_fn_type_format(sb_t_loss_fn_type type)
Returns the string of the loss function type.
const char * sb_feature_description(const char *const feature)
Returns a string with a brief description of a feature.
sb_t_network_type
Deep learning network types.
sb_t_err sb_pre_training_get_par(sb_t_par **const par, const char *const file_name)
Retrieves the project parameter structure of a pre-training file.
sb_t_err sb_svl_run(SB_HANDLE handle)
Runs the SVL.
const char * sb_svl_command_format(sb_t_svl_command command)
Returns the string of the SVL command.
const char * sb_network_type_format(sb_t_network_type type)
Returns the string of the network type.
sb_t_err sb_svl_get_res(SB_HANDLE handle, sb_t_svl_res **const res)
Retrieves the results of SVL.
const char * sb_image_borders_extension_mode_format(sb_t_image_borders_extension_mode mode)
Returns the string of the image borders extension mode.
sb_t_err sb_svl_clone_res(sb_t_svl_res **const dst, const sb_t_svl_res *const src)
Copies the structure of the results of SVL.
const char * sb_tiling_mode_format(sb_t_tiling_mode mode)
Returns the string of the tiling mode.
sb_t_svl_stop_reason
Enumerates the reasons why SVL is terminated or why the callback sb_t_svl_par::fp_command has been ca...
const char * sb_svl_par_optimization_mode_format(sb_t_svl_par_optimization_mode mode)
Returns the string of the SVL optimization mode.
@ SB_TILING_MODE_AUTO
Auto tiling.
@ SB_TILING_MODE_MANUAL
Manual tiling.
@ SB_SVL_COMMAND_CONTINUE_NO_RESET
The SVL continues without reset.
@ SB_SVL_COMMAND_NEXT_STEP
The SVL go to next step.
@ SB_SVL_COMMAND_STOP
The SVL stops and exits, applying the training to the module.
@ SB_SVL_COMMAND_CONTINUE
The SVL continues and, if necessary, resets the training.
@ SB_SVL_COMMAND_ABORT
The SVL stops and exits, without applying the training reached to the module.
@ SB_PERTURBATION_MODE_OFFLINE
Offline perturbation.
@ SB_PERTURBATION_MODE_ONLINE
Online perturbation.
@ SB_PERTURBATION_MODE_BOTH
Both online and offline perturbations.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_MIRRORING
Mirroring extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_BORDER_AVG_LOCAL
Last line local average extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_LAST
Last pixel extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_IMAGE_AVG
Image average extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_V_255
Grey extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_KERNEL_AVG
Local average extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_V_127
Grey extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_KERNEL_AVG_17x1
Horizontal local average extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_BORDER_AVG
Last line average extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_V_0
Zero extension mode.
@ SB_IMAGE_BORDERS_EXTENSION_MODE_NONE
Undefined extension mode.
@ SB_SVL_PAR_OPTIMIZATION_TIME_SLOW
@ SB_SVL_PAR_OPTIMIZATION_USE_SELECTED
@ SB_SVL_PAR_OPTIMIZATION_TIME_MEDIUM
@ SB_SVL_PAR_OPTIMIZATION_TIME_FAST
@ SB_NETWORK_FREEZE_MODE_ENCODER_DECODER
Freeze both encoder and decoder.
@ SB_NETWORK_FREEZE_MODE_FIRST_BLOCK
Freeze the first block of the newtork.
@ SB_NETWORK_FREEZE_MODE_NONE
Freeze mode disabled.
@ SB_NETWORK_FREEZE_MODE_ENCODER
Freeze the network encoder.
@ SB_PERTURBATION_TYPE_IMAGE
The whole image is perturbated.
@ SB_PERTURBATION_TYPE_BOTH
Both image and defects perturbation type.
@ SB_PERTURBATION_TYPE_DEFECTS
Only the defect area is perturbated.
@ SB_LOSS_FN_TYPE_BCE
SB Binary Cross Entropy loss.
@ SB_LOSS_FN_TYPE_CCE
Categorical Cross Entropy loss.
@ SB_LOSS_FN_TYPE_FOCAL
Focal loss.
@ SB_NETWORK_TYPE_SDINET0
Deep Learning Surface Defects Inspection Network 0 with variable input size.
@ SB_NETWORK_TYPE_ODNET0
Deep Learning Object Detection Network 0 with input size 416x416.
@ SB_NETWORK_TYPE_EFFICIENTNET_B1
Deep Learning EfficientNet b1.
@ SB_NETWORK_TYPE_EFFICIENTNET_B2
Deep Learning EfficientNet b2.
@ SB_NETWORK_TYPE_EFFICIENTNET_B0
Deep Learning EfficientNet b0.
@ SB_NETWORK_TYPE_ICNET0_128
Deep Learning Image Classification Network 0 with input size 128x128.
@ SB_NETWORK_TYPE_ICNET0_64
Deep Learning Image Classification Network 0 with input size 64x64.
@ SB_SVL_STOP_WARNING
Send a warning message.
@ SB_SVL_STOP_RESET_MANDATORY
Request for a mandatory reset of SVL.
@ SB_SVL_STOP_RESET_OPTIONAL
Ask for an optional reset of SVL.
@ SB_SVL_STOP_USER_REQUEST
The user has stopped the SVL.
@ SB_SVL_STOP_CONFLICT
There are errors which can not be eliminated.
@ SB_SVL_STOP_NONE
SVL finishes without errors.
@ SB_SVL_STOP_MEMORY
Insufficient memory to complete the SVL.
sb_t_err sb_xml_node_remove_itself(SB_HANDLE node)
Removes the current node.
sb_t_err sb_xml_node_count(SB_HANDLE parent, const char *const name, int *const cnt)
Gets the number of child nodes with the specified name.
sb_t_err sb_xml_node_set_attribute(SB_HANDLE node, const char *const attribute_name, const char *const content)
Sets the content of the attribute with the specified name.
SB_HANDLE sb_xml_node_add(SB_HANDLE parent, const char *const name, const char *const content)
Adds the node to the parent node.
SB_HANDLE sb_xml_node_get_child(SB_HANDLE parent)
Gets the first child of the node.
sb_t_err sb_xml_node_get_string_malloc(SB_HANDLE parent, const char *const name, char **const str)
Gets the content of the node with the specified name, allocating the string of the needed length.
SB_HANDLE sb_xml_node_next(SB_HANDLE node)
Gets the next sibling node.
sb_t_err sb_xml_node_get_attribute(SB_HANDLE node, const char *const attribute_name, char *const str, size_t str_size)
Gets the content of the attribute with the specified name.
sb_t_err sb_xml_node_get_name(SB_HANDLE node, char *const str, size_t str_size)
Gets the name of the current node.
SB_HANDLE sb_xml_node_previous(SB_HANDLE node)
Gets the previous sibling node.
sb_t_err sb_xml_node_remove(SB_HANDLE parent, const char *const name)
Removes the node with the specified name.
sb_t_err sb_xml_node_set_itself(SB_HANDLE node, const char *const content)
Sets the content of the node.
SB_HANDLE sb_xml_node_get(SB_HANDLE parent, const char *const name)
Gets the handle of the xml node with the specified name.
sb_t_err sb_xml_node_get_string(SB_HANDLE parent, const char *const name, char *const str, size_t str_size)
Gets the content of the node with the specified name.
sb_t_err sb_xml_node_set(SB_HANDLE parent, const char *const name, const char *const content)
Sets the content of the node with the specified name. The function checks if the node exists and othe...
Defines the color in the format BGRA.
unsigned char g
green component of color
unsigned char r
red component of color
unsigned char a
transparency of color
unsigned char b
blue component of color
Defines the parameters for blob analysis.
int verbosity
Verbosity level.
sb_t_range width
Range of weight, value in pixel.
int blob_contour
Set to 1 if you want the contour of each blob.
sb_t_range area
Range of area, value in pixel.
sb_t_range height
Range of height, value in pixel.
sb_t_blob_distance_mode blob_distance_mode
Selection of the algorithm for calculating the distance between blobs.
int keep_deleted
If different than 0, deleted blobs are kept in the list and marked as deleted.
sb_t_range merge_area
Range of area after merge, value in pixel. Used only if sb_t_blob_par::merge_distance is greater than...
int blob_min_rot_rect
For each blob it enables the calculation of the smaller rotated rectangle containing the blob.
int blob_rle
Set to 1 if you want the rle of each blob.
int merge_distance
Blobs with a distance inferior or equal to the value are merged together.
sb_t_range merge_width
Range of weight after merge, value in pixel. Used only if sb_t_blob_par::merge_distance is greater th...
sb_t_range merge_height
Range of height after merge, value in pixel. Used only if sb_t_blob_par::merge_distance is greater th...
sb_t_pixel_connection connection_type
Pixel connection type.
sb_t_point2d_f bar
blob barycenter.
float m_xy
Moment of inertia about the x and y axes.
sb_t_truth truth
Truth value of the blob computed by the blob analysis routine, otherwise SB_TRUTH_UNDEFINED.
int contour_size
Number of point of the blob contour, ie the number of elements of the array contour.
sb_t_point * contour
Pointer to the array of the points of the blob contour.
sb_t_rle rle
Pointer to RLE buffer.
float m_yy
Moment of inertia about the y axis.
sb_t_rect rect
Bounding box of the blob.
int od
Value not evaluated.
float angle
Rotation angle of the smaller rotated rectangle.
int area
Area of the blob, number of the pixel.
sb_t_blob_deleted deleted
Blob is marked as deleted.
float m_xx
Moment of inertia about the x axis.
Defines the information about the blob analysis.
long long time_export
blobs exporting time, in us.
int deleted_for_area_min
Number of blobs deleted for an area too small, both during analysis and during merging.
int deleted_for_width_max
Number of blobs deleted for a width too big, both during analysis and during merging.
int deleted_for_area_max
Number of blobs deleted for an area too big, both during analysis and during merging.
long long time_blob
time, in us, of the blobs extraction.
int merged
Number of blobs merged with another blob.
int deleted_for_height_min
Number of blobs deleted for an height too small, both during analysis and during merging.
long long time_rle
time, in us, of the rle extraction.
sb_t_range deleted_height
height range of the deleted blobs for a out-of-range height, both during analysis and during merging.
int deleted_for_height_max
Number of blobs deleted for an height too big, both during analysis and during merging.
long long time_sort
blobs sorting time, in us.
sb_t_range deleted_area
area range of the deleted blobs for a out-of-range area, both during analysis and during merging.
int deleted_for_width_min
Number of blobs deleted for a width too small, both during analysis and during merging.
long long time_contour
time, in us, of the blobs contour extraction.
sb_t_range deleted_width
width range of the deleted blobs for a out-of-range width, both during analysis and during merging.
int deleted
Number of blobs deleted, both during analysis and during merging.
long long time_merge
blobs merging time, in us.
long long time_total
total time, in us.
sb_t_blob * blob
Array of the blobs.
sb_t_blobs_info info
Information about the blob analysis.
sb_t_blobs_info info_gt
Information about the blob analysis of the ground truth areas.
int size
Number of blobs, ie number of elements of the array sb_t_blobs::blob .
Information about a computing device.
sb_t_memory_info memory
Memory information about the device and its process.
sb_t_frameworks frameworks
Compatible frameworks.
int available
Indicates if the device is available on the PC in use.
int id
Identifier of the device.
sb_t_device_type type
Device type.
List of computing devices available on the machine.
int size
Number of available devices.
sb_t_device_info * device
Array of devices.
Property of computational devices.
sb_t_device_type type
Device type.
sb_t_framework_type framework
Framework associated to the device.
char * info
Information string.
List of elaborated images.
int size
Number of the elaborated images.
sb_t_elaborated_image * imgs
Array of the elaborated images.
char * fname
Name of file excluded the path.
defines the list of the file in a folder.
int path_length
Number of characters of the path.
sb_t_file * file
Array of files.
int n
Number of elements of the array file.
int size
Number of available frameworks.
Image information details structure.
sb_t_image_info_type type
Type of the image.
sb_t_project_info project_info
Project information data.
Array of the image information details structure.
sb_t_image_info_detail * details
Array of sb_t_image_info_detail.
int bytes_per_pixel
Number of bytes of each pixel.
int width
Width, in pixel, of the image.
unsigned char * data
Pointer to the data.
unsigned char * free_data
sb_t_image_format format
Format of the image pixel.
int height
Height, in pixel, of the image.
sb_t_rle rle
Image rle data (valid in case the image compression type is SB_IMAGE_COMPRESS_RLE)
int size
Dimension, in bytes, of the vector sb_t_image::data .
int width_step
Number of bytes to move the pointer to one row to the next one.
sb_t_image_compress_type compression
Image compression type.
General information about sb library and computing devices like CPU and GPUs.
sb_t_devices_info devices
List of available computing devices.
sb_t_version version
Version of the sb library.
signed long long malloc_size
Current allocated memory, expressed in bytes, by sb the library.
int dl_modules_enabled
Value is different from 0 if Deep Learning modules are enabled.
signed long long malloc_size_max
Maximum allocated memory, expressed in bytes, by sb the library.
Defines the configurations of the license.
float speed_boost
Maximum detection speed boost allowed with the current license configuration.
int num_features
Maximum number of features allowed with the current license configuration.
int num_models
Maximum number of models allowed with the current license configuration.
sb_t_license_configuration_id id
License configuration identifier.
int num_threads
Maximum number of threads allowed with the current license configuration.
Defines all the attributes and properties of a license module.
int training
Training status.
signed long long time_start
Start date of the license.
sb_t_license_module_status status
The license status.
signed long long time_end
End date of the license.
sb_t_err err
The license error.
signed long long remain
Number of second before expiration.
sb_t_version version
Version of the module when the license was created.
sb_t_license_configuration configuration
License configuration.
sb_t_license_type type
License type of the module.
Defines the license and its properties.
signed long long time_modify
Last modification date.
signed long long time_save
Last save date.
signed long long time_create
Creation date.
Struct that defines the coordinates of a point of a lut.
unsigned short y
ordinate of the point.
unsigned short x
abscissa of the point.
signed long long system_free
system free physical memory, in bytes
signed long long proc_virtual_used
virtual memory used by process, in bytes
signed long long proc_physical_used
physical memory used by the process, in bytes
signed long long system_total
system physical memory, in bytes
signed long long system_used
system used physical memory, in bytes
signed long long proc_virtual_used_max
maximum virtual memory used by the process, in bytes
signed long long proc_virtual_max
maximum virtual memory usable by the process, in bytes
signed long long proc_physical_used_max
maximum physical memory used by the process, in bytes
Metrics calculated on counters.
float specificity
specificity
int lines
Number of the lines identified.
char * string
ocr result in string format
int words
Number of the words identified.
Information on what sb_project_set_par and sb_image_info_apply_par_changes do when they apply the new...
char * models
String of the name of the models to be invalidated.
sb_t_par par_cur
The current parameters of the project.
sb_t_par par_new
The new parameters that the user wants to set in the project.
int enabled
Enabling flag of the level.
int size
Number of levels that is number of elements of the array level.
Information about mapping between old and new models and levels in the sb_t_par structure.
int index
Index of the corresponding model, -1 if not present.
sb_t_par_perturbations perturbations
Perturbations of the samples.
sb_t_size obj_size
Model size.
int num_occurrences
Number of occurrences of the model that the function sb_project_get_res should export.
sb_t_size obj_stride_coarse
Coarse search step.
float defect_area_threshold
Threshold weight value for the bad area of the sample.
sb_t_rgba color_opt
Color of the optional defects.
sb_t_rgba color
Color of the defects.
float defect_area_percentage
Threshold percentage bad area of the sample to discard it as an occurrence.
sb_t_size obj_stride_fine
Fine search step.
int enabled
Enabling status of the model.
sb_t_par_levels levels
Array of levels parameters for this model.
sb_t_size obj_min_distance
Minimum distance between two samples.
Array of models parameters.
int size
Number of models that is number of elements of the array model.
Describes the perturbation of a sample.
sb_t_range angle_range
Angular range, in degrees, for random rotation.
int flip_vertical
Flip around vertical axis. 3th operation.
int angle
Rotation angle, in degrees, of the sample. 1th operation.
int flip_horizontal
Flip around horizontal axis. 2th operation.
int num_synthetic_samples
Number of synthetic sample to generated with a random angle in the range sb_t_par_perturbation::angle...
List of the perturbations of a sample.
int size
Number of used elements of the array perturbation.
Shallow Learning modules parameters.
float speed_boost
Detection speed boost.
int detection_out_of_roi
Allow the detection of occurrences at the extremities or partially outside the analysis roi.
int surface_blob_analysis
Enables the blob analysis.
sb_t_devices_par devices
Devices used for detection.
sb_t_par_sl sl
Shallow Learning modules parameters.
sb_t_par_models models
Models parameters.
int num_threads
Maximum number of OpenMP threads that detection can use.
sb_t_floating_point_op_type floating_point_precision
Floating Point precision used to run operations.
sb_t_svl_par svl
SVL parameters.
sb_t_project_type project_type
Project type.
sb_t_interpolation_mode resize_mode
Interpolation mode used to resize the images.
sb_t_rgba color_opt
Color of the optional defects for all models.
sb_t_blob_par blob_par
Surface blob analysis parameters.
Represents an ordered pair of float x and y coordinates that defines a point in a two-dimensional pla...
Represents an ordered pair of integer x and y coordinates that defines a point in a two-dimensional p...
int x
abscissa of the point
int y
ordinate of the point
Detection information structure.
sb_t_elaborated_images imgs
List of the elaborated tile images and the complete reconstructed image.
sb_t_par * par
Project parameters.
sb_t_project_type type
Project type.
Array of the projects info.
sb_t_project_info * info
Array of solution project information.
int size
Number of projects.
Represents an ordered pair of float minimum and maximum values that defines a range.
Represents an ordered pair of 32 bits signed integer minimum and maximum values that defines a range.
Defines the position and size of a rectangle in a two-dimensional plane.
int y
y coordinate of the upper left corner of the rectangle
int x
x coordinate of the upper left corner of the rectangle
int width
width of the rectangle
int height
height of the rectangle
Defines the results of a model.
sb_t_surface_res * surface
Surface model analysis result.
int out_of_roi
Count of Out Of ROI.
int disabled
Count of samples with model disabled.
int tp
Count of True Positive.
int on
Count of Optional Negative.
int fp
Count of False Positive.
int tn
Count of True Negative.
int op
Count of Optional Positive.
int fn
Count of False Negative.
Defines the results of the models.
int size
Number of element of the array sb_t_res_models::model.
sb_t_res_model * model
Array of the models result.
int is_valid
It is 1 when the fields of the structure are valid, otherwise it is 0.
sb_t_tiles_info * tiles
Information about the tiles used to process the image.
sb_t_samples samples
Samples found in the image.
long long time_us
Elaboration time of the image, in us.
sb_t_err err
Error of last image processing with sb_project_detection function .
sb_t_par par
Project parameters.
sb_t_ocr_res ocr
Result of OCR analysis.
sb_t_devices_par devices
The devices used to compute the current results.
sb_t_res_model global
Global results.
sb_t_version svl_version
Library version used to run the SVL with which the current results are obtained.
sb_t_res_models models
Models results.
Defines the color in the format RGBA.
unsigned char r
red component of color
unsigned char g
green component of color
unsigned char b
blue component of color
unsigned char a
transparency of color
int offset
Offset of the segment from the beginning of the uncompressed buffer, in bytes.
int x
x-coordinate of the beginning of the segment
int length
Length of the segment.
unsigned int value
Value of the segment.
int y
y-coordinate of the beginning of the segment
sb_t_rle_seg * seg
Pointer to RLE buffer.
int size
Number of elements of seg array.
sb_t_rect bounding_box
Bounding box of the roi (Not used for defects ROI)
sb_t_rgba color
Color RGBA of the roi (Not used for defects ROI)
sb_t_image * img
8bit BW image.
Image of weights of the sample.
float max
maximum weight corresponding, in the image, the to value 255.
sb_t_image * img
Image of the weights of the sample, format is SB_IMAGE_FORMAT_BW8.
float min
minimum weight corresponding, in the image, the to value 1.
sb_t_point centre_warp
Coordinates of the centre in the warped image.
sb_t_point centre
Coordinates of the centre of the sample.
void * user_data
Pointer to the user data.
float defect_area_percentage
sb_t_truth truth
Truth of the sample.
int user_data_size
Size, in bytes, of sb_t_sample::user_data buffer.
int is_near
FALSE NEGATIVE with some other sample close to it.
sb_t_sample_weights_image weights_image
Image of the weights of the sample.
sb_t_sample_classify_mode classify_mode
Classification mode.
sb_t_obj_type type
Sample type.
float weight
Weight of classification.
int size
Number of samples that is number of elements of the array sb_t_samples::sample .
sb_t_sample * sample
Pointer to the array of sample. The number of element is sb_t_samples::size .
Offsets to change scale ranges.
float height_min
Offset to apply on the minimum value of the height scale range.
float width_max
Offset to apply on the maximum value of the width scale range.
float width_min
Offset to apply on the minimum value of the width scale range.
float height_max
Offset to apply on the maximum value of the height scale range.
Represents an ordered pair of float x and y length that defines a rectangle in a two-dimensional plan...
Represents an ordered pair of integer x and y length that defines a rectangle in a two-dimensional pl...
sb_t_version version
Version of the solution.
sb_t_projects_info projects
Array of the projects info.
int current_project
Index of the current project in the projects array.
sb_t_range_flt fp_weight
Range of classification weight of the False Positive samples.
int fn
Count of False Negative.
int on
Count of Optional Negative.
int tp
Count of True Positive.
sb_t_range_flt op_weight
Range of classification weight of the Optional Positive samples.
sb_t_metrics metrics
Metrics.
sb_t_range_flt or_weight
Range of classification weight of the out of the ROI samples.
int op
Count of Optional Positive.
int mod_disabled
Count of samples with model disabled.
int fp
Count of False Positive.
sb_t_range_flt tp_weight
Range of classification weight of the True Positive samples.
sb_t_range_flt fn_weight
Range of classification weight of the False Negative samples.
sb_t_range_flt on_weight
Range of classification weight of the Optional Negative samples.
sb_t_range_flt tn_weight
Range of classification weight of the True Negative samples.
int out_of_roi
Count of Out Of ROI.
int tn
Count of True Negative.
int size
Number of models that is number of elements of the array model.
Statistics of the elaborations done with the function sb_project_detection .
long long time_res_us
Total sb_project_get_res time in microsecond. This time is included in the time_us.
int good
Counter of "Good" images.
long long time_us
Total analysis time in microsecond.
sb_t_metrics metrics
Metrics evaluated on images.
long long time_blob_us
Total blob analysis time in microsecond. This time is included in the time_us.
int no_good
Counter of "No Good" images.
long long time_us_average
Average analysis time in microsecond.
int elaborated
Count of the elaborated images.
sb_t_stat_model global
Global statistics.
int overkill
Counter of "Overkill" images.
sb_t_stat_models models
Array of the statistics of the models.
long long time_res_us_average
Average sb_project_get_res time in microsecond.
int escape
Counter of "Escape" images.
sb_t_par par
Project parameters.
long long time_blob_us_average
Average blob analysis time in microsecond.
Defines the result of the Surface analysis.
sb_t_point ul
Coordinates of the upper left corner.
sb_t_image * model
Model plane image.
sb_t_metrics pixel_metrics
Metrics calculated on predicted pixels.
sb_t_blobs * blobs
Defects blobs extracted.
sb_t_image * truth
Truth plane image.
sb_t_image * weight
Image of the voting plan.
sb_t_surface_image_truth image_truth
Truth of the image.
Deep Learning network parameters.
float features_multiplier
Features multiplier factor of the network.
sb_t_image_format image_format
Network input image format.
int n_channels
Network input channels.
sb_t_size input_size
Network input size.
sb_t_network_freeze_mode freeze_mode
Freeze mode to apply on network parameters.
sb_t_network_type type
Network type.
Describes the perturbation of the image / defect.
sb_t_range angle_range
Angular range, in degrees, for random rotation.
float shift_horizontal
Maximum shift along x-axis.
sb_t_perturbation_type type
Select the perturbation type.
int flip_horizontal
Flip around horizontal axis.
float stretch_contrast
Maximum variation for histogram stretching.
float shift_vertical
Maximum shift along y-axis.
sb_t_perturbation_mode mode
Select the perturbation mode.
int flip_vertical
Flip around vertical axis.
float delta_scale
Maximum variation for image scaling.
float delta_brightness
Maximum delta of brightness.
SVL parameters to configure the Deep Learning training.
int batch_size
Size of the batch used during SVL.
int save_best
At the end of the training, the best internal parameters configuration is recovered.
sb_t_svl_dl_tiling_par tiling_par_width
Width tiling configuration.
int load_pre_training_models
Load models parameters from pre-training file.
float learning_rate
Learning rate.
sb_t_svl_dl_par_network network
Network parameters.
int num_epochs
Number of epochs.
sb_t_image_borders_extension_mode borders_extension_mode
Image borders extension mode.
sb_t_loss_fn_type loss_fn
Loss function.
sb_t_svl_dl_par_perturbation perturbations
Perturbations for deep learning training.
sb_t_svl_dl_tiling_par tiling_par_height
Height tiling configuration.
float validation_percentage
Validation percentage.
int num_tiles
Number of horizontal and vertical tiles used to process the image.
sb_t_range_flt scale
Image scale.
sb_t_tiling_mode mode
Tiling mode to use for image processing.
Contains information regarding the error of the SVL.
sb_t_err err
Error code sb_t_err.
float dist
Distance, in pixel, between the samples.
float min_dist
Minimum allowed distance between samples.
int num_samples
Number of samples.
sb_fp_svl_progress fp_progress
The SVL calls this callback to notify the user the results of SVL.
int num_threads
Maximum number of OpenMP threads that SVL can use.
sb_t_svl_sl_par sl
Shallow Learning SVL parameters.
sb_fp_svl_pre_elaboration fp_pre_elaboration
Callback to execute an image pre elaboration.
float free_memory_percentage
Percentage of system memory that the svl tries to leave free.
sb_t_devices_par devices
Devices used for SVL/training.
sb_t_image_circularity_type image_circularity_type
Image circularity.
sb_fp_svl_command fp_command
Callback called by SVL to allow the user to decide how to continue when particular situations happen,...
void * user_data
Pointer to data which is passed to the callbacks.
sb_t_svl_dl_par dl
Deep Learning SVL parameters.
int reproducibility
Enable the reproducibility of the training.
Contains the results of the image pre-processing.
sb_t_image * image
Pre processed image, that is the warped image.
SB_HANDLE warped2ori
lut of the samples coordinates from warped image to the original one.
sb_t_roi * roi
Image elaboration ROI.
sb_t_roi * roi_defects
Image defects ROI.
Results of a training epoch.
sb_t_metrics validation_metrics
SVL validation metrics.
sb_t_metrics metrics
SVL metrics.
float validation_loss
SVL validation loss.
Results of the training epochs.
sb_t_svl_res_epoch * epoch
Array of the results of the training epochs.
int size
Number of the elements of the array epoch .
Defines the results of the elaboration of the SVL of an image.
sb_t_image_info_type type
Image type. The possible values are SB_IMAGE_INFO_TYPE_SVL, SB_IMAGE_INFO_TYPE_SVL_USED.
Defines the results of the elaboration of the SVL images.
int size
Number of images that is number of elements of the array sb_t_svl_res_images::image .
sb_t_svl_res_image * image
Pointer to the array of SVL images results. The number of element is sb_t_svl_res_images::size .
Results of the SVL of a level per model.
int num_img_l
Number of images of the training set used for learning.
long long num_pixels_defect_l
Number of ROI defects pixels from the training set effectively used for training.
long long num_pixels_defect_v
Number of ROI defects pixels from the training set effectively used for validation.
long long num_pixels_roi_l
Number of pixels from the training set effectively used for learning.
int num_samples_l
Number of samples of the training set used for learning.
int out_of_roi
Number of Out Of ROI samples, both optional and required.
int reset
1 if the SVL of the model has been resetted or when the user reset the SVL, 0 otherwise.
int mod_disabled
Number of samples with disabled model, both optional and required.
int op
Number of OPTIONAL POSITIVE samples.
sb_t_svl_par_optimization_mode optimization_mode
Optimization mode.
long long num_pixels_roi_u
Number of pixels from the training set not used neither for learning and validation.
sb_t_svl_res_epochs epochs
Results of training of module based on Deep Learning.
int num_tiles_u
Number of tiles from the training set not used neither for learning and validation.
float goodness
Goodness of the training.
int fn
Number of FALSE NEGATIVE samples.
int tn
Number of TRUE NEGATIVE samples.
int num_samples_t
Number of samples of the training set not used for learning.
long long num_pixels_defect_u
Number of ROI defects pixels from the training set not used neither for learning and validation.
int tp
Number of TRUE POSITIVE samples.
int num_tiles_l
Number of tiles from the training set used for learning.
int on
Number of OPTIONAL NEGATIVE samples.
int num_tiles_v
Number of tiles from the training set used for validation.
int fp
Number of FALSE POSITIVE samples.
long long num_pixels_roi_v
Number of pixels from the training set effectively used for validation.
char * warning
Warning in string format occurred during the training.
Results of the SVL of a levels processed.
int size
Number of the elements of the array level.
Results of the SVL of a specific model.
sb_t_svl_res_levels levels
Specific results for each level.
sb_t_svl_res_level global
Cumulative results of all levels.
Results of the SVL of a models processed.
int size
Number of the elements of the array model.
Defines the results of SVL.
sb_t_svl_res_models models
Results for each model.
sb_t_samples * list_op
List of Optional Positive samples.
int num_img_test
Number of test images of the project.
sb_t_samples * list_out_of_roi
List of samples out of the ROI.
sb_t_samples * list_on
List of Optional Negative samples.
sb_t_svl_res_images * list_img_elab
Results for each images.
sb_t_svl_err err
Error details.
sb_t_svl_res_level global
Cumulative results of all levels of all models.
sb_t_svl_command last_command
Command executed by SVL after a stop that is detailed with the parameter stop_reason.
sb_t_samples * list_tn
List of True Negative samples.
long long time_ms_last_improvement
Time, in ms, when there was the last improvement.
long long time_ms
Execution time, in ms, of SVL.
sb_t_par par
Project parameters.
int num_img_svl
Number of svl images of the project.
int reset_done
The SVL reset has been done or no training has been done yet.
sb_t_samples * list_tp
List of True Positive samples.
sb_t_svl_stop_reason stop_reason
It describes the reason why the SVL is finished.
long long time_left_ms
Estimated time, in ms, left to the end of the SVL.
sb_t_devices_par devices
The devices used to compute the current SVL results.
sb_t_samples * list_fn
List of False Negative samples.
char running_step[256]
Description of the current step of the training.
sb_t_samples * list_fp
List of False Positive samples.
SVL parameters that configure the Shallow Learning training.
int auto_levels
Enable the automatic Surface levels training.
sb_t_svl_par_optimization_mode optimization_mode
Optimization mode.
float goodness_target
Goodness target of the training.
sb_t_rect rect
Rectangle of the tile on the elaborated image.
sb_t_tile_type type
Tile type.
Information about the tiles used to process the image.
sb_t_tiles tiles
Tiles list.
sb_t_size_flt scale
Scale factor.
sb_t_size factor
Number of horizontal and vertical tiles used to process the image.
sb_t_tile * tile
Tiles array.
int size
Number of elements of the array sb_t_tiles::tile.
int vminor
vminor number, changes on internal improvement which doesn't modify the interface
int build_major
build_major number, changes every time the library is built
int minor
minor number, changes when the interface is no longer compatible
int major
major number, changes when there are new features