Back to Adaptive Vision Library website

You are here: Start » Function Reference » Deep Learning » DeepLearning_DetectFeatures

DeepLearning_DetectFeatures


Header:AVL.h
Namespace:avl

Performs feature classification using trained deep-learning model.

Syntax

C++
C#
 
void avl::DeepLearning_DetectFeatures
(
	DeepLearningConnectionState& ioState,
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	const avl::DeepModel_FeatureDetection& inDeepModel,
	const bool inOverlap,
	atl::Array<avl::Image>& outHeatmaps,
	atl::Optional<avl::Image&> outFeature1 = atl::NIL,
	atl::Optional<avl::Image&> outFeature2 = atl::NIL,
	atl::Optional<avl::Image&> outFeature3 = atl::NIL,
	atl::Optional<avl::Image&> outFeature4 = atl::NIL
)

Parameters

Name Type Default Description
ioState DeepLearningConnectionState& Object used to maintain state of the function.
inImage const Image& Input image
inRoi Optional<const Region&> NIL Area of interest
inDeepModel const DeepModel_FeatureDetection& Trained model
inOverlap const bool True Add tiles overlapping to improve results quality
outHeatmaps Array<Image>& Returns heatmaps for all classes
outFeature1 Optional<Image&> NIL Returns heatmap for first feature class
outFeature2 Optional<Image&> NIL Returns heatmap for second feature class or empty image if class is not specified
outFeature3 Optional<Image&> NIL Returns heatmap for third feature class or empty image if class is not specified
outFeature4 Optional<Image&> NIL Returns heatmap for fourth feature class or empty image if class is not specified

Requirements

For input inImage only pixel formats are supported: 1⨯uint8, 3⨯uint8.

Read more about pixel formats in Image documentation.

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outHeatmaps, outFeature1, outFeature2, outFeature3, outFeature4.

Read more about Optional Outputs.

Hints

Loading Deep Learning Model may take longer timer. Consider using DeepLearning_LoadModel for pre-loading model before execution starts.

Remarks

  • Model provided on inDeepModel input will be loaded to service automatically on first usage of Deep Learning filters.
  • Service automatically releases and loads model into its memory. It may result in releasing model previously loaded using DeepLearning_LoadModel filter.
  • These filters only communicates with service and cannot be use for parallel computation.

Errors

List of possible exceptions:

Error type Description
DomainError Empty image in DeepLearning_DetectFeatures.
DomainError Empty ROI region in DeepLearning_DetectFeatures
DomainError Invalid DeepModel in DeepLearning_DetectFeatures.
DomainError Size of ROI differs from size of image in DeepLearning_DetectFeatures

See Also

  • Models for Deep Learning may be created using Adaptive Vision Deep Learning Editor or using Training Api.