![]() |
DeepSight SDK
3.0.0
DeepSight SDK - crowd face analysis
|
DeepSight SDK settings class. More...
Public Types | |
| enum | OperationMode : int { OperationMode::DEVELOPMENT, OperationMode::RELEASE_LIFETIME, OperationMode::RELEASE_SESSION } |
| The mode the SDK should operate when authenticating. More... | |
| enum | LogLevel : int { LogLevel::TRACE, LogLevel::DEBUG, LogLevel::INFO, LogLevel::WARN, LogLevel::ERR, LogLevel::CRITICAL } |
| The log-level that should internally be used by the SDK. More... | |
| enum | DnnTarget : int { DnnTarget::CPU, DnnTarget::GPU, DnnTarget::GPU_MT } |
| Target processor on which the SDK's neural networks should execute. More... | |
| enum | TrackerFps : int { TrackerFps::DYNAMIC, TrackerFps::FPS_30, TrackerFps::FPS_10, TrackerFps::FPS_5 } |
| Frame processing speed for which the face counting or people counting algorithm should be tuned. More... | |
| enum | Range : int { Range::REGULAR, Range::LONG } |
| Selector for switching the type of Face Detector to use. More... | |
| enum | NetworkType : int { NetworkType::NORMAL, NetworkType::QUANTIZED } |
| Selector for the type of network to use when performing analysis. The SDK offers two types of networks to use, normal or quantized networks. The normal networks are used for the best accuracy while the quantized networks are optimized faster execution. More... | |
Public Member Functions | |
| void | load (const std::string &filePath) |
| Loads an ini settings file into the ds::Settings instance. More... | |
| void | save (const std::string &filePath) |
| Saves the object's parameters into a DeepSight settings ini file. More... | |
| bool | operator!= (const Settings &settings) const |
Returns true if the this object is not equal to settings. Inequality is tested member-wise. | |
| bool | operator== (const Settings &settings) const |
Returns true if the this object is equal to settings. Equality is tested member-wise. | |
| bool | cpuTargetEnabled () const |
| Returns true if the dnnTarget value for this settings object is set to 'CPU'. | |
| bool | gpuTargetEnabled () const |
| Returns true if the dnnTarget value for this settings object is set to 'GPU' or 'GPU_MT'. | |
Public Attributes | |
| std::string | neuralNetworksPath = "" |
| Path of the directory containing the SDK neural network files. More... | |
| std::string | licenseKey = "" |
| License key used for authenticating the SDK. | |
| std::string | lifetimeAuthFile = "" |
| Path to file where the authorization for the lifetime release license is saved. More... | |
| OperationMode | operationMode = OperationMode::DEVELOPMENT |
| Operation mode the SDK should authenticate with. | |
| LogLevel | logLevel = LogLevel::INFO |
| Log-level the SDK should operate with. Accepted enum values are 'INFO', 'WARN', 'ERR', and 'CRITICAL'. 'TRACE' and 'DEBUG' are reserved for internal use. | |
| DnnTarget | dnnTarget = DnnTarget::CPU |
| Target processor on which the SDK's neural networks should execute. Accepted enum values are 'CPU', 'GPU', and 'GPU_MT'. More... | |
| TrackerFps | bodyTrackFps = TrackerFps::DYNAMIC |
| Tunes the people counting algorithm to the video input fps. Use ds::Settings::DYNAMIC for live feed input cameras and use ds::Settings::FPS_30 for video files (most commonly encoded at 30 fps). | |
| TrackerFps | faceTrackFps = TrackerFps::DYNAMIC |
| Tunes the face counting algorithm to the video input fps. Use ds::Settings::DYNAMIC for live feed input cameras and use ds::Settings::FPS_30 for video files (most commonly encoded at 30 fps). | |
| NetworkType | networkType = NetworkType::NORMAL |
| Selects the type of networks that the SDK should use. Accepted enum values are 'NORMAL' and 'QUANTIZED'. | |
| bool | useAge = true |
| Tells the SDK whether it should perform age estimation for each detected face. | |
| bool | useGender = true |
| Tells the SDK whether it should perform gender estimation for each detected face. | |
| bool | useHeadpose = true |
| Tells the SDK whether it should perform head pose estimation for each detected face. | |
| bool | useSmile = true |
| Tells the SDK whether it should perform smile estimation for each detected face. | |
| bool | useFaceMask = true |
| Tells the SDK whether it should perform face mask estimation for each detected face. | |
| bool | useEmotions = true |
| Tells the SDK whether it should perform emotion estimation for each detected face. | |
| float | faceConfidenceThreshold = 0.8f |
| Face confidence threshold. More... | |
| int | maxNumFaces = -1 |
| Controls the maximum number of faces that will be returned per frame after detection. A value of -1 (default) indicates no limit. | |
| int | minFaceSize = 0 |
Unless set to 0, faces smaller than this value will be discarded after detection. | |
| int | maxFaceSize = 0 |
Unless set to 0, faces bigger than this value will be discarded after detection. | |
| Range | detectionRange = Range::REGULAR |
| Selects the face detector to be used. More... | |
| int | numThreads = -1 |
| Controls the number of threads used to execute parallel computation regions, like inference. More... | |
DeepSight SDK settings class.
The ds::Settings class is a container for configuration parameters used during runtime. By changing the settings values it is possible to control the SDK behavior.
|
strong |
Target processor on which the SDK's neural networks should execute.
| Enumerator | |
|---|---|
| CPU | Uses the CPU for performing inference on the networks. |
| GPU | Uses the GPU for accelerating the inference on the networks. Refer to the OpenCL acceleration OpenCL section. |
| GPU_MT | Uses the GPU for accelerating the inference performed on the SDK's networks. Inference of the different networks will be performed in parallel. Refer to the OpenCL acceleration OpenCL section. |
|
strong |
|
strong |
Selector for the type of network to use when performing analysis. The SDK offers two types of networks to use, normal or quantized networks. The normal networks are used for the best accuracy while the quantized networks are optimized faster execution.
| Enumerator | |
|---|---|
| NORMAL | Use the default networks for optimal accuracy. |
| QUANTIZED | Use the quantized networks for higher performance. |
|
strong |
The mode the SDK should operate when authenticating.
The SDK license can operate in different modalities. This enumerations holds the modalities the SDK can use the license with.
| Enumerator | |
|---|---|
| DEVELOPMENT | Uses the license in development mode. |
| RELEASE_LIFETIME | Uses the license in lifetime release mode. |
| RELEASE_SESSION | Uses the license in session release mode. |
|
strong |
Selector for switching the type of Face Detector to use.
|
strong |
Frame processing speed for which the face counting or people counting algorithm should be tuned.
| void ds::Settings::load | ( | const std::string & | filePath | ) |
Loads an ini settings file into the ds::Settings instance.
| filePath | Path of a file storing DeepSight settings. |
Throws an std::runtime_error if the file cannot be loaded.
Example usage:
| void ds::Settings::save | ( | const std::string & | filePath | ) |
Saves the object's parameters into a DeepSight settings ini file.
| filePath | Path of a file where to store DeepSight settings. |
Throws an std::runtime_error if the file cannot be saved.
Example usage:
| ds::Settings::Range ds::Settings::detectionRange = Range::REGULAR |
Selects the face detector to be used.
Two face detector neural networks are available as part of the SDK. One is optimized for long range detection, the other for medium range.
| ds::Settings::DnnTarget ds::Settings::dnnTarget = DnnTarget::CPU |
Target processor on which the SDK's neural networks should execute. Accepted enum values are 'CPU', 'GPU', and 'GPU_MT'.
To enable GPU acceleration refer to OpenCL acceleration.
| float ds::Settings::faceConfidenceThreshold = 0.8f |
Face confidence threshold.
This threshold controls the confidence level the SDK returns faces with. Faces detected during ds::DeepSight::analyze and ds::DeepSight::analyzeSingleImage with a confidence lower than the specified faceConfidenceThreshold will be discarded. Valid values are in the range [0, 1].
| std::string ds::Settings::lifetimeAuthFile = "" |
Path to file where the authorization for the lifetime release license is saved.
Use in combination with ds::Settings::operationMode set to ds::Settings::OperationMode::RELEASE_LIFETIME.
Example:
| std::string ds::Settings::neuralNetworksPath = "" |
Path of the directory containing the SDK neural network files.
Failing to properly set this parameter causes the ds::DeepSight constructor to fail and throw an exception.
| int ds::Settings::numThreads = -1 |
Controls the number of threads used to execute parallel computation regions, like inference.
This parameter controls how much CPU is used on multicore systems. Set to -1 to use the system default. Setting this parameter to a value lower than the number of CPU cores will leave the remaining CPU cores available for other computation. Eg. On a 4-core setup, setting ds::Settings::numThreads to 2 will leave ~50% of CPU available for other processes.