SqueezeBrains SDK 1.18
|
Project parameters. More...
#include <sb.h>
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... | |
sb_t_blob_par sb_t_par::blob_par |
Surface blob analysis parameters.
Used only by Surface and Deep Surface projects.
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:
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.
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.
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.
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.
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_NVIDIA .
It must be SB_FLOATING_POINT_OPS_TYPE_SINGLE_PRECISION .
sb_t_par_models sb_t_par::models |
Models parameters.
It has models.size of sb_t_par_model elements.
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.
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 degradation because of resolution loss.
sb_t_par_sl sb_t_par::sl |
int sb_t_par::surface_blob_analysis |
Enables the blob analysis.
Used only by Surface and Deep Surface projects.
sb_t_svl_par sb_t_par::svl |