apply_dl_classifier — Infer the class affiliations for a set of images using a
apply_dl_classifier is obsolete and is only provided for
reasons of backward compatibility. New applications should use the
general CNN-based operator
apply_dl_classifier applies the deep-learning-based classifier given
DLClassifierHandle on the set of input images
stored in the input object tuple
Images. It returns the results
in the result handle
DLClassifierResultHandle. For information
how to retrieve the corresponding results stored in
DLClassifierResultHandle, please refer to the documentation of the
Images can contain an arbitrary number of images to be
processed in one operator call and is generally independent of the
classifier parameter 'batch_size'. Please notice that this only
apply_dl_classifier and not for
train_dl_classifier_batch. This is because
apply_dl_classifier always classifies a batch with up to
'batch_size' images simultaneously, whether filled up or not.
So in case the number of images in the set
Images is larger than
apply_dl_classifier iterates over the
necessary number of batches internally. For a
with less than 'batch_size' images, it is padded to a full batch
which means that the runtime of processing for a given batch is independent
of whether it is filled up or just consists of a single image. Additionally,
if fewer images than 'batch_size' are classified in
one operator call, the network still requires the same amount of memory
as for a full batch. Therefore, it is recommended to adapt the
'batch_size' according to the number of images to be processed in
one operator call for greater efficiency. The current value of
'batch_size' can be retrieved using
Note that the images must be processed before feeding them into the
apply_dl_classifier in order to have the correct size,
gray value range, number of channels and type. We would like to stress
the image type: the images must be of type 'real'.
For a possibly necessary conversion the operator
provides great guidance on how to implement such a preprocessing stage.
For an explanation of the concept of deep-learning-based classification see the introduction of chapter Deep Learning / Classification. The workflow involving this legacy operator is described in the chapter Legacy / DL Classification.
To run this operator, cuDNN and cuBLAS are required when 'runtime'
is set to 'gpu', see
For further details, please refer to the
paragraph “Requirements for Deep Learning”.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Tuple of input images.
Handle of the deep-learning-based classifier.
Handle of the deep learning classification results.
If the parameters are valid, the operator
apply_dl_classifier returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
Deep Learning Inference