Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

face_detection.hpp 1.4 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  1. #ifndef face_detection_hpp
  2. #define face_detection_hpp
  3. #include <string>
  4. #include <vector>
  5. #include <fstream>
  6. #include <eigen3/Eigen/Eigen>
  7. #include <opencv2/opencv.hpp>
  8. #include "data_transformer.hpp"
  9. #include "bounding_box.hpp"
  10. /**
  11. * @Const Value given by imageNet mean image
  12. */
  13. constexpr float red_channel_mean = 104.00698793;
  14. constexpr float green_channel_mean = 116.66876762;
  15. constexpr float blue_channel_mean = 122.67891434;
  16. /**
  17. * @Brief: face detection function using caffe network
  18. *
  19. * @Paper Reference: Implementation: Multi-view Face Detection using deep
  20. * convolutional neural networks
  21. *
  22. * @param cv::Mat& The original image passed
  23. * @param std::vector<BoundingBox>& The face regions in the image
  24. */
  25. void face_detection(const cv::Mat&, std::vector<BoundingBox>&);
  26. /**
  27. * @Brief: Change the input dim in the prototxt files
  28. *
  29. * @param int: The row dim
  30. * @param int: The col dim
  31. */
  32. void modify_prototxt(const int, const int);
  33. /**
  34. * @Brief: Change the caffe result into prototype bounding box
  35. *
  36. * @param Eigen::MatrixXf& Result from caffe output layer
  37. * @param float Threshold that judge the right area
  38. * @param std::vector<BoundingBox>& The returning bounding box
  39. */
  40. void add_to_boundingbox(const Eigen::MatrixXf&, const float,
  41. std::vector<BoundingBox>&);
  42. #endif /* face_detection_hpp */
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...