Skip to main content

MclassControl

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Control a classifier context, dataset context, class definition, data preparation context, training context, training result buffer, or prediction result buffer.

Syntax

void MclassControl(
AIL_ID ContextOrResultClassId, //out
AIL_INT64 LabelOrIndex, //in
AIL_INT64 ControlType, //in
AIL_DOUBLE ControlValue //in
)

Description

This function allows you to control a setting of a classifier context (or a class definition therein), a dataset context (or a class definition therein), a data preparation context (for image data), a training context, a training result buffer, or a prediction result buffer. You can typically inquire these settings, using MclassInquire. These settings can affect the execution of MclassPrepareData, MclassTrain, or MclassPredict.

Parameters

ContextOrResultClassId (out, AIL_ID)

Specifies the identifier of a context or result buffer to control. Set this parameter to one of the following values.

For specifying the context or result buffer

ValueDescription
ContextClassifierIdSpecifies the identifier of a predefined CNN, predefined object detection, predefined segmentation, predefined anomaly detection, tree ensemble, or ONNX classifier context. These contexts must have been previously allocated on the required system using MclassAlloc with M_CLASSIFIER_CNN_PREDEFINED, M_CLASSIFIER_DET_PREDEFINED, M_CLASSIFIER_SEG_PREDEFINED, M_CLASSIFIER_ANO_PREDEFINED, M_CLASSIFIER_TREE_ENSEMBLE, or M_CLASSIFIER_ONNX.
ContextDataPreparationIdSpecifies the identifier of a data preparation context (for image data). This context must have been previously allocated on the required system using MclassAlloc with M_PREPARE_IMAGES_CNN, M_PREPARE_IMAGES_DET or M_PREPARE_IMAGES_SEG.
ContextDatasetIdSpecifies the identifier of an images or features dataset context. These contexts must have been previously allocated on the required system using MclassAlloc with M_DATASET_IMAGES or M_DATASET_FEATURES.
ContextTrainIdSpecifies the identifier of a CNN, object detection, segmentation, anomaly detection, or tree ensemble training context. These contexts must have been previously allocated on the required system using MclassAlloc with M_TRAIN_CNN, M_TRAIN_DET, M_TRAIN_SEG, M_TRAIN_ANO, or M_TRAIN_TREE_ENSEMBLE.
ResultPredictIdSpecifies the identifier of a CNN, object detection, segmentation, anomaly detection, tree ensemble, or ONNX prediction result buffer. These buffers must have been previously allocated on the required system using MclassAllocResult with M_PREDICT_CNN_RESULT, M_PREDICT_DET_RESULT, M_PREDICT_SEG_RESULT, M_PREDICT_ANO_RESULT, M_PREDICT_TREE_ENSEMBLE_RESULT, or M_PREDICT_ONNX_RESULT.
ResultTrainIdSpecifies the identifier of a CNN, object detection, segmentation, anomaly detection, or tree ensemble training result buffer. These buffers must have been previously allocated on the required system using MclassAllocResult with M_TRAIN_CNN_RESULT, M_TRAIN_DET_RESULT, M_TRAIN_SEG_RESULT, M_TRAIN_ANO_RESULT, or M_TRAIN_TREE_ENSEMBLE_RESULT.

LabelOrIndex (in, AIL_INT64)

Specifies what to control. Set this parameter to one of the following values.

For specifying what to control

ValueDescription
M_DEFAULT
M_AUTHOR_INDEXSpecifies to control an author in a dataset context.
M_CLASS_INDEXSpecifies to control a class definition in a classifier context or a dataset context.
M_CONTEXT (default)Specifies to control a global setting of a classifier context, dataset context, or data preparation context (for image data).
M_DEFAULT_SOURCE_LAYERSpecifies to control the input (initial) layer of the classifier in a classification context (for example, the source layer of the ONNX classifier). In this case, you must set the ContextOrResultClassId parameter to the identifier of a predefined CNN, object detection, segmentation, anomaly detection, or an ONNX classifier.
M_GENERALSpecifies to control a general setting of a classification result buffer.

ControlType (in, AIL_INT64)

Specifies the type of control to set.

ControlValue (in, AIL_DOUBLE)

Specifies the required value for the control.

Parameter Associations

For a classifier context (segmentation or ONNX)

To control a global setting of a predefined segmentation or ONNX classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined segmentation or ONNX classifier context, and set the LabelOrIndex parameter to M_CONTEXT.


M_TARGET_IMAGE_SIZE_X

Sets the X-size of the target image with which to call MclassPredict, when using CSNet (M_CSNET_...) predefined segmentation classifiers, FCNet (M_FCNET_...) predefined legacy classifiers, or M_CLASSIFIER_ONNX ONNX classifiers. By default, Aurora Imaging Library assumes the target image size is the same as the default source layer size, which you can retrieve, using MclassInquire with M_SIZE_X and M_SIZE_Y. M_TARGET_IMAGE_SIZE_X and M_TARGET_IMAGE_SIZE_Y must both be set to M_DEFAULT (or 0), or they must both be greater than 0. For CSNets, any target image size is allowed. Typically, cropping is the only valid method for predicting on different sized images. Resized images should not be used for prediction unless your classifier was trained using similarly resized images. For legacy FCNet classifiers, the increment by which you can increase the dimensions of the target image depends on the size of the classifier's source layer and step. The following calculations indicate how to establish these dimensions: - [M_TARGET_IMAGE_SIZE_X](../../Reference/class/MclassControl.md) = [M_SIZE_X](../../Reference/class/MclassInquire.md) + _m_ * [M_STEP_X](../../Reference/class/MclassInquire.md), where m is an integer that is greater than or equal to 0. - [M_TARGET_IMAGE_SIZE_Y](../../Reference/class/MclassControl.md) = [M_SIZE_Y](../../Reference/class/MclassInquire.md) + _n_ * [M_STEP_Y](../../Reference/class/MclassInquire.md), where n is an integer that is greater than or equal to 0. For ONNX classifiers, M_TARGET_IMAGE_SIZE_X must be set to a value greater than 0 if the X-size of the network is defined by the target image X-size; that is, if inquiring M_SIZE_X returns M_DEFINED_BY_TARGET_IMAGE_SIZE_X. Otherwise, M_TARGET_IMAGE_SIZE_X must be set to 0 (M_DEFAULT).

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 0. By default, Aurora Imaging Library assumes the target image size is the same as the default source layer size.
Value >= 0Specifies the X-size.

M_TARGET_IMAGE_SIZE_Y

Sets the Y-size of the target image with which to call MclassPredict, when using CSNet (M_CSNET_...) predefined segmentation classifiers, FCNet (M_FCNET_...) predefined legacy classifiers, or M_CLASSIFIER_ONNX ONNX classifiers. By default, Aurora Imaging Library assumes the target image size is the same as the default source layer size, which you can retrieve, using MclassInquire with M_SIZE_X and M_SIZE_Y. M_TARGET_IMAGE_SIZE_X and M_TARGET_IMAGE_SIZE_Y must both be set to M_DEFAULT (or 0), or they must both be greater than 0. For CSNets, any target image size is allowed. Typically, cropping is the only valid method for predicting on different sized images. Resized images should not be used for prediction unless your classifier was trained using similarly resized images. For legacy FCNet classifiers, the increment by which you can increase the dimensions of the target image depends on the size of the classifier's source layer and step. The following calculations indicate how to establish these dimensions: - [M_TARGET_IMAGE_SIZE_X](../../Reference/class/MclassControl.md) = [M_SIZE_X](../../Reference/class/MclassInquire.md) + _m_ * [M_STEP_X](../../Reference/class/MclassInquire.md), where m is an integer that is greater than or equal to 0. - [M_TARGET_IMAGE_SIZE_Y](../../Reference/class/MclassControl.md) = [M_SIZE_Y](../../Reference/class/MclassInquire.md) + _n_ * [M_STEP_Y](../../Reference/class/MclassInquire.md), where n is an integer that is greater than or equal to 0. For ONNX classifiers, M_TARGET_IMAGE_SIZE_Y must be set to a value greater than 0 if the Y-size of the network is defined by the target image Y-size; that is, if inquiring M_SIZE_Y returns M_DEFINED_BY_TARGET_IMAGE_SIZE_Y. Otherwise, M_TARGET_IMAGE_SIZE_Y must be set to 0 (M_DEFAULT).

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 0. By default, Aurora Imaging Library assumes the target image size is the same as the default source layer size.
Value >= 0Specifies the Y-size.

For a classifier context (ONNX)

To control a global setting of an ONNX classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of an ONNX classifier context, and set the LabelOrIndex parameter to M_CONTEXT.


M_TARGET_IMAGE_SIZE_BAND

Sets the number of bands of the target image with which to call MclassPredict. M_TARGET_IMAGE_SIZE_BAND must be set to a value greater than 0 if the number of input bands of the network is defined by the target image; that is, if inquiring M_SIZE_BAND returns M_DEFINED_BY_TARGET_IMAGE_SIZE_BAND. Otherwise, M_TARGET_IMAGE_SIZE_BAND must be set to 0 (M_DEFAULT).

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 0. By default, Aurora Imaging Library assumes the number of bands of the target image is the same as the number of bands of the default source layer.
Value >= 0Specifies the number of bands.

For a classifier context (object detection)

To control a global setting of a predefined object detection classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined object detection classifier context, and set the LabelOrIndex parameter to M_CONTEXT.


M_NMS_IOU_THRESHOLD

Sets the intersection over union (IOU) threshold value used by the non-maximum suppression (NMS) algorithm to determine if a given box proposal is already covered by an existing box proposal. Aurora Imaging Library proposes many overlapping boxes that must be filtered. Of the two overlapping proposals, the one with the lowest detection score will be discarded. The higher the IOU threshold value, the more similarity is required between the boxes before one is discarded.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the IOU threshold.

M_NMS_POST_K

Sets the maximum number of detections to keep after applying the non-maximum suppression (NMS) algorithm to the detection results specified by M_NMS_TOP_K. The rest of the detections will be discarded. Note, this must be less than or equal to the top K number of detection results (M_NMS_TOP_K).

ValueDescription
M_DEFAULT
Value > 0 (default)Specifies the number of detections to keep.

M_NMS_TOP_K

Sets the top K number of detection results (in terms of score) that will have the non-maximum suppression (NMS) algorithm applied. A lower value reduces the computation complexity of the algorithm. Note, this must be greater than or equal to the maximum number of detections to keep after applying the NMS algorithm (M_NMS_POST_K).

ValueDescription
M_DEFAULT
Value > 0 (default)Specifies the number of top detection results.

For a classifier context (object detection or anomaly detection)

To control a global setting of a predefined object detection classifier context or a predefined anomaly detection classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined object detection classifier context or a predefined anomaly detection, and set the LabelOrIndex parameter to M_CONTEXT.


M_SCORE_THRESHOLD

Sets the minimum score threshold for a successful detection result. For object detection, only scores above this threshold are kept. For anomaly detection, images or pixels above this score are considered anomalous.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the score threshold.

For a classifier context (CNN, object detection, segmentation, or anomaly detection)

To control a global setting of a classifier context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of a predefined CNN, predefined object detection, predefined segmentation, or predefined anomaly detection classifier context, and set the LabelOrIndex parameter to M_CONTEXT.


M_PREDICT_ENGINE

Sets the predict engine to use during MclassPredict. You can get predict engine information by callingMclassInquire with M_PREDICT_ENGINE_.... This setting does not apply to statistics classification contexts. You must have installed the appropriate Aurora Imaging Library add-ons and updates to perform GPU accelerated prediction using CUDA or OpenVINO.

ValueDescription
M_DEFAULTSpecifies the default predict engine that was set using the Aurora Imaging Configurator utility.
0 <= Value < M_NUMBER_OF_PREDICT_ENGINESSpecifies the index of the predict engine to use. To inquire a description of the predict engine associated with an index, call MclassInquire with M_PREDICT_ENGINE_DESCRIPTION.

For a dataset context (images)

To control a global setting of a dataset context, the ControlType and corresponding ControlValue parameter settings can be set to the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a dataset context. Unless otherwise specified, the following values apply to an images dataset context and you should set the LabelOrIndex parameter to M_CONTEXT.


M_STOP_PREPARE

Stops the current execution of MclassPrepareData on a dataset. This can only be done from another thread of higher priority, or from a user-defined classification hook function. If you stop the data preparation, MclassPrepareData does not return any images in its destination folder. Aurora Imaging Library appliesM_STOP_PREPARE on the destination dataset specified with MclassPrepareData. M_STOP_PREPARE does not apply when you call MclassPrepareData with images.

ValueDescription
M_DEFAULTSpecifies the default behavior.

For a dataset context (images or features)

To control a global setting of a dataset context, the ControlType and corresponding ControlValue parameter settings can be set to the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a dataset context. Unless otherwise specified, the following values apply to an images or features dataset context and you should set the LabelOrIndex parameter to M_CONTEXT.


M_ACTIVE_AUTHOR_INDEX

Sets the author that is automatically added to labeling operations performed on a dataset context. Aurora Imaging Library uses the current user unless you specify a different one.

ValueDescription
M_DEFAULT
M_AUTHOR_INDEXSpecifies the index identifying the author that is automatically defined for each dataset entry. You can only specify the index of an existing author. Use M_AUTHOR_ADD to add a new author.
M_CURRENT_USER (default)Specifies the system's current username as the author that is automatically defined for each dataset entry. If the system's current user name does not exist in the dataset, it is added at the end. Note that, in this case, authors are considered the same if their respective names are the same (regardless of their index).

M_ACTIVE_AUTHOR_UPDATE

Sets the behavior of the entry's author after a modification was performed on the entry. When disabled, changing an entry will never change its author's name.

ValueDescription
M_DEFAULT
M_DISABLESpecifies to keep the existing author's information.
M_ENABLE (default)Specifies that when an entry's information (an entry's region information) is modified, its author is automatically modified according to M_ACTIVE_AUTHOR_INDEX.

M_ANOMALY_DETECTION_FOLDER

Sets the path at which to save the anomaly detection scores. When working with relative paths, you must set the anomaly detection folder to be under the root path.

ValueDescription
"///DATASET///"Specifies the folder path from where the dataset context is restored, using MclassRestore. If this path does not exist, Aurora Imaging Library uses the path in which your application's executable file is located.
"SegmentationFilePath"Specifies the anomaly detection file path. For example, you can specify the root path as, AIL_TEXT("E:\Manual\AnomalyDetection\Good").

M_AUTHOR_ADD

Adds a new author to a dataset context, according to the specified name. Added authors are given an index and a key (UUID). Once you add an author, you can refer to it in a dataset's entries.

ValueDescription
"NewAuthorName"Specifies the name of the author to add.

M_AUTHOR_DELETE

Deletes authors from a dataset context, according to the specified index.

ValueDescription
M_DEFAULT
M_AUTHOR_INDEXSpecifies the authors to delete from the dataset context. Note that you cannot delete the active author specified with M_ACTIVE_AUTHOR_INDEX.
M_ALL (default)Specifies to delete all explicitly added authors. The active author (M_ACTIVE_AUTHOR_INDEX) is not deleted.

M_AUTHOR_DELETE_BY_KEY

Deletes an author from a dataset context, according to the specified key (UUID).

ValueDescription
AIL_UUID ValueSpecifies the key of the author to delete. The key is defined as an Aurora Imaging Library universal unique identifier (UUID). To specify an AIL_UUID value when using a C compiler, you must call the AIL_UUID version of this function (MclassControlAilUuid). When using a C++ or other compiler, MclassControl internally calls the AIL_UUID version of this function.

M_AUTHOR_NAME

Sets the name of an author in the dataset context. You must set the LabelOrIndex parameter to M_AUTHOR_INDEX().

ValueDescription
"AuthorName"Specifies the name of an author. This name replaces the current author's name.

M_CONSOLIDATE_ENTRIES_INTO_FOLDER

Copies and reorganizes a dataset according to a specified destination directory. The structure of the directory follows the same one as MclassExport without the icons and CSV files. In general, this means that within the destination folder, images of the dataset will be copied to the Images folder by class. If the dataset holds segmentation data, mask regions will be copied in the Masks folder and segmentation scores will be copied in the Segmentation folder. The paths of all entries, masks, and segmentation files are updated, as well as the Mask (M_REGION_MASKS_FOLDER), Segmentation (M_SEGMENTATION_FOLDER), and M_ANOMALY_DETECTION_FOLDER folders. Source files are not affected by this control type. It is recommended that you specify an empty destination folder each time you use M_CONSOLIDATE_ENTRIES_INTO_FOLDER. Class folders that already exist in the destination are not recreated. Existing files within that folder that have conflicting names are overwritten. Existing files without conflicting names remain unaffected. Entries without a ground truth are placed in the Images folder. Characters that are illegal in Windows file paths are replaced by the underscore character regardless of the operating system used. The maximum size of the file path is 259 characters. If this maximum is exceeded, Aurora Imaging Library attempts to shorten the folder class names.

ValueDescription
"///DATASET///"Specifies the folder path from where the dataset context is restored, using MclassRestore. If this path does not exist, Aurora Imaging Library uses the path in which your application's executable file is located.
"Path\\ToDstFolder"Specifies the file path. For example, you can specify "C:\ILoveZebra\Dest". Note, relative paths are supported; paths must not end with '\'.

M_DONT_CARE_CLASS_DRAW_COLOR

Sets the color given for all regions where the value for M_CLASS_INDEX_GROUND_TRUTH has been set to M_DONT_CARE_CLASS. The effect of this value can be seen in MclassDrawEntry with M_GROUND_TRUTH_IMAGE + M_PSEUDO_COLOR where any pixels assigned to M_DONT_CARE_CLASS will be given this color. The effect of this value can also be seen inMclassEntryAddRegion withM_GROUND_TRUTH_IMAGE_COLOR where any pixels of this color in the input image buffer will be added as a region with M_CLASS_INDEX_GROUND_TRUTH set to M_DONT_CARE_CLASS.

ValueDescription
M_DEFAULTSame as M_COLOR_DONT_CARE_CLASS.
M_RGB888Specifies the RGB value to use as the region's color.
M_COLOR_BLACKSpecifies the color black.
M_COLOR_BLUESpecifies the color blue.
M_COLOR_BRIGHT_GRAYSpecifies the color bright gray.
M_COLOR_CYANSpecifies the color cyan.
M_COLOR_DARK_BLUESpecifies the color dark blue.
M_COLOR_DARK_CYANSpecifies the color dark cyan.
M_COLOR_DARK_GREENSpecifies the color dark green.
M_COLOR_DARK_MAGENTASpecifies the color dark magenta.
M_COLOR_DARK_REDSpecifies the color dark red.
M_COLOR_DARK_YELLOWSpecifies the color dark yellow.
M_COLOR_DONT_CARE_CLASSSpecifies the color (255, 255, 255).
M_COLOR_GRAYSpecifies the color gray.
M_COLOR_GREENSpecifies the color green.
M_COLOR_LIGHT_BLUESpecifies the color light blue.
M_COLOR_LIGHT_GRAYSpecifies the color light gray.
M_COLOR_LIGHT_GREENSpecifies the color light green.
M_COLOR_LIGHT_WHITESpecifies the color light white.
M_COLOR_MAGENTASpecifies the color magenta.
M_COLOR_REDSpecifies the color red.
M_COLOR_WHITESpecifies the color white.
M_COLOR_YELLOWSpecifies the color yellow.

M_ENTRY_ADD

Adds a new entry to a dataset context. A new entry is added after the last one. For every entry added, a key (AIL_UUID) is generated to uniquely identify that entry. For an images dataset, this automatically adds a full frame region that you can refer to using index 0. You can import data, such as entries, from a CSV file to a dataset context, using MclassImport. You can also use Aurora Imaging CoPilot to interactively create, modify, and export datasets and their entries.

ValueDescription
M_DEFAULTImplements the default behavior.

M_ENTRY_DELETE

Deletes an entry from a dataset context, according to the specified index.

ValueDescription
0 <= Value <= M_NUMBER_OF_ENTRIES (default)Specifies the index of the entry to delete.

M_ENTRY_DELETE_ALL

Deletes all entries in a dataset context.

ValueDescription
M_DEFAULTImplements the default behavior.

M_ENTRY_DELETE_BY_KEY

Deletes an entry from a dataset context, according to the specified key (UUID).

ValueDescription
AIL_UUID ValueSpecifies the key of the entry to delete. The key is defined as an Aurora Imaging Library universal unique identifier (UUID). To specify an AIL_UUID value when using a C compiler, you must call the AIL_UUID version of this function (MclassControlAilUuid). When using a C++ or other compiler, MclassControl internally calls the AIL_UUID version of this function.

M_MAKE_FILE_PATHS_ABSOLUTE

Makes the file path of every entry in a dataset context into an absolute path. This is done by concatenating the current root path (M_ROOT_PATH value) to the relative path (M_ENTRY_IMAGE_PATH, M_REGION_MASK_PATH, M_SEGMENTATION_PATH, M_ANOMALY_DETECTION_PATH M_REGION_MASKS_FOLDER, M_SEGMENTATION_FOLDER, and M_ANOMALY_DETECTION_FOLDER) of all entries. This results in every entry having a complete path, and the root path (M_ROOT_PATH) being replaced with an empty string (AIL_TEXT("")).

ValueDescription
M_DEFAULTImplements the default behavior.

M_MAKE_FILE_PATHS_RELATIVE

Makes the file path of every entry in a dataset context into a relative path. This is done by parsing the absolute file path (M_ENTRY_IMAGE_PATH_ABS, M_SEGMENTATION_PATH_ABS, M_ANOMALY_DETECTION_PATH_ABS, and M_REGION_MASK_PATH_ABS) of all entries to find a common root path. If a common root path is found, the file paths of all entries are modified to use relative paths, and the root path (M_ROOT_PATH) is set to the newly found common root path. In addition, if M_REGION_MASKS_FOLDER, M_SEGMENTATION_FOLDER, and M_ANOMALY_DETECTION_FOLDER are set, those folders' paths are also involved in the search for the common root path. Note, if MobjInquire with M_OBJECT_FILE_FOLDER returns a non-empty string value, and the common path has a part that is the same as the object's file folder, Aurora Imaging Library will substitute this value with "///DATASET/". If M_OBJECT_FILE_FOLDER returns an empty string, Aurora Imaging Library uses the common root path that was found. For example, if the file paths of two dataset entries are_A:\work\examples\ProcessingRocks\Classification\Image1.mim_ and A:\work\examples\ProcessingRocks\Classification\Image2.mim, Aurora Imaging Library would establish the common path as A:\work\examples\ProcessingRocks\Classification. In this case, if M_OBJECT_FILE_FOLDER returns A:\work\examples\ProcessingRocks\Classification, Aurora Imaging Library would set the root path (M_ROOT_PATH) to ///DATASET///. However, if M_OBJECT_FILE_FOLDER returns an empty string, Aurora Imaging Library would set the root path to A:\work\examples\ProcessingRocks\Classification.

ValueDescription
M_DEFAULTImplements the default behavior.

M_NO_CLASS_DRAW_COLOR

Sets the color used for pixels that are either not assigned to any region or that you would like to not be assigned to any region. The effect of this value can be seen in MclassDrawEntry with M_GROUND_TRUTH_IMAGE + M_PSEUDO_COLOR where any unlabeled pixels will be given this color if M_NO_REGION_PIXEL_CLASS is set toM_NO_CLASS. The effect of this value can also be seen inMclassEntryAddRegion withM_GROUND_TRUTH_IMAGE_COLOR where any pixels of this color in the input image buffer will not be added as a region.

ValueDescription
(see M_DONT_CARE_CLASS_DRAW_COLOR)
M_DEFAULT
M_COLOR_NO_CLASS (default)Specifies the color (16, 0, 0).

M_NO_REGION_PIXEL_CLASS

Sets the class of any pixels that are not associated with any regions and therefore do not have an assigned value for M_CLASS_INDEX_GROUND_TRUTH. This control lets you determine whether you want to interpret these region-less values as having no class or being a part of a specific class. This control can be useful for interpreting unlabeled pixels as part of a specific class. For example, if you have two classes, one being the object you are interested in and the other being the background class, you have the option of only labeling the objects that you are interested in and then setting the M_NO_REGION_PIXEL_CLASS to be the index of your background class. In this case, during training, all pixels without a region will be interpreted as having the same ground truth index as the background class. M_NO_REGION_PIXEL_CLASSis associated with the UUID of the class at the specified index at the time that it is set. If the corresponding class is later deleted, M_NO_REGION_PIXEL_CLASS will default to M_NO_CLASS. The effect of this value can be seen in MclassDrawEntry with M_GROUND_TRUTH_IMAGE + M_PSEUDO_COLOR where any pixels that do not have a label will be given the M_CLASS_DRAW_COLOR of the ground truth index specified by value of M_NO_REGION_PIXEL_CLASS. To change the color of the pixels assigned to M_NO_CLASS, use the M_NO_CLASS_DRAW_COLOR control.

ValueDescription
M_DEFAULT
M_DONT_CARE_CLASSSpecifies that all pixels not assigned to a region will not contribute to training loss.
M_NO_CLASS (default)Specifies that no class index is used for pixels not assigned to a region.
0 <= Value < M_NUMBER_OF_CLASSESSpecifies the index of the class that is used for pixels not assigned to a region.

M_REGION_MASKS_FOLDER

Sets the path at which to save the region masks as they are added by MclassEntryAddRegion. When working with relative paths, you must set the region masks folder to be under the root path.

ValueDescription
"///DATASET///"Specifies the folder path from where the dataset context is restored, using MclassRestore. If this path does not exist, Aurora Imaging Library uses the path in which your application's executable file is located.
"RegionMaskFilePath"Specifies the region mask file path. For example, you can specify the root path as, AIL_TEXT("E:\Manual\RegionMasks\Good").

M_ROOT_PATH

Sets the root path that is used for the file path of a dataset's entry images, region masks, and segmentation scores. The file path is set, using MclassControlEntry with M_ENTRY_IMAGE_PATH, M_REGION_MASK_PATH, M_SEGMENTATION_PATH, and M_ANOMALY_DETECTION_PATH. Note, this is also related to (affects) M_REGION_MASKS_FOLDER, M_SEGMENTATION_FOLDER, and M_ANOMALY_DETECTION_FOLDER.

ValueDescription
""Specifies an empty path. This indicates that all entries' file paths are absolute paths.
"///DATASET///"Specifies the folder path from where the dataset context is restored, using MclassRestore. If this path does not exist, Aurora Imaging Library uses the path in which your application's executable file is located.
"RootFilePath"Specifies the root file path. For example, you can specify the root path as, AIL_TEXT("E:\Manual\LabeledIt\Good").

M_SEGMENTATION_FOLDER

Sets the path at which to save the segmentation scores. When working with relative paths, you must set the segmentation folder to be under the root path.

ValueDescription
"///DATASET///"Specifies the folder path from where the dataset context is restored, using MclassRestore. If this path does not exist, Aurora Imaging Library uses the path in which your application's executable file is located.
"SegmentationFilePath"Specifies the segmentation file path. For example, you can specify the root path as, AIL_TEXT("E:\Manual\Segmentation\Good").

For a classifier or dataset context

To control a classifier or dataset context, set the ControlType parameter to one of the values below. In this case, set the ContextOrResultClassId parameter to the identifier of a classifier or dataset context, and set the LabelOrIndex parameter to M_CONTEXT, unless otherwise specified. Note, these values apply to a classifier context or an images or a features dataset context, unless otherwise specified.


M_CLASS_ADD

Adds a new class definition to a classifier or dataset context, with the specified name. Aurora Imaging Library assigns an index to the new class definition such that the index is 1 greater than the highest existing class definition index.

ValueDescription
M_NULLSpecifies to add a new class definition with no explicitly defined name. Aurora Imaging Library defines a default name, in a "Class ##" format, where "##" is the index value.
"NewClassName"Specifies the name of the class definition to add.

M_CLASS_DELETE

Deletes a class definition from a classifier or dataset context, according to the specified index. If an entry in a dataset context references this deleted class definition, that reference is also deleted. Dataset entries without class definitions will cause an error when you call MclassTrain.

ValueDescription
M_DEFAULT
M_CLASS_INDEXSpecifies a class definition to delete. If a region (other than region 0) refers to the specified class to delete, that region is removed.
M_ALL (default)Specifies to delete all class definitions. All regions other than region 0 will be removed.

M_CLASS_DELETE_BY_KEY

Deletes a class definition from a classifier or dataset context, according to the specified key (UUID). If an entry in a dataset context references this deleted class definition, that reference is also deleted. Dataset entries without class definitions will cause an error when you call MclassTrain.

ValueDescription
AIL_UUID ValueSpecifies the key of the class definition to delete. The key is defined as an Aurora Imaging Library universal unique identifier (UUID). To specify an AIL_UUID value when using a C compiler, you must call the AIL_UUID version of this function (MclassControlAilUuid). When using a C++ or other compiler, MclassControl internally calls the AIL_UUID version of this function. If a region (other than region 0) is referred to the specified class, the region is removed.

For a class definition in a classifier or dataset context (for CNN, object detection, segmentation, anomaly detection, tree ensemble, or ONNX)

To control a class definition, the ControlType and corresponding ControlValue parameter settings can be set to the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of a classifier context (predefined CNN, object detection, predefined segmentation, predefined anomaly detection, tree ensemble, or ONNX) or a dataset context (images or features), and set the LabelOrIndex parameter to M_CLASS_INDEX(). Note, class definitions are added to a dataset context, using M_CLASS_ADD.


M_ANOMALOUS

Sets whether the specified class is considered anomalous. > Note: Note, the ContextOrResultClassId parameter must be the identifier of an anomaly detection classifier context or images dataset used for anomaly detection.

ValueDescription
M_DEFAULT
M_FALSE (default)Specifies that images containing this class, either at the image or pixel level, will not be considered anomalous unless it also contains a class with M_ANOMALOUS set to M_TRUE.
M_TRUESpecifies that images containing this class, either at the image or pixel level, will be considered anomalous.

M_CLASS_DRAW_COLOR

Sets the color assigned to a class definition. This color is used as a visual label and helps to identify class definitions. Draw operations use the class definition color.

ValueDescription
(see M_DONT_CARE_CLASS_DRAW_COLOR)

M_CLASS_ICON_ID

Sets the class definition's sample image. This image helps visually identify the class definition. This does not affect calculations. When you call MclassControl with M_CLASS_ICON_ID, Aurora Imaging Library copies the image to the context and assigns it a new identifier. Aurora Imaging Library returns this new identifier, if you inquire M_CLASS_ICON_ID.

ValueDescription
M_NULLSpecifies that the image associated with the class definition is freed. Note that if the specified class definition does not have an associated image, this setting has no effect.
Image identifierSpecifies the identifier of the image buffer to use for the class definition's sample image.

