SSD_param - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
Release Date
3.5 English
model_type : SSD
ssd_param :
    num_classes : 4
    nms_threshold : 0.4
    conf_threshold : 0.0
    conf_threshold : 0.6
    conf_threshold : 0.4
    conf_threshold : 0.3
    keep_top_k : 200
    top_k : 400
    prior_box_param {
    layer_width : 60,
    layer_height: 45,
    variances: 0.1
    variances: 0.1
    variances: 0.2
    variances: 0.2
    min_sizes: 21.0
    max_sizes: 45.0
    aspect_ratios: 2.0
    offset: 0.5
    step_width: 8.0
    step_height: 8.0
    flip: true
    clip: false

The SSD parameters are listed in the following table. The parameters of the SSD-model include the threshold and PriorBox requirements. Refer to the SSD deploy.prototxt file for more information.

Table 1. SSD Model Parameters
Parameter Type Description
num_classes The actual number of detection categories for this model.
anchorCnt The number of anchors for this model.
conf_threshold The threshold of the boxes’ confidence. Each category can have a different threshold, but number must be equal to num_classes.
nms_threshold The threshold of NMS.
biases These parameters are same as the model parameters. Write each bias in a separate line. (Biases amount) = anchorCnt * (output-node amount) * 2. Set correct lines in the prototxt.
test_mAP If your model was trained with letterbox and you want to test its mAP, set this as TRUE. By default, it is set to FALSE for faster execution.
keep_top_k Each category of detection objects’ top K boxes.
top_k All the detection object’s top K boxes, except the background (the first category)
prior_box_param There is more than one PriorBox corresponding to different scales. You can find them in the original model (deploy.prototxt) These PriorBoxes should oppose each other.
Table 2. PriorBox Parameters
Parameter Type Description
layer_width/layer_height The input width/height of this layer. Such numbers can be computed from the net structure.
variances These numbers are used for boxes regression. These should be filled as in the original model. There should be four variances.
min_sizes/max_size Filled as the deploy.prototxt. Write each number on a separate line.
aspect_ratios The ratio (each one should be written in a separate line). By default, the first ratio is 1.0. If you set a new number here, there will be two ratios created. One of the numbers is the value that you have set, and the other number is the reciprocal of the value that you have set. For example, this parameter has only one set element, “ratios: 2.0.” The ratio vector has three numbers: 1.0, 2.0, and 0.5.
offset Normally, the PriorBox is created by each central point of the feature map, so that the offset is 0.5.
step_width/step_height Copy from the original file. If there are no such numbers there, you can use the following formula to compute them:
step_width = img_width ÷ layer_width
step_height = img_height ÷ layer_height
offset Normally, PriorBox is created by each central point of the feature map, so that the offset is 0.5.
flip Control whether to rotate the PriorBox and change the ratio of length/width.
clip Set as FALSE. If set to TRUE, the detection box coordinates will be [0, 1].