36 {
37 height_ = in_dims[0].
d[1];
38 width_ = in_dims[0].
d[2];
39
40 for (int i = 0; i < 4; ++i) {
41 bbox_mean_[i] = bbox_reg_param.bbox_mean(i);
42 bbox_std_[i] = bbox_reg_param.bbox_std(i);
43 }
44
45 GenAnchorParameter gen_anchor_param =
46 detection_output_ssd_param.gen_anchor_param();
47 num_anchor_per_point_ = std::min(gen_anchor_param.anchor_width().size(),
48 gen_anchor_param.anchor_height().size());
49 anchor_heights_ = new float[num_anchor_per_point_]();
50 anchor_widths_ = new float[num_anchor_per_point_]();
51 for (int i = 0; i < num_anchor_per_point_; ++i) {
52 anchor_heights_[i] = gen_anchor_param.anchor_height(i);
53 anchor_widths_[i] = gen_anchor_param.anchor_width(i);
54 }
55
56 heat_map_a_ = detection_output_ssd_param.heat_map_a();
57
58 min_size_mode_ =
59 static_cast<int>(detection_output_ssd_param.min_size_mode());
60 min_size_h_ = detection_output_ssd_param.min_size_h();
61 min_size_w_ = detection_output_ssd_param.min_size_w();
62
63 threshold_objectness_ = detection_output_ssd_param.threshold_objectness();
64 refine_out_of_map_bbox_ =
65 detection_output_ssd_param.refine_out_of_map_bbox();
66
67 NMSSSDParameter nms_param = detection_output_ssd_param.nms_param();
68 max_candidate_n_ = nms_param.max_candidate_n(0);
69 overlap_ratio_ = nms_param.overlap_ratio(0);
70 top_n_ = nms_param.top_n(0);
71 }