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

age_estimation.hpp 1.1 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
  1. #ifndef age_estimation_hpp
  2. #define age_estimation_hpp
  3. #include <vector>
  4. #include <opencv2/opencv.hpp>
  5. #include "tool_box.hpp"
  6. /**
  7. * @Brief: The age estimation module using trained caffe
  8. *
  9. * @Paper Reference: Age and Gender Classification using Convolutional
  10. * Neural Networks (CVPR 2015)
  11. *
  12. * This function can also be merged with gender estimation for efficient.
  13. * However, it is better to seperate them since the user may use just
  14. * single one, in other word, either gender estimation or age estimation
  15. *
  16. */
  17. enum class Age
  18. {
  19. R0_2, R4_6, R8_13, R15_20, R25_32, R38_43, R48_53, R60_, Error
  20. };
  21. /**
  22. * Using static to solve the linking error
  23. */
  24. static std::map<Age, std::string> age_list
  25. {
  26. {Age::R0_2, "0~2 years old"},
  27. {Age::R4_6, "4~6 years old"},
  28. {Age::R8_13, "8~13 years old"},
  29. {Age::R15_20, "15~20 years old"},
  30. {Age::R25_32, "25~32 years old"},
  31. {Age::R38_43, "38~43 years old"},
  32. {Age::R48_53, "48~53 years old"},
  33. {Age::R60_, "60+ years old"},
  34. {Age::Error, "Error"}
  35. };
  36. std::vector<Age> age_estimation(const cv::Mat& Image, const std::vector<BoundingBox>& face_rois);
  37. #endif /* age_estimation_hpp */
Tip!

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

Comments

Loading...