NVIDIA DeepStream SDK API Reference

6.4 Release
cvcore::gazenet::GazeNet Class Reference

Detailed Description

Interface for loading and running GazeNet.

Definition at line 148 of file GazeNet.h.

Public Member Functions

 GazeNet ()=delete
 Default constructor is deleted. More...
 
 GazeNet (const ImagePreProcessingParams &preProcessorParams, const ModelInputParams &modelInputParams, const ModelInferenceParams &inferenceParams)
 Constructor of GazeNet. More...
 
 ~GazeNet ()
 Destructor of GazeNet. More...
 
void setLandmarksMeanAndVariance (const Array< Vector2f > &landmarksMean, const Array< Vector2f > &landmarksStd)
 Set the mean and standard deviation of the landmarks for the model. More...
 
void execute (Array< ArrayN< float, GazeNet::OUTPUT_SIZE >> &outputGaze, const Tensor< NHWC, C3, U8 > &inputImage, const Array< BBox > &inputBBox, const Array< ArrayN< Vector2f, GazeNetPreProcessor::NUM_LANDMARKS >> &inputLandmarks, FeatureType type=FeatureType::FACEGRID, cudaStream_t stream=0)
 Main interface to run inference. More...
 

Static Public Attributes

static constexpr size_t OUTPUT_SIZE = 5
 Number of elements in network output. More...
 
static constexpr size_t FACEGRID_WIDTH = 25
 Width of facegrid. More...
 
static constexpr size_t FACEGRID_HEIGHT = 25
 Height of facegrid. More...
 
static constexpr size_t LANDMARKS_EYE_LEFT_BEGIN = 42
 Starting index of left eye region. More...
 
static constexpr size_t LANDMARKS_EYE_LEFT_END = 48
 End index of left eye region. More...
 
static constexpr size_t LANDMARKS_EYE_RIGHT_BEGIN = 36
 Starting index of right eye region. More...
 
static constexpr size_t LANDMARKS_EYE_RIGHT_END = 42
 End index of right eye region. More...
 

Constructor & Destructor Documentation

◆ GazeNet() [1/2]

cvcore::gazenet::GazeNet::GazeNet ( )
delete

Default constructor is deleted.

◆ GazeNet() [2/2]

cvcore::gazenet::GazeNet::GazeNet ( const ImagePreProcessingParams preProcessorParams,
const ModelInputParams modelInputParams,
const ModelInferenceParams inferenceParams 
)

Constructor of GazeNet.

Parameters
preProcessorParamscustom pre-processor params.
modelInputParamscustom model input params for the network.
inferenceParamscustom inference params for the network.

◆ ~GazeNet()

cvcore::gazenet::GazeNet::~GazeNet ( )

Destructor of GazeNet.

Member Function Documentation

◆ execute()

void cvcore::gazenet::GazeNet::execute ( Array< ArrayN< float, GazeNet::OUTPUT_SIZE >> &  outputGaze,
const Tensor< NHWC, C3, U8 > &  inputImage,
const Array< BBox > &  inputBBox,
const Array< ArrayN< Vector2f, GazeNetPreProcessor::NUM_LANDMARKS >> &  inputLandmarks,
FeatureType  type = FeatureType::FACEGRID,
cudaStream_t  stream = 0 
)

Main interface to run inference.

Parameters
outputGazeoutput gaze results.
inputImageinput RGB/BGR interleaved image.
inputBBoxinput Bounding box for face region.
inputLandmarksinput landmarks coordinates of the face.
typewhether to use facegrid model or landmarks model.
streamcuda stream.

◆ setLandmarksMeanAndVariance()

void cvcore::gazenet::GazeNet::setLandmarksMeanAndVariance ( const Array< Vector2f > &  landmarksMean,
const Array< Vector2f > &  landmarksStd 
)

Set the mean and standard deviation of the landmarks for the model.

Parameters
landmarksMeanmean of the landmarks.
landmarksStdstandard deviation of the landmarks.

Field Documentation

◆ FACEGRID_HEIGHT

constexpr size_t cvcore::gazenet::GazeNet::FACEGRID_HEIGHT = 25
staticconstexpr

Height of facegrid.

Definition at line 164 of file GazeNet.h.

◆ FACEGRID_WIDTH

constexpr size_t cvcore::gazenet::GazeNet::FACEGRID_WIDTH = 25
staticconstexpr

Width of facegrid.

Definition at line 159 of file GazeNet.h.

◆ LANDMARKS_EYE_LEFT_BEGIN

constexpr size_t cvcore::gazenet::GazeNet::LANDMARKS_EYE_LEFT_BEGIN = 42
staticconstexpr

Starting index of left eye region.

Definition at line 169 of file GazeNet.h.

◆ LANDMARKS_EYE_LEFT_END

constexpr size_t cvcore::gazenet::GazeNet::LANDMARKS_EYE_LEFT_END = 48
staticconstexpr

End index of left eye region.

Definition at line 174 of file GazeNet.h.

◆ LANDMARKS_EYE_RIGHT_BEGIN

constexpr size_t cvcore::gazenet::GazeNet::LANDMARKS_EYE_RIGHT_BEGIN = 36
staticconstexpr

Starting index of right eye region.

Definition at line 179 of file GazeNet.h.

◆ LANDMARKS_EYE_RIGHT_END

constexpr size_t cvcore::gazenet::GazeNet::LANDMARKS_EYE_RIGHT_END = 42
staticconstexpr

End index of right eye region.

Definition at line 184 of file GazeNet.h.

◆ OUTPUT_SIZE

constexpr size_t cvcore::gazenet::GazeNet::OUTPUT_SIZE = 5
staticconstexpr

Number of elements in network output.

Definition at line 154 of file GazeNet.h.


The documentation for this class was generated from the following file: