DeepSight SDK  3.0.0
DeepSight SDK - crowd face analysis
ds_settings.h
Go to the documentation of this file.
1 /*
2  * DeepSight face analysis SDK
3  * Copyright (C) 2013-2023 Raydiant Inc. - All Rights Reserved
4  *
5  * This file is subject to the terms and conditions defined in
6  * the 'LICENSE.txt' file, which is part of this source code package.
7  *
8  */
9 
10 #ifndef DS_SETTINGS_H
11 #define DS_SETTINGS_H
12 
13 #include "ds_exports.h"
14 
15 #include <string>
16 
17 namespace ds {
18 
20 {
21 public:
22  enum class OperationMode: int { DEVELOPMENT, RELEASE_LIFETIME, RELEASE_SESSION };
23  enum class LogLevel: int { TRACE, DEBUG, INFO, WARN, ERR, CRITICAL };
24  enum class DnnTarget: int { CPU, GPU, GPU_MT };
25  enum class TrackerFps: int { DYNAMIC, FPS_30, FPS_10, FPS_5 };
26  enum class Range : int { REGULAR, LONG };
27  enum class NetworkType : int { NORMAL, QUANTIZED };
28 
29  void load( const std::string & filePath );
30  void save( const std::string & filePath );
31 
32  bool operator != ( const Settings & settings ) const;
33  bool operator == ( const Settings & settings ) const;
34 
35  bool cpuTargetEnabled() const;
36  bool gpuTargetEnabled() const;
37 
38 public:
39  std::string neuralNetworksPath = "";
40  std::string licenseKey = "";
41  std::string lifetimeAuthFile = "";
42 
43  OperationMode operationMode = OperationMode::DEVELOPMENT;
44  LogLevel logLevel = LogLevel::INFO;
45  DnnTarget dnnTarget = DnnTarget::CPU;
46  TrackerFps bodyTrackFps = TrackerFps::DYNAMIC;
47  TrackerFps faceTrackFps = TrackerFps::DYNAMIC;
48  NetworkType networkType = NetworkType::NORMAL;
49 
50  bool useAge = true;
51  bool useGender = true;
52  bool useHeadpose = true;
53  bool useSmile = true;
54  bool useFaceMask = true;
55  bool useEmotions = true;
56 
57  float faceConfidenceThreshold = 0.8f;
58 
59  int maxNumFaces = -1;
60  int minFaceSize = 0;
61  int maxFaceSize = 0;
62  Range detectionRange = Range::REGULAR;
63 
64  int numThreads = -1;
65 };
66 } /* namespace ds */
67 
68 #endif /* DS_SETTINGS_H */
ds::Settings::DnnTarget
DnnTarget
Target processor on which the SDK's neural networks should execute.
Definition: ds_settings.h:24
DS_API
#define DS_API
Controls the importing of the SDK symbols.
ds::Settings::LogLevel
LogLevel
The log-level that should internally be used by the SDK.
Definition: ds_settings.h:23
ds::Settings
DeepSight SDK settings class.
Definition: ds_settings.h:19
ds::Settings::NetworkType
NetworkType
Selector for the type of network to use when performing analysis. The SDK offers two types of network...
Definition: ds_settings.h:27
ds::Settings::Range
Range
Selector for switching the type of Face Detector to use.
Definition: ds_settings.h:26
ds::Settings::TrackerFps
TrackerFps
Frame processing speed for which the face counting or people counting algorithm should be tuned.
Definition: ds_settings.h:25
ds::Settings::OperationMode
OperationMode
The mode the SDK should operate when authenticating.
Definition: ds_settings.h:22
ds_exports.h