SqueezeBrains SDK 1.18
sb_t_svl_dl_tiling_par Struct Reference

Image tiling parameters. More...

#include <sb.h>

Collaboration diagram for sb_t_svl_dl_tiling_par:

Data Fields

sb_t_tiling_mode mode
 Tiling mode to use for image processing. More...
 
int num_tiles
 Number of horizontal and vertical tiles used to process the image. More...
 
sb_t_range_flt scale
 Image scale. More...
 

Detailed Description

Image tiling parameters.

Tiling parameters used to dermine the policy with which images will be tiled (divided) by sb_svl_run and sb_project_detection functions. It is possible to set different tiling parameter configuration horizontaly and vertically.

Definition at line 10964 of file sb.h.

Field Documentation

◆ mode

sb_t_tiling_mode sb_t_svl_dl_tiling_par::mode

Tiling mode to use for image processing.

"Tiling" refers to that image processing operation that consists in subdividing the elaborated image into multiple sub-images.
Used only by Deep Surface projects.

Default
Default value is SB_TILING_MODE_MANUAL .
Attention
Calling the function sb_project_set_par after a change of the parameter invalidates the training of all the models.
See also
sb_par_tiling_get_range
sb_image_info_get_tiles_svl
sb_tiles_info_no_overlap
sb_t_res::tiles
sb_t_svl_dl_tiling_par::scale
sb_t_svl_dl_tiling_par::num_tiles

Definition at line 10980 of file sb.h.

◆ num_tiles

int sb_t_svl_dl_tiling_par::num_tiles

Number of horizontal and vertical tiles used to process the image.

Used only by Deep Surface projects and if sb_t_svl_dl_tiling_par::mode is equal to SB_TILING_MODE_MANUAL.
Couple of values that determines a grid scheme used to subdivide, both horizontally and vertically, the original image into tile_factor.width * tile_factor.height tiled images. Each tile is processed by sb_svl_run and sb_project_detection function as a single image.
Applying a tile factor > {1, 1} is useful to increase the image resolution at the input of the elaboration algorithm, especially when the sb_t_svl_dl_par_network::input_size of the network is significantly lower than the resolution of the image. This may help to detect small defects instances and to have a more accurate segmentation at pixel levels.
On the other hand, the higher the number of tiles of the grid, the higher is the training and detection time and also the GPU memory usage of the detection.
Values range from SB_SVL_DL_NUM_TILES_MIN to SB_SVL_DL_NUM_TILES_MAX.
If it is necessary that the image is processed with a defined scale factor in order to guarantee a minimum defects, the tiling mode can be set to SB_TILING_MODE_AUTO in order to manually select the required scale.
Higher tile factor values on computational device with limited memory resources may cause SB_ERR_DL_CUDA_OUT_OF_MEMORY .

Tiling grid at different tile factor values
Note
To set the optimal tile factor, the user must take into account the minimum defect size and defect granularity required for the current vision task along each direction. A basic guideline is to use a tile factor that satisfies the following inequalities:

\[ tile\, factor_{i} >= ceil(\frac{image\, resolution_{i}}{(network\, input\, size - 32) * min\, defect\, size_{i}}) \quad \textrm{with} \quad i=x,y\]


Attention
Calling the function sb_project_set_par after a change of the tile factor invalidates the project training.
Default
Default value is {1, 1}, which means disabled.
See also
sb_image_info_get_tiles_svl
sb_tiles_info_no_overlap
sb_t_res::tiles
sb_t_svl_dl_tiling_par::mode

Definition at line 11009 of file sb.h.

◆ scale

sb_t_range_flt sb_t_svl_dl_tiling_par::scale

Image scale.

Range of scale to apply to the image when sb_t_svl_dl_tiling_par::mode parameter is equal to SB_TILING_MODE_AUTO. scale.max is used to compute the number of tiles used to divide the image. scale.min is used to determine how much increase the image resolution along a direction in order to maximaze the image area underlying of the tile.

Note
If scale.min = scale.max, it will be equivalent to setting the obsolete mode SB_TILING_MODE_AUTO_WITHOUT_IMAGE_EXT. Instead, if scale.min = SB_DL_SCALE_MIN, it will be similar to using the obsolete mode SB_TILING_MODE_AUTO_WITH_IMAGE_EXT (with the only difference that before scale.min was not bounded below to SB_DL_SCALE_MIN).

Definition at line 11020 of file sb.h.


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