SqueezeBrains SDK 1.13
sb_t_par Struct Reference

Project parameters. More...

#include <sb.h>

Collaboration diagram for sb_t_par:

Data Fields

sb_t_project_type project_type
 Project type.
 
sb_t_par_models models
 Models parameters. More...
 
unsigned char collaborations [SB_PAR_MODELS_NUM][SB_PAR_MODELS_NUM]
 Collaboration matrix. More...
 
int num_threads
 Maximum number of OpenMP threads that detection can use. More...
 
sb_t_blob_par blob_par
 Surface blob analysis parameters. More...
 
sb_t_devices_par devices
 Devices used for detection. More...
 
sb_t_interpolation_mode resize_mode
 Interpolation mode used to resize the images. More...
 
sb_t_floating_point_op_type floating_point_precision
 Floating Point precision used to run operations. More...
 
sb_t_rgba color_opt
 Color of the optional defects for all models. More...
 
int surface_blob_analysis
 Enables the blob analysis. More...
 
sb_t_par_sl sl
 Shallow Learning modules parameters. More...
 
sb_t_svl_par svl
 SVL parameters. More...
 

Detailed Description

Project parameters.

See also
License configurations

Definition at line 10646 of file sb.h.

Field Documentation

◆ blob_par

sb_t_blob_par sb_t_par::blob_par

Surface blob analysis parameters.

Used only by Surface and Deep Surface projects.

Definition at line 10707 of file sb.h.

◆ collaborations

unsigned char sb_t_par::collaborations[SB_PAR_MODELS_NUM][SB_PAR_MODELS_NUM]

Collaboration matrix.

Two model i and j collaborate if the element [i,j]=1, otherwise they compete.
The collaboration matrix has the following properties:

  • [i,j] = [j,i]
  • [i,i] = 1

It is advisable to set two or more models as "collaborating" when they can be considered as different versions of the same model.
Collaborating models are processed by SVL in a way that the instances of model does not interfere with the training of the other models. Thus, differently from "not collaborating" models, their instances are not used as "background" to train the other model with which they collaborate. Moreover, as we can expect, disabling a model does not invalidate the training of its collaborating ones. However when a collaboration between two models is enabled for a pre-existing training, the training for these model will be invalidate (see sb_project_set_par ).
Collaboration models have also a great impact in the testing phase, because every occurrence of a model which is confused with its collaborating is classified as TRUE POSITIVE instead of FALSE POSITIVE. Indeed in such case, the detection of a model rather than on other is not to be considered as an error. An example in which collaborations could be used is for an OCR ("Optical Character Recognition") application. If we want to recognize same character with different fonts, it may be useful to set them as collaborating. Indeed they usually have slight differences of shape, but for the current detection task they can have the same output value.
An example of a project which uses collaborations is retina_wheels_collaborating inside the solution retina_wheels.zip in the Example Projects. In this project two models have been created: truck wheels and car wheels. Sometimes vans have wheels comparable in size to larger cars, and vice versa, as shown in the image below. So the two models have been set as collaborative.

Truck and car wheel models are collaborative

To set the collaborations with the SB GUI see Setting->Collaborations as shown in the image below.
In this example the models pairs model1-model3 and model2-model3 are collaborative, while the models pairs model1-model2 are not collaborative.

Collaborations window setting
Warning
Setting all models as collaborating in Deep Cortex project may cause unexpected results. Differently from the other project types, where there are always background instances to use during SVL, a Deep Cortex project not necessarly need images associated to no class. If this takes place, no image will be trained "negatively", i.e. forced to not be assigned to any model. The results is that, even SVL accuracy or validation accuracy is high, the algorithm is not properly trained.
See also
sb_project_set_par
sb_project_get_par_changes_info
sb_t_par_model::obj_size
Training or Test errors

Definition at line 10692 of file sb.h.

◆ color_opt

sb_t_rgba sb_t_par::color_opt

Color of the optional defects for all models.

The value it is not used by the SB library but only by the SB GUI to draw the optional defect.
Used only by Surface and Deep Surface projects.

See also
ROI management

Definition at line 10740 of file sb.h.

◆ devices

sb_t_devices_par sb_t_par::devices

Devices used for detection.

Used by the function sb_project_detection in case of Deep Cortex and Deep Surface projects. Currently only a single device is admitted.

Definition at line 10714 of file sb.h.

◆ floating_point_precision

sb_t_floating_point_op_type sb_t_par::floating_point_precision

Floating Point precision used to run operations.

The parameter is used by the sb_project_detection in case of Deep Surface projects.
Usually SB_FLOATING_POINT_OPS_TYPE_HALF_PRECISION, which runs operation on Float16 data, guarantees faster detection time than
SB_FLOATING_POINT_OPS_TYPE_SINGLE_PRECISION which runs on Float32 data.
SB_FLOATING_POINT_OPS_TYPE_HALF_PRECISION is supported only if device type is equal to SB_DEVICE_GPU .
It must be SB_FLOATING_POINT_OPS_TYPE_SINGLE_PRECISION .

Warning
Readable only.

Definition at line 10732 of file sb.h.

◆ models

sb_t_par_models sb_t_par::models

Models parameters.

It has models.size of sb_t_par_model elements.

Definition at line 10654 of file sb.h.

◆ num_threads

int sb_t_par::num_threads

Maximum number of OpenMP threads that detection can use.

The value 0 means: half of the available threads for physical machines and all available threads for virtual machines.

Default
The default value is 0.
See also
License configurations
Parallel computing

Definition at line 10701 of file sb.h.

◆ resize_mode

sb_t_interpolation_mode sb_t_par::resize_mode

Interpolation mode used to resize the images.

The parameter is used by the sb_project_detection function to resize the images.
SB_INTERPOLATION_MODE_NN mode guarantees faster detection time, but may cause a performance degratation because of resolution loss.

Definition at line 10721 of file sb.h.

◆ sl

sb_t_par_sl sb_t_par::sl

Shallow Learning modules parameters.

Parameters used only by Retina and Surface projects.

Definition at line 10757 of file sb.h.

◆ surface_blob_analysis

int sb_t_par::surface_blob_analysis

Enables the blob analysis.

Used only by Surface and Deep Surface projects.

Default
The default value is 0, not enabled.
Warning
The value of this parameter is ignored when the roi defects groundtruth is passed to the function sb_project_detection.
See also
sb_project_detection
sb_project_get_res

Definition at line 10751 of file sb.h.

◆ svl

sb_t_svl_par sb_t_par::svl

SVL parameters.

Parameters used by training.

Definition at line 10763 of file sb.h.


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