| Customize Help

Steps to performing classification



The following steps provide a basic methodology for using the MIL Classification module:

  1. Allocate a classifier context, using MclassAlloc(). For image classification, specify M_CLASSIFIER_CNN_PREDEFINED. For feature classification, specify M_CLASSIFIER_TREE_ENSEMBLE.

    All classification objects must be for the same type of classifier (predefined CNN or tree ensemble).

  2. Build the dataset context (the training dataset) with which to train the classifier context, using MclassControl() and MclassControlEntry(). A CNN classifier (image classification) also requires another dataset context (the development dataset) to evaluate the classifier's training. For more information, see the Steps to build the datasets subsection of the Datasets section later in this chapter.

    This section also discusses data collection and labeling (labeled data is a prerequisite to using the module). The quality, quantity, and proportionality of the labeled data is critical to building a good dataset, and developing a properly trained classifier.

  3. Train the classifier context, using MclassTrain(). Training typically includes analyzing training results, modifying settings, and re-training the trained classifier context until it is ready for prediction. For more information, see the Steps to train subsection of the Training: in general section later in this chapter.

  4. Predict the class to which the target (image or feature set) belongs, using the trained classifier context with MclassPredict(). For more information, see the Steps to predict subsection of the Predicting section later in this chapter.

  5. If necessary, save your classification contexts, using MclassSave() or MclassStream().

  6. Free all your allocated objects, using MclassFree().

Note that you can perform all or part of these steps interactively, using MIL CoPilot.

Basic work-flow

As implied by the previous steps, the basic work-flow for using the MIL Classification module has 3 main phases: build the dataset contexts, train the classifier context, and predict with the trained classifier context. The following image summarizes the general aspects of these phases.

The objects and settings related to each of these phases are discussed in detail later in this chapter. Note that the time and resources required to build the datasets and train the classifier is highly contingent on your application.