MCPcopy Create free account
hub / github.com/ShiqiYu/libfacedetection / PriorBox

Method PriorBox

opencv_dnn/cpp/priorbox.cpp:3–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "priorbox.hpp"
2
3PriorBox::PriorBox(const cv::Size& input_shape,
4 const cv::Size& output_shape) {
5 // initialize
6 in_w = input_shape.width;
7 in_h = input_shape.height;
8 out_w = output_shape.width;
9 out_h = output_shape.height;
10
11 cv::Size feature_map_2nd = {
12 int(int((in_w+1)/2)/2), int(int((in_h+1)/2)/2)
13 };
14 cv::Size feature_map_3rd = {
15 int(feature_map_2nd.width/2), int(feature_map_2nd.height/2)
16 };
17 cv::Size feature_map_4th = {
18 int(feature_map_3rd.width/2), int(feature_map_3rd.height/2)
19 };
20 cv::Size feature_map_5th = {
21 int(feature_map_4th.width/2), int(feature_map_4th.height/2)
22 };
23 cv::Size feature_map_6th = {
24 int(feature_map_5th.width/2), int(feature_map_5th.height/2)
25 };
26
27 // feature_map_sizes.push_back(feature_map_2nd);
28 feature_map_sizes.push_back(feature_map_3rd);
29 feature_map_sizes.push_back(feature_map_4th);
30 feature_map_sizes.push_back(feature_map_5th);
31 feature_map_sizes.push_back(feature_map_6th);
32
33 priors = generate_priors();
34}
35
36PriorBox::~PriorBox() {}
37

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected