age-gender-detection.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "base-detection.h"
7 
8 
9 namespace openvino_helpers
10 {
11  /*
12  Detects age and gender for a give face
13  */
15  {
16  public:
17  struct Result
18  {
19  float age;
20  float maleProb;
21  };
22 
23  private:
24  std::string input;
25  std::string outputAge;
26  std::string outputGender;
28 
29  public:
30  age_gender_detection( const std::string &pathToModel,
31  bool isAsync = true,
32  int maxBatch = 1, bool isBatchDynamic = false,
33  bool doRawOutputMessages = false );
34 
35  InferenceEngine::CNNNetwork read_network() override;
36  void submit_request() override;
37 
38  void enqueue( const cv::Mat &face );
39  Result operator[] ( int idx ) const;
40  };
41 }
age_gender_detection(const std::string &pathToModel, bool isAsync=true, int maxBatch=1, bool isBatchDynamic=false, bool doRawOutputMessages=false)
InferenceEngine::CNNNetwork read_network() override
std::array< float3, 4 > face
Definition: model-views.h:450


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:41:41