WaitNet module creates a WaitNet handle ( dwWaitNetHandle_t
) that is owned by the application and must be released by the application when it's not needed anymore.
dwWaitNetParams
records the specs of the WaitNet model to be loaded and initialized. These parameters determine which precision, optimized processor, and specific network model to be loaded. dwWaitNetModel
defines specific network model to use. To initialize WaitNet parameters with default values:
To initialize a pointer to WaitNet handle with the designated values of dwWaitNetParams
call:
An example code snippet to initialize a WaitNet module with a customized FP32 WaitNet model that is optimized to perform inference on GPU:
Note that dwWaitNet_initDefaultParams()
set waitnetParams.networkPrecision
to the default values of DW_PRECISION_FP32. And it is assuming that the network file "waitnet.dnn" is already present in data/resources sub-directory.
With the provided APIs, you can get the input and output blob dimension that the initialized WaitNet expects:
or retrieve the pointer to the label of the provided class index:
To release the WaitNet module at the end of the application: