This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Train Object Detector or Semantic Segmentation Network from Ground Truth Data

You can use the Image Labeler, Video Labeler, and Ground Truth Labeler (requires Automated Driving System Toolbox™) apps, along with Computer Vision System Toolbox™ objects and functions, to train algorithms from ground truth data. First, use your labeling app to interactively label ground truth data in a video, image sequence, image collection, or custom data source. Then, use the ground truth data to create algorithm training data. For object detectors, use the objectDetectorTrainingData function. For semantic segmentation networks, use the pixelLabelTrainingData function.

  1. Load data for labeling:

  2. Label data and select an automation algorithm: Create ROI and scene labels within the app. For more details, see:

    You can choose from one of the built-in algorithms or create your own custom algorithm to label objects in your data. To learn how to create your own automation algorithm, see Create Automation Algorithm for Labeling.

  3. Export labels: After labeling your data, you can export the labels to the workspace or save them to a file. The labels are exported as a groundTruth object. If your data source consists of multiple image collections, label the entire set of image collections to obtain an array of groundTruth objects. For details about sharing groundTruth objects, see Share and Store Labeled Ground Truth Data.

  4. Create training data: To create training data from the groundTruth object, use one of these functions:

    Sample the ground truth data by specifying a sampling factor. Sampling mitigates overtraining an object detector on similar samples. For objects created using a video file or custom data source, the objectDetectorTrainingData and pixelLabelTrainingData functions write images to disk for groundTruth.

  5. Train algorithm:

See Also

Apps

Functions

Related Topics