M_CLASS_NAME

Sets the name of a class definition that is currently in the dataset context. This name replaces the current class definition's name.

ValueDescription
"ClassDefinitionName"Specifies the name of a class definition.

M_CLASS_WEIGHT

Sets the class definition's weight. In this case, you must set the ContextOrResultClassId parameter to the identifier of a features dataset context, an images dataset context being used for segmentation, or a tree ensemble classifier context. The specified weight can only have an effect if M_CLASS_WEIGHT_MODE is set to M_USER_DEFINED.

ValueDescription
M_DEFAULT
Value > 0.0 (default)Specifies the weight.

For a classifier context's source layer (ONNX)

To control the source layer of the classifier in an ONNX classifier context, theControlType parameter can be set to one of the following values. In this case, set the LabelOrIndex parameter to M_DEFAULT_SOURCE_LAYER.


M_BAND_ORDER

Sets the order of the input bands of the network. This corresponds to the order in which the network interprets the bands of the images that were used in the training phase. If the bands in the target image (MclassPredict) do not follow this order, Aurora Imaging Library internally compensates by temporarily copying the bands to be ordered as the network expects.

ValueDescription
M_DEFAULT
M_BGRSpecifies that the bands are ordered according to the BGR (Blue, Green, Red) convention.
M_RGB (default)Specifies that the bands are ordered according to the RGB (Red, Green, Blue) convention.

For a data preparation context (images)

To control a global setting of a data preparation context (for image data), the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a data preparation context, and set the LabelOrIndex parameter to M_CONTEXT. These values affect the execution of MclassPrepareData. Data preparation values related to augmentation (M_AUGMENT_...) only have an effect if augmentations are enabled. This can be done by calling MclassControl and enabling preset augmentations (M_PRESET...). You can also enable other types of augmentation operations (M_AUG_..._OP) by calling MimControl with the identifier of the data preparation context's internal augmentation context, which you can inquire using M_AUGMENT_CONTEXT_ID.


M_AUGMENT_BALANCING

Sets a value that represents the proportion of augmented entries that will go towards class balancing.

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 80.0.
0.0 <= Value <= 100.0Specifies the proportion of augmented entries that will go towards class balancing. For example, if this is set to 80.0, then 80 percent of the augmented entries specified by M_AUGMENT_NUMBER_ABSOLUTE will go towards balancing the dataset whereas the last 20 percent (mainly for image classification) will go evenly to all classes such that they can all have some augmentation. M_AUGMENT_BALANCING only applies when calling MclassPrepareData with datasets. If you call MclassPrepareData with image buffers, M_AUGMENT_BALANCING is ignored.

M_AUGMENT_NUMBER_ABSOLUTE

Sets the number of augmented entries that Aurora Imaging Library should add to the destination dataset. M_AUGMENT_NUMBER_ABSOLUTE only applies when calling MclassPrepareData with datasets. If you call MclassPrepareData with image buffers, M_AUGMENT_NUMBER_ABSOLUTE is ignored.

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 0.
Value >= 0Specifies the number of augmented entries that should be added to the destination dataset. If you do not specify any augmentations, either with M_PRESET_... or with the internal augmentation context (M_AUGMENT_CONTEXT_ID), no images are added to the destination dataset. The actual number of augmented entries added to the destination dataset will be less than the augment number if there are any problems with the images in the source dataset. To check that all images were augmented properly you can check the M_STATUS hook info in the M_PREPARE_ENTRY_POST hook.

M_AUGMENT_NUMBER_FACTOR

Sets the ratio with which to establish the number of augmentations to add to the destination dataset. M_AUGMENT_NUMBER_FACTOR only applies when calling MclassPrepareData with datasets. If you call MclassPrepareData with image buffers, M_AUGMENT_NUMBER_FACTOR is ignored.

ValueDescription
M_DEFAULTSpecifies the default value; the default value is 3.0. If you do not specify any augmentations, either with M_PRESET_... or with the internal augmentation context (M_AUGMENT_CONTEXT_ID), no images are added to the destination dataset.
Value >= 0.0Specifies the ratio. Aurora Imaging Library applies the ratio value to the source dataset to establish the number of augmentations in the destination dataset. For example, setting M_AUGMENT_NUMBER_FACTOR to 3.0 indicates a 3:1 ratio between augmented images (destination dataset) and original images (source dataset). Specifying 0.0 results in no augmented entries being added.

M_AUGMENT_NUMBER_MODE

Sets the mode with which to establish the number of augmentations that should be added to the destination dataset when calling MclassPrepareData.

ValueDescription
M_DEFAULT
M_ABSOLUTESpecifies that the number of augmentations is established with M_AUGMENT_NUMBER_ABSOLUTE.
M_AUTO (default)Specifies that Aurora Imaging Library automatically establishes the number of augmentations. When augmenting a dataset, M_AUTO is the same as M_FACTOR. When augmenting an image buffer, M_AUTO is the same as M_DISABLE.
M_DISABLESpecifies that no augmentations are performed. This does not affect other data preparations (these are still performed).
M_FACTORSpecifies that the number of augmentations is established with M_AUGMENT_NUMBER_FACTOR.

M_CENTER_MODE

Sets the mode with which to establish the center of the destination image.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies that the center of the destination image is taken to be the center of the source image. If a hook-handler function was called due to an M_PREPARE_ENTRY_PRE event, the user-defined centers will be over written by the centers specified by MclassSetHookInfo with M_CENTER_X and M_CENTER_Y.
M_USER_DEFINEDSpecifies the center for cropping is taken to be the user-defined M_CENTER_X and M_CENTER_Y. If a hook-handler function was called due to an M_PREPARE_ENTRY_PRE event, the user-defined centers will be over written by the centers specified by MclassSetHookInfo with M_CENTER_X and M_CENTER_Y. This mode requires that the M_CENTER_X and M_CENTER_Y be selected such that in combination with the size the cropped image does not exceed the boundaries of the source image.

M_CENTER_X

Sets the X-coordinate of the center point used by M_CENTER_MODE. M_CENTER_Xonly has an effect if M_CENTER_MODE is set to M_USER_DEFINED.

ValueDescription
Value >= 0.0Specifies the X-coordinate.

M_CENTER_Y

Sets the Y-coordinate of the center point used by M_CENTER_MODE. M_CENTER_Yonly has an effect if M_CENTER_MODE is set to M_USER_DEFINED.

ValueDescription
Value >= 0.0Specifies the Y-coordinate.

M_DESTINATION_FOLDER_MODE

Sets the mode Aurora Imaging Library uses to manage the destination folder in which it saves the prepared images.

ValueDescription
M_DEFAULT
M_CREATE (default)Specifies that the data preparation process creates a unique prepare destination folder. Each time you call MclassPrepareData, prepared images are written to this unique folder. Previously created folders are not overwritten. Aurora Imaging Library creates the unique prepare folders under the folder specified with M_PREPARED_DATA_FOLDER; for example, M_PREPARED_DATA_FOLDER/prepare1, M_PREPARED_DATA_FOLDER/prepare2, M_PREPARED_DATA_FOLDER/prepare..., M_PREPARED_DATA_FOLDER/preparex. Note, Aurora Imaging Library uses the first available folder by following this hierarchy.
M_OVERWRITESpecifies that the data preparation process uses the same prepare destination folder. Each time you call MclassPrepareData, prepared images are written to this folder. Aurora Imaging Library creates the prepare folder under the folder specified with M_PREPARED_DATA_FOLDER; that is, M_PREPARED_DATA_FOLDER/prepare. When using overwrite mode, you cannot make concurrent calls to MclassPrepareData.

M_PREPARE_ORIGINAL_IMAGES

Sets the mode with which to add source entries to the destination dataset, when cropping/resizing images with MclassPrepareData. By default, no cropping or resizing is done; in this case, MclassPrepareData adds (copies) the original (source) images as-is.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies that the source dataset entries, for cropped/resized images, are added to the destination dataset, if they were not previously added. In this case, multiple calls with the same destination dataset will result in the cropped/resized images only being present in the destination dataset once.
M_DISABLESpecifies that the source dataset entries, for cropped/resized images, are not added to the destination dataset.
M_ENABLESpecifies that the source entries, for cropped/resized images, are added to the destination dataset, regardless of whether they were previously added. This can result in repeated entries/images.

M_PREPARED_DATA_FOLDER

Sets the path to the destination folder in which to save the prepared dataset.

