![]() |
IDS peak comfortC
v1.4.0
|
Data Structures | |
| struct | peak_inference_result_detection |
| The inference detection result. More... | |
| struct | peak_inference_result_classification |
| The inference classification result. More... | |
| struct | peak_inference_result_data |
| The peak inference result. More... | |
| struct | peak_inference_info |
| The peak information struct for CNN details. More... | |
Typedefs | |
| typedef struct peak_inference * | peak_inference_handle |
| The handle to identify an inference instance. | |
| typedef struct peak_inference_result * | peak_inference_result_handle |
| The handle to identify an inference result. | |
Enumerations | |
| enum | peak_inference_type { PEAK_INFERENCE_TYPE_INVALID, PEAK_INFERENCE_TYPE_DETECTION, PEAK_INFERENCE_TYPE_CLASSIFICATION } |
| peak inference types More... | |
| enum | peak_inference_preprocessing_mode { PEAK_INFERENCE_PREPROCESSING_MODE_INVALID, PEAK_INFERENCE_PREPROCESSING_MODE_CAFFE, PEAK_INFERENCE_PREPROCESSING_MODE_TENSORFLOW } |
| peak inference preprocessing modes. More... | |
Functions | |
| peak_status | peak_Inference_CNN_Open (const char *path, peak_inference_handle *hInference) |
| Loads a cnn file from the filesystem and returns a handle to the inference instance. More... | |
| peak_status | peak_Inference_CNN_Close (peak_inference_handle hInference) |
| Unloads a cnn instance. More... | |
| peak_status | peak_Inference_CNN_ProcessFrame (peak_inference_handle hInference, peak_frame_handle hFrame, peak_inference_result_handle *hInferenceHandle) |
| Runs an image through a cnn and returns the inference result. This call is blocking and returns once the inference is finished processing. More... | |
| peak_status | peak_Inference_CNN_Info_Get (peak_inference_handle hInference, peak_inference_info *info) |
| Gets detailed info about the loaded CNN. More... | |
| peak_status | peak_Inference_Result_Get (peak_inference_result_handle hInferenceHandle, peak_inference_result_data *result) |
| Get the result from a previous inference call. More... | |
| peak_status | peak_Inference_Result_Release (peak_inference_result_handle hInferenceHandle) |
| Releases a inference result that was previously received from peak_Inference_CNN_ProcessFrame. More... | |
| peak_status | peak_Inference_Result_Classification_GetList (peak_inference_result_handle hInferenceHandle, peak_inference_result_classification *resultList, size_t *resultCount) |
| Get the result entries from a given classification inference result handle. More... | |
| peak_status | peak_Inference_Result_Detection_GetList (peak_inference_result_handle hInferenceHandle, peak_inference_result_detection *resultList, size_t *resultCount) |
| Get the result entries from a given detection inference result handle. More... | |
| peak_status | peak_Inference_Statistics_Get (peak_inference_handle hInference, peak_inference_statistics *statistics) |
| Gets the inference statistics. More... | |
| peak_status | peak_Inference_Statistics_Reset (peak_inference_handle hInference) |
| Resets the inference statistics. More... | |
| peak_status | peak_Inference_ConfidenceThreshold_Get (peak_inference_handle hInference, uint32_t *threshold) |
| Gets the confidence threshold of the inference. More... | |
| peak_status | peak_Inference_ConfidenceThreshold_GetRange (peak_inference_handle hInference, uint32_t *minThreshold, uint32_t *maxThreshold, uint32_t *incThreshold) |
| Gets the allowed range for setting the confidence threshold. More... | |
| peak_status | peak_Inference_ConfidenceThreshold_Set (peak_inference_handle hInference, uint32_t threshold) |
| Sets the confidence threshold for the inference. Lower thresholds include more results. More... | |
Definitions on inference types and values.
peak inference preprocessing modes.
| enum peak_inference_type |
peak inference types
The inference type specifies the CNN model.
| peak_status peak_Inference_CNN_Close | ( | peak_inference_handle | hInference | ) |
Unloads a cnn instance.
| [in] | hInference | Handle to an inference instance. |
hInference is an invalid handle. | peak_status peak_Inference_CNN_Info_Get | ( | peak_inference_handle | hInference, |
| peak_inference_info * | info | ||
| ) |
Gets detailed info about the loaded CNN.
| [in] | hInference | Handle to an inference instance. |
| [out] | info | Detailed info about the CNN. |
hInference is an invalid handle. info is an invalid pointer. | peak_status peak_Inference_CNN_Open | ( | const char * | path, |
| peak_inference_handle * | hInference | ||
| ) |
Loads a cnn file from the filesystem and returns a handle to the inference instance.
| [in] | path | Path to the cnn file UTF-8 encoded. |
| [out] | hInference | Handle to the newly created inference instance. |
path or hInference is an invalid pointer. | peak_status peak_Inference_CNN_ProcessFrame | ( | peak_inference_handle | hInference, |
| peak_frame_handle | hFrame, | ||
| peak_inference_result_handle * | hInferenceHandle | ||
| ) |
Runs an image through a cnn and returns the inference result. This call is blocking and returns once the inference is finished processing.
| [in] | hInference | Handle to an inference instance. |
| [in] | hFrame | Handle to a frame. |
| [out] | hInferenceHandle | Handle to an inference result. |
resultHandle is an invalid pointer. hInference or hFrame is an invalid handle. | peak_status peak_Inference_ConfidenceThreshold_Get | ( | peak_inference_handle | hInference, |
| uint32_t * | threshold | ||
| ) |
Gets the confidence threshold of the inference.
| [in] | hInference | Handle to an inference instance. |
| [out] | threshold | Confidence threshold of the inference. |
hInference is an invalid handle. threshold is an invalid pointer. | peak_status peak_Inference_ConfidenceThreshold_GetRange | ( | peak_inference_handle | hInference, |
| uint32_t * | minThreshold, | ||
| uint32_t * | maxThreshold, | ||
| uint32_t * | incThreshold | ||
| ) |
Gets the allowed range for setting the confidence threshold.
| [in] | hInference | Handle to an inference instance. |
| [out] | minThreshold | Minimum value of allowed confidence threshold. |
| [out] | maxThreshold | Maximum value of allowed confidence threshold. |
| [out] | incThreshold | Increment of the confidence threshold. |
hInference is an invalid handle. minThreshold, or maxThreshold, or incThreshold is an invalid pointer. | peak_status peak_Inference_ConfidenceThreshold_Set | ( | peak_inference_handle | hInference, |
| uint32_t | threshold | ||
| ) |
Sets the confidence threshold for the inference. Lower thresholds include more results.
| [in] | hInference | Handle to an inference instance. |
| [in] | threshold | Confidence threshold to set. |
hInference is an invalid handle. | peak_status peak_Inference_Result_Classification_GetList | ( | peak_inference_result_handle | hInferenceHandle, |
| peak_inference_result_classification * | resultList, | ||
| size_t * | resultCount | ||
| ) |
Get the result entries from a given classification inference result handle.
Provides the current list of result entries for classification
This function implements the Two Staged Data Query principle.
| [in] | hInferenceHandle | Handle to an inference result. |
| [out] | resultList | Pointer to a user allocated array buffer to receive the result entry list. If this parameter is NULL, resultCount will contain the current number of result entries. The required size for resultList in bytes is resultCount x sizeof(peak_inference_result_classification) |
| [in,out] | resultCount |
|
resultCount is an invalid pointer. resultHandle is an invalid handle. resultList is not NULL and the value of *resultCount is too small to receive the expected amount of data. | peak_status peak_Inference_Result_Detection_GetList | ( | peak_inference_result_handle | hInferenceHandle, |
| peak_inference_result_detection * | resultList, | ||
| size_t * | resultCount | ||
| ) |
Get the result entries from a given detection inference result handle.
Provides the current list of result entries for detection
This function implements the Two Staged Data Query principle.
| [in] | hInferenceHandle | Handle to an inference result. |
| [out] | resultList | Pointer to a user allocated array buffer to receive the result entry list. If this parameter is NULL, resultCount will contain the current number of result entries. The required size for resultList in bytes is resultCount x sizeof(peak_inference_result_detection) |
| [in,out] | resultCount |
|
resultCount is an invalid pointer. resultHandle is an invalid handle. resultList is not NULL and the value of *resultCount is too small to receive the expected amount of data. | peak_status peak_Inference_Result_Get | ( | peak_inference_result_handle | hInferenceHandle, |
| peak_inference_result_data * | result | ||
| ) |
Get the result from a previous inference call.
| [in] | hInferenceHandle | Handle to an inference result. |
| [out] | result | Inference result. |
result is an invalid pointer. resultHandle is an invalid handle. | peak_status peak_Inference_Result_Release | ( | peak_inference_result_handle | hInferenceHandle | ) |
Releases a inference result that was previously received from peak_Inference_CNN_ProcessFrame.
| [in] | hInferenceHandle | Handle to an inference result. |
resultHandle is an invalid handle. | peak_status peak_Inference_Statistics_Get | ( | peak_inference_handle | hInference, |
| peak_inference_statistics * | statistics | ||
| ) |
Gets the inference statistics.
| [in] | hInference | Handle to an inference instance. |
| [out] | stats | Inference statistics for the given hInference. |
hInference is an invalid handle. statistics is an invalid pointer. | peak_status peak_Inference_Statistics_Reset | ( | peak_inference_handle | hInference | ) |
Resets the inference statistics.
| [in] | hInference | Handle to an inference instance. |
hInference is an invalid handle.