Open wulungching opened 5 years ago
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Bazel version Exact command to reproduce
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Bazel version Exact command to reproduce
Sorry I forgot this, I used mobileNetV2 SSD of object_detection API.
Note that you have two more parameters in the config file that can help you out: base_anchor_height
, base_anchor_weight
(both with default of 1.0). _base_anchors_size
consists of these two.
If I'm not wrong, the fact that you have the same base_anchor_height
and base_anchor_width
would mean that the resulting anchors (with aspect_ratio=1) would be square.
For example, in your case, the resulting base_anchor_size
would be [1.0, 0.75], which relative to image of (450, 600) exactly means that the base anchor is square.
If you want to specify yourself anchor scale for each layer, then you shouldn't use ssd_anchor_generator (which sets scales linearly), use grid_anchor_generator instead.
Hi @netanel-s , Thanks for your reply. I have some confusions about config setting,
anchor_generator {
ssd_anchor_generator {
num_layers: 6
min_scale: 0.2
max_scale: 0.95
aspect_ratios: 1.0
aspect_ratios: 2.0
aspect_ratios: 0.5
aspect_ratios: 3.0
aspect_ratios: 0.3333
base_anchor_height: 1.0
base_anchor_width: 0.75
}
}
image_resizer {
fixed_shape_resizer {
height: 450
width: 600
}
}
If I set above config, would ssd_anchor_generator generate square anchor box (n pixels x n pixels) ? I am not sure how to set configuration of detector, if the above setting has mistakes please correct me. Thanks.
The function description of ssd_anchor_generator says:
base_anchor_size: base anchor size as [height, width]. The height and width values are normalized to the minimum dimension of the input height and width, so that when the base anchor height equals the base anchor width, the resulting anchor is square even if the input image is not square.
From this I guess the above config would not generate a squared base anchor.
System information
Describe the problem Default SSD_mobilenet_V2_config is below.
If I set image_resizer {width:600, height:450} (4:3 input size), would base_anchor_size be set square or rectangle? link
I trace the ssd_anchor_create func code, it seems to set rectangle-like base_anchor_size, right?
I want to ask how could I set specific size of anchor box for each layer? How to check details of anchor bboxes after training model? Thanks a lot