ValueDescription
""Specifies an empty path. This implies the destination folder is the default destination folder (C:\Users\Public\Documents\Classification on Windows or /var/lib/aurora_imaging/Classification in the user's home directory on Linux).
"DestinationFolder"Specifies the destination folder where the prepared dataset will be saved.

M_PRESET_ASPECT_RATIO

Sets whether to enable the aspect ratio augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the aspect ratio augmentation operation.
M_ENABLESpecifies to enable the aspect ratio augmentation operation with preset values.

M_PRESET_CROP

Sets whether to enable the crop augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the crop augmentation operation.
M_ENABLESpecifies to enable the crop augmentation operation with preset values.

M_PRESET_FLIP

Sets whether to enable the flip augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the flip augmentation operation.
M_ENABLESpecifies to enable the flip augmentation operation with preset values.

M_PRESET_GAMMA

Sets whether to enable the gamma augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the gamma augmentation operation.
M_ENABLESpecifies to enable the gamma augmentation operation with preset values.

M_PRESET_HUE_OFFSET

Sets whether to enable the hue offset augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the hue offset augmentation operation.
M_ENABLESpecifies to enable the hue offset augmentation operation with preset values.

M_PRESET_INTENSITY_ADD

Sets whether to enable the intensity add augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the intensity add augmentation operation.
M_ENABLESpecifies to enable the intensity add augmentation operation with preset values.

M_PRESET_INTENSITY_MULTIPLY

Sets whether to enable the intensity multiply augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the intensity multiply augmentation operation.
M_ENABLESpecifies to enable the intensity multiply augmentation operation with preset values.

M_PRESET_LIGHTING_DIRECTIONAL

Sets whether to enable the directional lighting augmentation operation. Modifying an image's directional lighting can be seen as a type of add-ramp operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the directional lighting augmentation operation.
M_ENABLESpecifies to enable the directional lighting augmentation operation with preset values.

M_PRESET_NOISE_GAUSSIAN_ADDITIVE

Sets whether to enable the Gaussian additive noise augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the Gaussian additive noise augmentation operation.
M_ENABLESpecifies to enable the Gaussian additive noise augmentation operation with preset values.

M_PRESET_NOISE_SALT_PEPPER

Sets whether to enable the salt and pepper augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the salt and pepper noise augmentation operation.
M_ENABLESpecifies to enable the salt and pepper noise augmentation operation with preset values.

M_PRESET_REDUCE

Sets whether to enable the reduce augmentation operation. The reduce operation creates an image with the mean values and puts the reduced image at a random location with the regions translated accordingly.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the reduce augmentation operation.
M_ENABLESpecifies to enable the reduce augmentation operation with preset values.

M_PRESET_ROTATION

Sets whether to enable the rotation augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the rotation augmentation operation.
M_ENABLESpecifies to enable the rotation augmentation operation with preset values.

M_PRESET_SATURATION_GAIN

Sets whether to enable the saturation gain augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the saturation gain augmentation operation.
M_ENABLESpecifies to enable the saturation gain augmentation operation with preset values.

M_PRESET_SCALE

Sets whether to enable the scale augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the scale augmentation operation.
M_ENABLESpecifies to enable the scale augmentation operation with preset values.

M_PRESET_SMOOTH_GAUSSIAN

Sets whether to enable the smooth Gaussian augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the smooth Gaussian augmentation operation.
M_ENABLESpecifies to enable the smooth Gaussian augmentation operation with preset values.

M_PRESET_TRANSLATION

Sets whether to enable the translation augmentation operation.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies to disable the translation augmentation operation.
M_ENABLESpecifies to enable the translation augmentation operation with preset values.

M_RESIZE_SCALE_FACTOR

Sets the resize scale factor to apply between the contents of the source and destination images. While the control affects the contents of an image by cropping or adding black borders, it does not affect the size x/y of the destination image. Black borders will be ignored during training. For example, a resize scale factor of 0.5 will result in the contents of the destination images being half the size of the source images, with the remainder of the destination image filled with a black border.

ValueDescription
M_DEFAULT
M_FILL_DESTINATION_BILINEARSpecifies to make all entries scale to fill the destination image size x/y determined by M_SIZE_MODE, M_SIZE_X, M_SIZE_Y and classifier passed in the MclassPrepareData call using bilinear interpolation. This mode is meant for the case where you would like to resize all images to a common size x/y without cropping or adding black borders. When in this mode, M_CENTER_MODE, M_CENTER_X, and M_CENTER_Y are all ignored and not used even if they are set.
M_FILL_DESTINATION_NEAREST_NEIGHBORSpecifies to make all entries scale to fill the destination image size x/y determined by M_SIZE_MODE, M_SIZE_X, M_SIZE_Y and classifier passed in the MclassPrepareData call using nearest neighbor interpolation. This mode is meant for the case where you would like to resize all images to a common size x/y without cropping or adding black borders. When in this mode, M_CENTER_MODE, M_CENTER_X, and M_CENTER_Y are all ignored and not used even if they are set.
0.0 < Value <= 16.0 (default)Specifies the factor by which to resize. If the factor is set to 1.0 (default), there is no resizing.

M_SIZE_MODE

Sets the mode with which to establish the size of the destination image.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies that the size of the destination image will be the same as the source image if no classifier was given. If a trained classifier is given, then the size of the destination image will be the same as the source layer. If an untrained classifier is given, then the size of the destination image will be the same as the source image size. Note, if you are using a legacy FCNet classifier, and it is untrained, it will try to adapt the source image size to the nearest classifier formula size. When selecting a size based on the classifier formula, the one selected will be the nearest one when rounding down. In this case, the size of the destination will always be less than or equal to the size of the source image and never larger.
M_USER_DEFINEDSpecifies the size of the destination image will be the user-defined M_SIZE_X and M_SIZE_Y. Both M_SIZE_X and M_SIZE_Y must be specified in this mode. When M_SIZE_MODE is set to M_USER_DEFINED, the classifier (ClassifierContextClassId) in MclassPrepareData must not be specified.

M_SIZE_X

Sets the width for the destination image. To use this control, M_SIZE_MODE must be set to M_USER_DEFINED and the classifier (ClassifierContextClassId) in MclassPrepareData must not be specified.

ValueDescription
Value > 0.0Specifies the width.

M_SIZE_Y

Sets the height for the destination image. To use this control, M_SIZE_MODE must be set to M_USER_DEFINED and the classifier (ClassifierContextClassId) in MclassPrepareData must not be specified.

ValueDescription
Value > 0.0Specifies the height.

For a data preparation context (images) or a training context (anomaly detection or tree ensemble)

To control a global setting of a data preparation context (for image data) or a training context (anomaly detection or tree ensemble), the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. Set the ContextOrResultClassId parameter to the identifier of a data preparation context (for image data) or the identifier of a training context (anomaly detection or tree ensemble), and set the LabelOrIndex parameter to M_CONTEXT.


M_SEED_MODE

Sets the mode with which to initialize the seed used for anomaly detection and tree ensemble training or image data augmentation. Aurora Imaging Library uses the seed value to generate the random numbers needed to train an anomaly detection context or a tree ensemble. Specifically, Aurora Imaging Library uses randomness to: - Select the entries for each training set (if you do not disable M_BOOTSTRAP). - Select the features to consider when splitting a node. To control the maximum number of features considered, use M_NODE_MAX_NUMBER_OF_FEATURES_MODE and M_NODE_MAX_NUMBER_OF_FEATURES. - To shuffle the values of a feature for all entries of the development set (or out-of-bag set), when calculating the feature importance (M_FEATURE_IMPORTANCE_MODE) using permutation (M_PERMUTATION).

ValueDescription
M_DEFAULTSpecifies the default mode with which to initialize the seed. Same as M_USER_DEFINED for training contexts. Same asM_AUTO for data preparation contexts.
M_AUTOSpecifies that the seed is chosen at random, and that Aurora Imaging Library generates and uses a new seed each time you callMclassTrain. To retrieve the used seed, call MclassGetResult with M_GENERAL and M_SEED_VALUE. If you retrain with the same seed, you can reproduce the same training (Aurora Imaging Library uses the same random values).
M_USER_DEFINEDSpecifies the user-defined seed set with M_SEED_VALUE.

M_SEED_VALUE

Sets the seed value that Aurora Imaging Library uses to generate random numbers. These random numbers are used to train a tree ensemble or to generate the random augmentations required by image data preparation. Aurora Imaging Library ignores this explicitly specified seed value if M_SEED_MODE is set to M_AUTO.

ValueDescription
M_DEFAULT
Value >= 1 (default)Specifies the seed value.

For a statistics classification, classifier, or training context (CNN, object detection, segmentation, anomaly detection, or tree ensemble)

To control a global setting of a statistics classification context, a classifier context, or a training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values, unless otherwise specified. In this case, set the ContextOrResultClassId parameter to the identifier of a statistics classification context, a predefined CNN, predefined object detection, predefined segmentation, predefined anomaly detection, or tree ensemble training or classifier context, and set the LabelOrIndex parameter to M_CONTEXT.


M_TIMEOUT

Sets the maximum calculation time, in msec. If you specify a training context, the timeout applies to MclassTrain. If you specify a classifier context, the timeout applies to MclassPredict. If you specify a statistics classification context, the timeout applies to MclassStatCalculate.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies an infinite amount of time.
Value > 0.0Specifies the maximum time, in msec.

For a training context (CNN, object detection, segmentation, anomaly detection)

To control a global setting of a CNN, object detection, segmentation, or anomaly detection training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN, object detection, segmentation, or anomaly detection training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_MINI_BATCH_SIZE

Sets the size of each mini-batch. Aurora Imaging Library uses mini-batches to split the training dataset to help make the training process more efficient.

ValueDescription
M_DEFAULTSpecifies the default value. For image classification (M_TRAIN_CNN), the default is 32. For segmentation (M_TRAIN_SEG) and object detection (M_TRAIN_DET), the default is 4. For anomaly detection (M_TRAIN_ANO), the default is 1.
Value > 0Specifies the size.

M_TRAIN_ENGINE

Sets the engine (processing unit) that Aurora Imaging Library uses to perform the training process.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies the engine automatically. Typically, Aurora Imaging Library uses the best available GPU.
M_CPUSpecifies the CPU.
M_GPUSpecifies the GPU. You must have installed the appropriate Aurora Imaging Library add-ons and updates to train on your GPU.

For a training context (CNN, object detection or segmentation)

To control a global setting of a CNN, object detection or segmentation training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN, object detection or segmentation training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_FOCAL_LOSS_GAMMA

Sets a focusing value for the focal loss when training. This only has an effect when M_LOSS_FUNCTION_TYPE is set to M_FOCAL_LOSS. This is only available for classification and segmentation training contexts (M_TRAIN_CNN and M_TRAIN_SEG).

ValueDescription
M_DEFAULT
Value >= 0.0 (default)Specifies the focusing value. Greater values reduce the relative loss for well-classified images while putting more focus on hard to classify images.

M_INITIAL_LEARNING_RATE

Sets the initial learning rate for training. The learning rate determines the degree to which the classifier's weights are modified at each mini-batch during training.

ValueDescription
M_DEFAULTSpecifies the default value. For image classification (M_TRAIN_CNN), the default is 0.005. For segmentation (M_TRAIN_SEG) and object detection (M_TRAIN_DET), the default is 0.001.
Value > 0.0Specifies the learning rate.

M_LEARNING_RATE_DECAY

Sets the learning rate decay for training. The learning rate decay determines how fast the learning rate decreases during training. This can help prevent excessive weights.

ValueDescription
M_DEFAULTSpecifies the default value. For image classification (M_TRAIN_CNN), the default is 0.1. For segmentation (M_TRAIN_SEG) and object detection (M_TRAIN_DET), the default is 0.05.
Value > 0.0Specifies the learning rate decay.

M_LOSS_FUNCTION_TYPE

Sets the type of loss function for training.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies that Aurora Imaging Library automatically establishes the type of loss function to use. For image classification, Aurora Imaging Library uses M_CROSS_ENTROPY. For object detection, Aurora Imaging Library uses M_DET_LOSS. For segmentation, Aurora Imaging Library uses M_FOCAL_LOSS.
M_CROSS_ENTROPYSpecifies a cross entropy type of loss. This is only available for classification and segmentation training contexts (M_TRAIN_CNN and M_TRAIN_SEG).
M_DET_LOSSSpecifies a detection type of loss. This is only available for object detection training contexts (M_TRAIN_DET).
M_DICE_LOSSSpecifies a dice type of loss. This is only available for segmentation training contexts (M_TRAIN_SEG).
M_FOCAL_LOSSSpecifies a focal type of loss. To set a focusing value for the focal loss, use M_FOCAL_LOSS_GAMMA. This is only available for classification and segmentation training contexts (M_TRAIN_CNN and M_TRAIN_SEG).

M_MAX_EPOCH

Sets the maximum number of epochs. An epoch refers to one complete cycle through the data that the classifier must learn during training.

ValueDescription
M_DEFAULT
Value >= 0 (default)Specifies the maximum number.

M_RESET_TRAINING_VALUES

Sets the value of all training mode controls (hyperparameters) automatically, according to the specified training mode. Note, only a complete training is performed for object detection and anomaly detection.

ValueDescription
M_DEFAULT
M_COMPLETE (default)Specifies a complete training mode. Typically, this is for completely restarting the training of a CNN, object detection or segmentation classifier context, or for training a CNN, object detection or segmentation classifier context that is not trained. A compete training is also performed for anomaly detection, though this value cannot be explicitly specified. The training mode controls, and what M_COMPLETE automatically sets them to, are listed below. Unless otherwise specified, values apply for image classification (M_TRAIN_CNN), object detection (M_TRAIN_DET), anomaly detection (M_TRAIN_ANO), and segmentation (M_TRAIN_SEG).
M_FINE_TUNINGSpecifies a fine tuning training mode. Typically, this is for a CNN or segmentation classifier context that was already trained on a specific classification problem, and that you must fine tune with new data. If you specify M_FINE_TUNING with a classifier context that was not sufficiently trained, you will get an error. The training mode controls, and what M_FINE_TUNING automatically sets them to, are listed below. Unless otherwise specified, values apply for image classification (M_TRAIN_CNN) and segmentation (M_TRAIN_SEG).
M_TRANSFER_LEARNINGSpecifies a transfer learning mode. Typically, this is for a CNN or segmentation classifier context that was already trained on a specific classification problem, and that you must train on a similar (but new) problem. If you specify M_TRANSFER_LEARNING with a context that was not sufficiently trained, you will get an error. The training mode controls, and what M_TRANSFER_LEARNING automatically sets them to, are listed below. Unless otherwise specified, values apply for image classification (M_TRAIN_CNN) and segmentation (M_TRAIN_SEG).

M_SCHEDULER_TYPE

Sets the schedule with which to adjust the learning rate.

ValueDescription
M_DEFAULTSpecifies the default value. For image classification and segmentation, the default is M_CYCLICAL_DECAY. For object detection, the default is M_FACTOR_DECAY.
M_CYCLICAL_DECAYSpecifies to decay the learning rate at an internally established cyclical schedule.
M_DECAYSpecifies to decay the learning rate, as weights are updated.
M_FACTOR_DECAYSpecifies to decay the learning rate by a factor at every specified epoch.

M_SPLIT_PERCENTAGE

Sets the percentage value, for the training dataset, used by MclassTrain when splitting a single dataset into a training and development dataset. For example, if you call MclassTrain with a single dataset, and you set M_SPLIT_PERCENTAGE to 80 percent (M_DEFAULT), the training dataset will contain 80 percent of the entries in the single dataset, and the development dataset will contain 20 percent of the entries.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the percentage.

M_SPLIT_SEED_MODE

Sets the split seed mode to use when splitting a single dataset into a training and development dataset. For example, this can be set to randomly assign each entry to the training set or development set using M_RANDOM or, a fixed selection process using M_FIXED.

ValueDescription
M_DEFAULTSame as M_RANDOM.
M_FIXEDSpecifies to use the M_SPLIT_CONTEXT_FIXED_SEED predefined split classification context, for image classification (CNN) or feature classification (tree ensemble), or theM_SPLIT_SEG_CONTEXT_FIXED_SEED predefined split classification context, for segmentation.
M_RANDOMSpecifies to use the M_SPLIT_CONTEXT_DEFAULT predefined split classification context, for image classification (CNN) or feature classification (tree ensemble), or theM_SPLIT_SEG_CONTEXT_DEFAULT predefined split classification context, for segmentation.

M_TRAIN_DESTINATION_FOLDER

Sets the path to the destination folder in which to save training results. For image classification training (M_TRAIN_CNN) and object detection training (M_TRAIN_DET), this specifies the location of the prepared images that will be stored on disk. For segmentation training (M_TRAIN_SEG), this determines the destination for both the segmentation scores and the prepared images that will be stored on disk.

ValueDescription
""Specifies an empty path. This indicates that you are using the default path, which you can inquire using M_TRAIN_DESTINATION_FOLDER + M_DEFAULT_PATH.
"TrainingResultsPath"Specifies the training results file path. For example, you can specify the root path as, AIL_TEXT("E:\Manual\TrainingResults\Good").

For a training context (CNN, segmentation, or feature classification)

To set a global setting of a CNN, segmentation, or tree ensemble training context, set the ControlType parameter to the value below. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN, segmentation, or tree ensemble training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_SUPPORT_MISSING_GROUND_TRUTH

Sets whether the training process allows the training and development datasets to contain entries that do not have a ground truth. An entry's ground truth is specified using MclassControlEntry with M_CLASS_INDEX_GROUND_TRUTH. For segmentation, when M_NO_REGION_PIXEL_CLASS is set to M_NO_CLASS, entries without a descriptor based region (M_DESCRIPTOR_BASED) are considered not to have a ground truth.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies that entries without a ground truth are not allowed. In this case, if you call MclassTrain, and one or more entries in the training or development datasets do not have a ground truth, you will get an error.
M_ENABLESpecifies that entries without a ground truth are allowed. In this case, if you call MclassTrain, and one or more entries in the training or development datasets do not have a ground truth, Aurora Imaging Library ignores them.

For a training context (segmentation)

To control a global setting of a segmentation training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a segmentation training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_CLASS_WEIGHT_STRENGTH

Sets the class weight strength when training with an inverse class frequency weight mode (M_INVERSE_CLASS_FREQUENCY). This setting has no effect when training with other weight modes.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the proportion of weighting to assign to M_INVERSE_CLASS_FREQUENCY. Reducing this value reduces the emphasis on the less represented classes.

M_FEATURE_SIZE_X

Sets the width (X-size) of the smallest feature to segment. This acts as a lower bound to the X-size of the class regions that the classifier expects during training. This control might be useful if the minimum feature size is larger than the minimum receptive field of the classifier. The default feature size (M_MIN) is typically the best possible setting. This has no effect when fine tuning (M_FINE_TUNING). If images have been resized during data preparation (either by MclassPrepareData or an internal data preparation context), this value must be set relative to the final prepared images.

ValueDescription
M_DEFAULT
M_MIN (default)Specifies the smallest size possible.
Value > 0Specifies that the classifier will adjust to encompass features of the size you set, provided they are larger than the minimum possible feature size.

M_FEATURE_SIZE_Y

Sets the height (Y-size) of the smallest feature to segment. This acts as a lower bound to the Y-size of the class regions that the classifier expects during training. This control might be useful if the minimum feature size is larger than the minimum receptive field of the classifier. The default feature size (M_MIN) is typically the best possible setting. This has no effect when fine tuning (M_FINE_TUNING). If images have been resized during data preparation (either by MclassPrepareData or an internal data preparation context), this value must be set relative to the final prepared images.

ValueDescription
M_DEFAULT
M_MINSpecifies the smallest size possible.
M_SAME (default)Specifies to use the same value as M_FEATURE_SIZE_X.
Value > 0Specifies that the classifier will adjust to encompass features of the size you set, provided they are larger than the minimum possible feature size.

M_USE_MASK_DESCRIPTORS

Sets whether to use mask descriptors for training. You must enable M_USE_MASK_DESCRIPTORS if you disableM_USE_POLYGON_DESCRIPTORS (both can be enabled, but both cannot be disabled).

ValueDescription
M_DEFAULT
M_DISABLESpecifies not to use mask descriptors for training.
M_ENABLE (default)Specifies to use mask descriptors for training.

M_USE_POLYGON_DESCRIPTORS

Sets whether to use polygon descriptors for training. You must enable M_USE_POLYGON_DESCRIPTORS if you disableM_USE_MASK_DESCRIPTORS (both can be enabled, but both cannot be disabled).

ValueDescription
M_DEFAULT
M_DISABLESpecifies not to use polygon descriptors for training.
M_ENABLE (default)Specifies to use polygon descriptors for training.

For a training context (anomaly detection)

To control a global setting of an anomaly detection training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of an anomaly detection training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_MINI_BATCHES_PER_SAMPLING

Sets how many mini-batches are loaded into memory before sampling when M_TRAIN_MODE is set to M_ITERATIVE_SAMPLING.

ValueDescription
M_DEFAULT
Value >= 1 (default)Specifies the number of mini-batches.

M_SAMPLES_FIXED_SIZE

Sets the number of samples learned by the classifier. The higher the number, the bigger the size of the network (bigger networks can have a better/higher capacity to handle more complex cases).

ValueDescription
M_DEFAULT
Value > 0 (default)Specifies the number of samples.

M_TRAIN_MODE

Sets the mode in which the samples are selected. By default, Aurora Imaging Library tries to perform a global type of training (M_GLOBAL_SAMPLING), but this can lead to running out of GPU memory. In this case, it is recommended to set M_TRAIN_MODE to M_ITERATIVE_SAMPLING, and then increase M_MINI_BATCHES_PER_SAMPLING until you maximize GPU usage. Note that both modes result in similar accuracy.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies to automatically select the mode in which the samples are selected. This is the same as M_GLOBAL_SAMPLING.
M_GLOBAL_SAMPLINGSpecifies a global selection mode. This mode loads the whole training set into memory and then samples it. M_GLOBAL_SAMPLING is memory intensive but faster than M_ITERATIVE_SAMPLING since the sampling occurs only once.
M_ITERATIVE_SAMPLINGSpecifies an iterative selection mode. This mode partitions the training set and samples each partition iteratively. M_ITERATIVE_SAMPLING uses less memory than M_GLOBAL_SAMPLING but takes longer since the sampling process is repeated at each iteration.

For a training context (segmentation or tree ensemble)

To control a global setting of a segmentation or tree ensemble training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a segmentation or tree ensemble training context, unless otherwise specified, and set the LabelOrIndex parameter to M_CONTEXT.


M_CLASS_WEIGHT_MODE

Sets how to establish the weight of a class definition.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies that Aurora Imaging Library automatically sets how the weight is established. For segmentation training contexts, if the loss function type is M_FOCAL_LOSS or M_CROSS_ENTROPY, M_AUTO is the same asM_INVERSE_CLASS_FREQUENCY. If the loss function type is M_DICE_LOSS, M_AUTOis the same as M_SQUARED_INVERSE_CLASS_FREQUENCY. For image classification and tree ensemble training contexts, M_AUTOis the same as M_NONE.
M_BALANCESpecifies a balanced weight. This setting is only for tree ensemble.
M_INVERSE_CLASS_FREQUENCYSpecifies to use weight factors equal to the inverse of each class frequency. You can further adjust the weight factors with M_CLASS_WEIGHT_STRENGTH. This setting is only for segmentation.
M_NONESpecifies no weight.
M_SQUARED_INVERSE_CLASS_FREQUENCYSpecifies to use weight factors equal to the squared inverse of each class frequency. You can further adjust the weight factors with M_CLASS_WEIGHT_STRENGTH. This setting is only for segmentation.
M_USER_DEFINEDSpecifies to use the weight defined with M_CLASS_WEIGHT.

For a training context (tree ensemble)

To control a global setting of a tree ensemble training context, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a tree ensemble training context, and set the LabelOrIndex parameter to M_CONTEXT.


M_BOOTSTRAP

Sets whether to use bootstrap aggregation for the training dataset entries to produce multiple and separate training sets when building trees.

ValueDescription
M_DEFAULT
M_DISABLESpecifies not to use bootstrap aggregation.
M_WITH_REPLACEMENT (default)Specifies to use bootstrap aggregation, and allow replacement (chosen entries in a training set can be chosen again).
M_WITHOUT_REPLACEMENTSpecifies to use bootstrap aggregation, and not allow replacement (chosen entries in a training set cannot be chosen again).

M_COMPUTE_OUT_OF_BAG_RESULTS

Sets whether to use out-of-bag dataset entries to estimate the generalization accuracy during training. Note, bagging information is typically unreliable if your training dataset has augmented entries.

ValueDescription
M_DEFAULT
M_DISABLESpecifies not to use out-of-bag entries.
M_ENABLE (default)Specifies to use out-of-bag entries.

M_COMPUTE_PROXIMITY_MATRIX

Sets whether to calculate the proximity measure matrix when building trees. This is a normalized _N_ x _N_ matrix, where N is the number of entries. The intersection value between pairs of entries in the matrix defines their proximity, which refers to the average number of trees that occupy the same terminal node for those entries. For example, if entries i and j are in the same terminal node, their proximity increases.

ValueDescription
M_DEFAULT
M_DISABLE (default)Specifies not to calculate the proximity measure matrix when building trees.
M_ENABLESpecifies to calculate the proximity measure matrix when building trees.

M_FEATURE_IMPORTANCE_MODE

Sets how to establish the importance of the features. Every entry in a features dataset refers to a set of features. For example, every entry can refer to a set of blob features, such as area, perimeter, and Feret diameter. Specific values for these features are specified, for each entry, using MclassControlEntry with M_RAW_DATA. By enabling a feature importance mode, Aurora Imaging Library establishes, during training, whether certain features are more important than others in determining the class to which the input data belongs. For example, the perimeter feature can end up being very important to establishing a successful classification, while the area feature can end up being almost irrelevant. To retrieve the resulting importance of features after training, call MclassGetResult with M_FEATURE_IMPORTANCE. You can then modify your set of features and retrain, which can help improve the tree ensemble classifier's performance and accuracy. Note, M_FEATURE_IMPORTANCE_MODE does not directly affect training. It allows you to retrieve which features are more important; you can then use this information to modify your dataset (for example, you can specify only the important features) and retrain. In general, the fastest modes with which to establish the feature importance are M_MEAN_DECREASE_IMPURITY, M_PERMUTATION, and M_DROP_COLUMN, while the modes with which to most accurately establish the feature importance are M_DROP_COLUMN, M_PERMUTATION, and M_MEAN_DECREASE_IMPURITY.

ValueDescription
M_DEFAULT
M_DISABLESpecifies to disable the feature importance mode. In this case, you cannot retrieve any information about the feature importance.
M_DROP_COLUMNSpecifies that the feature importance is based on the drop column of features. In this case, the more the elimination of a feature affects accuracy, the more importance that feature is given. To specify the set with which to calculate this type of feature importance, use M_FEATURE_IMPORTANCE_SET. To use M_DROP_COLUMN, you must train with a development dataset or compute out-of-bag results (that is, enable M_COMPUTE_OUT_OF_BAG_RESULTS).
M_MEAN_DECREASE_IMPURITY (default)Specifies that the feature importance is based on a decreasing impurity process. In this case, the more a feature affects a proper node splitting, the more important it is. Proper splitting means that the two sets resulting from splitting the node are significantly purer (better) than the set that was input to the node.
M_PERMUTATIONSpecifies that the feature importance is based on feature permutation. In this case, the more the shuffling of a feature affects accuracy, the more importance that feature is given. To specify the set with which to calculate this type of feature importance, use M_FEATURE_IMPORTANCE_SET. To use M_PERMUTATION, you must train with a development dataset or compute out-of-bag results (that is, enable M_COMPUTE_OUT_OF_BAG_RESULTS).

M_FEATURE_IMPORTANCE_SET

Sets how to establish the group of features with which to determine feature importance when using drop column or permutation. M_FEATURE_IMPORTANCE_SET only has an effect if M_FEATURE_IMPORTANCE_MODE is set to M_DROP_COLUMN or M_PERMUTATION.

ValueDescription
M_DEFAULT
M_AUTO (default)Specifies to automatically establish the feature set to use. If available, Aurora Imaging Library uses M_DEV_DATASET; otherwise, Aurora Imaging Library uses M_OUT_OF_BAG.
M_DEV_DATASETSpecifies to use the development dataset.
M_OUT_OF_BAGSpecifies to use the out-of-bag set. In this case, you must not disable M_BOOTSTRAP. Note, bagging information is typically unreliable if your data is augmented.

M_MIN_IMPURITY_DECREASE

Sets a decrease of impurity requirement for splitting a node. That is, Aurora Imaging Library will split a node if it induces a decrease of impurity greater than or equal to the specified value. The weighted impurity decrease equation is as follows: _N_t_ / _N_ * (_impurity_ - _N_t_R_ / _N_t_ * _right_impurity_ - _N_t_L_ / _N_t_ * _left_impurity_), where N is the total number of dataset entries,_ N_t_ is the number of dataset entries related to the current node, N_t_L is the number of dataset entries related to the left child, and N_t_R is the number of dataset entries related to the right child. N, N_t, N_t_R, and N_t_L all refer to the weighted sum, if weights (entry weights and class weights) are used.

ValueDescription
M_DEFAULT
Value >= 0.0 (default)Specifies the impurity value.

M_MIN_NUMBER_OF_ENTRIES_LEAF

Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that Aurora Imaging Library uses to identify a leaf node. Aurora Imaging Library uses this value to establish M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE.

ValueDescription
M_DEFAULT
0.0 < MinNumPercent <= 100.0Specifies the minimum number of entries, as a percentage. You should only use a percentage when M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the minimum number of entries equaling 0, Aurora Imaging Library uses 1 as the minimum number; that is, if Round((Value/100) * _NumberEntriesInTrainDataset_)== 0, then MinNumberEntriesLeaf = 1.
Value >= 1 (default)Specifies the minimum number of entries. You should only use this value when M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE is set to M_USER_DEFINED_VALUE.

M_MIN_NUMBER_OF_ENTRIES_LEAF_MODE

Sets how to establish the minimum number of related dataset entries required to be at a leaf node. A split point at any depth will only be considered if it leaves at least the minimum number of entries (leaf training entries) in each of the left and right branches.

ValueDescription
M_DEFAULT
M_USER_DEFINED_PERCENTAGESpecifies to use a percentage, determined from the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_LEAF.
M_USER_DEFINED_VALUE (default)Specifies to use the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_LEAF.

M_MIN_NUMBER_OF_ENTRIES_SPLIT

Sets the minimum number of training dataset entries, or a percentage of the minimum number of related dataset entries, that Aurora Imaging Library uses to determine how to best split the internal nodes of the trees. Aurora Imaging Library uses this value to establish M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE.

ValueDescription
M_DEFAULT
0.0 < MinNumPercent <= 100.0Specifies the minimum number of entries, as a percentage. This only has an effect if M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the minimum number of entries equaling 0, Aurora Imaging Library uses 2 as the minimum number; that is, if Round((Value/100) * _NumberEntriesInTrainDataset_) == 0, then MinNumberEntriesSplit = 2.
Value >= 1 (default)Specifies the minimum number of entries. This only has an effect if M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE is set to M_USER_DEFINED_VALUE.

M_MIN_NUMBER_OF_ENTRIES_SPLIT_MODE

Sets how to establish the minimum number of related dataset entries required to split an internal node.

ValueDescription
M_DEFAULT
M_USER_DEFINED_PERCENTAGESpecifies to use a percentage, determined from the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_SPLIT.
M_USER_DEFINED_VALUE (default)Specifies to use the minimum number of entries defined with M_MIN_NUMBER_OF_ENTRIES_SPLIT.

M_MIN_WEIGHT_FRACTION_LEAF

Sets the minimum weighted fraction of the sum total of weights (of all the dataset entries) required to be at a leaf node. Entries have equal weight when M_CLASS_WEIGHT_MODE is set to M_NONE.

ValueDescription
M_DEFAULT
0.0 <= Value <= 0.5 (default)Specifies the minimum weighted fraction.

M_NODE_MAX_NUMBER_OF_FEATURES

Sets the maximum number of features in the training dataset, or a percentage of the maximum number of features, that Aurora Imaging Library can use to determine how to best split the nodes of the trees. M_NODE_MAX_NUMBER_OF_FEATURES only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_VALUE or M_USER_DEFINED_PERCENTAGE. If M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_LOG2, and the number of features in the dataset is 1, Aurora Imaging Library trains with 1 feature, even though the calculation results in 0; that is, log(1) = 0. If M_NODE_MAX_NUMBER_OF_FEATURES_MODE is equal to M_USER_DEFINED_VALUE, and M_NODE_MAX_NUMBER_OF_FEATURES is higher than the actual number of features in the training dataset, Aurora Imaging Library uses all the features in the dataset.

ValueDescription
M_DEFAULT
M_ALL (default)Specifies no maximum.
0.0 <= MaxNumPercent <= 100.0Specifies the percentage with which to determine the maximum number of features. This only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_PERCENTAGE. If you specify a percentage value that results in the maximum number of features equaling 0, Aurora Imaging Library uses 1 feature as the maximum number; that is, if Round((Value/100)*_NumberOfFeaturesInTrainDataset_)== 0, then MaxNumberOfFeatures = 1 (see M_NODE_MAX_NUMBER_OF_FEATURES_MODE).
Value >= 1Specifies the value with which to determine the maximum number of features. This only has an effect if M_NODE_MAX_NUMBER_OF_FEATURES_MODE is set to M_USER_DEFINED_VALUE. If you specify a maximum value that is greater than the total number of features available, Aurora Imaging Library uses the total number of features available.

M_NODE_MAX_NUMBER_OF_FEATURES_MODE

Sets how to establish the maximum number of features that Aurora Imaging Library uses to determine how to best split the nodes of the trees.

ValueDescription
M_DEFAULT
M_ALLSpecifies that all available features are used.
M_LOG2Specifies to use a base 2 logarithm, determined from the total number of features. This can be described as: M_LOG2 = Round(Log2(_NumberOfFeatures_)).
M_SQUARE_ROOT (default)Specifies to use a square root, determined from the total number of features. This can be described as: M_SQUARE_ROOT = Round(Log2(_NumberOfFeatures_)).
M_USER_DEFINED_PERCENTAGESpecifies to use a percentage, determined from the total number of features, where the percentage is set by M_NODE_MAX_NUMBER_OF_FEATURES. This can be described as: M_USER_DEFINED_PERCENTAGE = Round(_NumberOfFeatures_* _MaxNumberOfFeatures_/100).
M_USER_DEFINED_VALUESpecifies to use the maximum number of features defined with M_NODE_MAX_NUMBER_OF_FEATURES.

M_NUMBER_OF_TREES

Sets the number of trees in the tree ensemble train context.

ValueDescription
M_DEFAULT
Value >= 1 (default)Specifies the amount of trees in the tree ensemble.

M_SPLIT_QUALITY_TYPE

Sets how to measure the quality of a node split.

ValueDescription
M_DEFAULT
M_ENTROPYSpecifies that Aurora Imaging Library uses an Entropy based function to measure the quality of a node split.
M_GINI (default)Specifies that Aurora Imaging Library uses a Gini based function to measure the quality of a node split.

M_TREE_MAX_DEPTH

Sets the maximum depth of the trees in the tree ensemble. The depth of a tree (M_TREE_MAX_DEPTH) is the depth of its deepest node. The depth of a node is the number of edges (connectors) from that node to the tree's root node. A root node has a depth of 0. To retrieve the actual depth achieved after training, call MclassGetResult with M_TREE_DEPTHS_ACHIEVED. The depth achieved is always less than or equal to the maximum tree depth (M_TREE_MAX_DEPTH).

ValueDescription
M_DEFAULT
M_NONE (default)Specifies no maximum depth.
Value >= 0Specifies the maximum depth.

M_TREE_MAX_NUMBER_OF_LEAF_NODES

Sets the maximum number of terminal nodes in the tree.

ValueDescription
M_DEFAULT
M_NONE (default)Specifies no maximum.
Value >= 1Specifies the maximum number of terminal nodes in the tree.

For a training result buffer (CNN, object detection, segmentation, or tree ensemble)

To control a general setting of a training result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In this case, set the ContextOrResultClassId parameter to the identifier of a CNN, object detection, segmentation, or tree ensemble training result buffer, unless otherwise specified, and set the LabelOrIndex parameter to M_GENERAL.


M_STOP_TRAIN

Stops the current execution of MclassTrain. This can only be done from another thread of higher priority, or from a user-defined classification hook function. If you stop training a CNN, object detection or segmentation classifier context, and 1 or more epochs are completed, results are typically available, except those related to development accuracy, training accuracy, development error rate, and training error rate. If you stop training a tree ensemble classifier context, and 1 or more trees are completed, all results are available. If 1 or more epochs are completed, Aurora Imaging Library saves the trained classifier results that MclassTrain produces up to the point that you stop training. You can copy these results into a classifier context, using MclassCopyResult.

ValueDescription
M_DEFAULTSpecifies the default behavior.

M_UPDATE_TRAINED_PARAMS

Updates the internal and hidden parameters (weights) of the classifier. This only applies when training a CNN or segmentation classifier, which you must specify with the ContextOrResultClassId parameter.

ValueDescription
M_DEFAULT
M_NOW (default)Specifies to immediately update the training parameters network.

For a prediction result buffer (CNN, object detection, segmentation, tree ensemble, or ONNX) or a dataset (images or features)

To control a general setting of a prediction result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of a CNN, object detection, segmentation, tree ensemble, or ONNX prediction result buffer, and set the LabelOrIndex parameter to M_GENERAL. Note, it is possible to specify M_STOP_PREDICT when calling MclassPredict with a target dataset; this requires setting the ContextOrResultClassId parameter to the identifier of the output dataset (images or features), and setting the LabelOrIndex parameter to M_CONTEXT.


M_STOP_PREDICT

Stops the current execution of MclassPredict. This can only be done from another thread of higher priority, or from a user-defined classification hook function. If you stop the prediction, Aurora Imaging Library does not return any results. Note, to stop the prediction of a target dataset, you must set the ContextOrResultClassId parameter to the identifier of the output dataset (produced by MclassPredict), and set the LabelOrIndex parameter to M_CONTEXT.

ValueDescription
M_DEFAULTSpecifies the default behavior.

For a prediction result buffer (object detection)

To control a general setting of a prediction result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of an object detection prediction result buffer, and set the LabelOrIndex parameter to M_GENERAL.


M_RESULT_OUTPUT_UNITS

Sets which units and coordinate system to use for prediction results. This setting only affects positional results within the Aurora Imaging Library Classification module. > Note: Note, this setting can be changed at any time to get results in the required units.

ValueDescription
M_DEFAULT
M_ACCORDING_TO_CALIBRATION (default)Specifies to use world units if the target image is associated with a camera calibration context; otherwise, specifies to use pixel units.
M_PIXELSpecifies to use pixel units with respect to the pixel coordinate system.
M_WORLDSpecifies to use world units with respect to the relative coordinate system. Using MclassGetResult will generate an error if the target image is not associated with a calibration context.

For a prediction or training result buffer (CNN, object detection, segmentation, tree ensemble, or ONNX)

To control a general setting of a prediction or training result buffer, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. Unless otherwise specified, set the ContextOrResultClassId parameter to the identifier of a CNN, object detection, segmentation, or tree ensemble prediction or training result buffer, or an ONNX prediction result buffer, and set the LabelOrIndex parameter to M_GENERAL.


M_RESET

Removes all results from the classification result buffer. Note that this does not delete the result buffer identifier, as is the case with MclassFree.

ValueDescription
M_DEFAULTSpecifies the default behavior.

For statistics classification

To control statistics classification, the ControlType and corresponding ControlValue parameter settings can be set to one of the following values. In addition, you can also specify M_TIMEOUT.


M_MATCH_IOU_THRESHOLD

Sets the IOU threshold for an object detection stat context, based on which predicted boxes are compared to their matched ground truth boxes. By comparing the IOU of each matched pair, the boxes are classified on the confusion matrix.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the IOU threshold.

M_MODE

Sets whether to calculate statistics for anomaly detection on an image level (default) or a pixel level. On an image level, the problem is an image classification one, whereas on the pixel level it is a segmentation problem.

ValueDescription
M_DEFAULT
M_IMAGE_LEVEL (default)Specifies to calculate statistics for anomaly detection on an image level. This takes into account M_WHOLE_IMAGE regions to identify anomalous entries. For a given entry, if its M_WHOLE_IMAGE region has no M_CLASS_INDEX_GROUND_TRUTH, it is considered non anomalous unless there exist at least one anomalous M_DESCRIPTOR_BASED region.
M_PIXEL_LEVELSpecifies to calculate statistics for anomaly detection on a pixel level. This only takes into account M_DESCRIPTOR_TYPE_POLYGON and M_DESCRIPTOR_TYPE_MASK regions of the entry to identify anomalous pixels.

M_SCORE_THRESHOLD_STEP

Sets the step increment of threshold values from 0.0 to 100.0. Last threshold might be less than 100.0 if the step setting leads past it.

ValueDescription
M_DEFAULT
0.0 <= Value <= 100.0 (default)Specifies the step increment for threshold.

M_STOP_CALCULATE

Stops the current execution of MclassStatCalculate. This can only be done from another thread of higher priority, or from a user-defined classification hook function. You cannot call MclassInquire with M_STOP_CALCULATE.

ValueDescription
M_DEFAULTSpecifies the default behavior.

This value only applies to an images dataset context.

You can automatically modify this setting, if you modify M_RESET_TRAINING_VALUES.

This operation is not supported for binary (1-bit) images.

This operation is not supported for binary (1-bit) and grayscale (1-band) images.

Note: To use this control, you must set the ContextOrResultClassId parameter to the identifier of a statistics classification context for object detection (M_STAT_DET) and set the LabelOrIndex parameter to M_CONTEXT.

Note: To use this control, you must set the ContextOrResultClassId parameter to the identifier of a statistics classification context for anomaly detection (M_STAT_ANO) and set the LabelOrIndex parameter to M_CONTEXT.

Note: To use this control, you must set the ContextOrResultClassId parameter to the identifier of any statistics classification context (M_STAT_ANO, M_STAT_CNN, M_STAT_DET, M_STAT_SEG, or M_STAT_TREE_ENSEMBLE) and set the LabelOrIndex parameter to M_CONTEXT.

Note: To use this control, you must set the ContextOrResultClassId parameter to the identifier of any statistics classification result buffer (M_STAT_ANO_RESULT, M_STAT_CNN_RESULT, M_STAT_DET_RESULT, M_STAT_SEG_RESULT, or M_STAT_TREE_ENSEMBLE_RESULT) and set the LabelOrIndex parameter to M_GENERAL.

Copyright © 2026 Zebra Technologies.