AvsFilter_DL_DetectFeatures_Deploy


Header: AVL.h
Namespace: avl
Module: DL_DF

Loads a deep learning model and prepares its execution on a specific target device.

Syntax

void avl::AvsFilter_DL_DetectFeatures_Deploy
(
	const avl::DetectFeaturesModelDirectory& inModelDirectory,
	const atl::Optional<avl::DeviceKind::Type>& inDeviceType,
	const int inDeviceIndex,
	const atl::Optional<avl::Size>& inInputSizeHint,
	avl::DetectFeaturesModelId& outModelId
)

Parameters

Name Type Range Default Description
Input value inModelDirectory const DetectFeaturesModelDirectory& A Detect Features model stored in a specific disk directory
Input value inDeviceType const Optional<DeviceKind::Type>& NIL A type of a device selected for deploying and executing the model. If not set, device depending on version (CPU/GPU) of installed Deep Learning add-on is selected. If not set, device depending on version (CPU/GPU) of installed Deep Learning add-on is selected.
Input value inDeviceIndex const int 0 - 0 An index of a device selected for deploying and executing the model.
Input value inInputSizeHint const Optional<Size>& NIL Prepares the model for an execution with a given maximum input size (image size or a size of a roi bounding box) in advance
Output value outModelId DetectFeaturesModelId& Identifier of the deployed model

Hints

  • In most cases, this filter should be placed in the INITIALIZE section.
  • Executing this filter may take several seconds.
  • This filter should be connected to AvsFilter_DL_DetectFeatures through the ModelId ports.
  • You can edit the model directly through the inModelDirectory. Another option is to use the Deep Learning Editor application and just copy the path to the created model.
  • inInputSizeHint should be set to the maximum expected size of analysed area (in following AvsFilter_DL_DetectFeatures filters, using deployed model), which is an image size or a bounding box of a roi. By default (if this input is set to NIL), a size of one of the training image is used (please note, that it does not take roi into account). Following this guideline should ensure an optimal memory usage and no performance hit on first call to AvsFilter_DL_DetectFeatures.

Remarks

  • Passing NIL as inTargetDevice (which is default), is identical to passing DeviceKind::CUDA on GPU version of Deep Learning add-on and DeviceKind::CPU on CPU version on Deep Learning add-on.
  • GPU version of Deep Learning add-on supports DeviceKind::CUDA and DeviceKind::CPU as inTargetDevice value.
  • CPU version of Deep Learning add-on supports only DeviceKind::CPU as inTargetDevice value.

See Also