FisFilter_DL_DetectAnomalies2
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | DL_DA |
Executes a Detect Anomalies 2 model on a single input image.
Syntax
void fil::FisFilter_DL_DetectAnomalies2 ( const fil::Image& inImage, const fil::DetectAnomalies2ModelId& inModelId, const float inScoreScale, fil::Heatmap& outHeatmap, bool& outIsValid, float& outScore, bool& outIsConfident, float& outT1, float& outT2, ftl::Conditional<fil::Region>& outRoi )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | Input image | |||
inModelId | const DetectAnomalies2ModelId& | Identifier of a Detect Anomalies 2 model | |||
inScoreScale | const float | 0.5 - 1.5 | 1.0f | Scale factor for T1 and T2 (default value results in usage of T1 and T2 from model) | |
outHeatmap | Heatmap& | Returns a heatmap indicating found anomalies | |||
outIsValid | bool& | Returns true if no anomalies were found | |||
outScore | float& | Returns score of the image | |||
outIsConfident | bool& | Returns false if the score is between T1 and T2 | |||
outT1 | float& | Returns T1 'Good' threshold value | |||
outT2 | float& | Returns T2 'Bad' threshold value | |||
outRoi | Conditional<Region>& | ROI used in training |
Requirements
For input inImage only pixel formats are supported: 1⨯uint8, 3⨯uint8.
Read more about pixel formats in Image documentation.
Hints
- It is recommended that the deep learning model is deployed with DL_DetectAnomalies2_Deploy first and connected through the inModelId input.
- If one decides not to use DL_DetectAnomalies2_Deploy, then the model will be loaded in the first iteration. It will take up to several seconds.
Remarks
This filter should not be executed along with running Deep Learning Service as it may result in degraded performance or even out-of-memory errors.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inImage pixel format in FisFilter_DL_DetectAnomalies2. Supported formats: 1xUInt8, 3xUInt8. |
See Also
Models for Deep Learning may be created using FabImage Deep Learning Editor or using Training Api (C++ based API Training is available in 5.3 and older versions only).
For more information, see Machine Vision Guide.