Contents

MLHandPoseClassifier.DataSource.labeledFiles(at:)

Creates a data source from a folder that contains images, each named after the hand pose it represents.

Declaration

case labeledFiles(at: URL)

Discussion

Create a hand-pose data source from a directory of images with the labeledFiles case. You must name each image file with a hand-pose label, followed by a period and an arbitrary string, ending with the image file’s extension. For example, you can name a hand-pose classifier’s training files as Peace.3.png, ThumbsUp.1.jpg, ThumbsUp.2.jpg, and so on.

In this example, these image names give a hand-pose classifier at least two class labels:

  • Peace - ThumbsUp

  • at: The URL to a folder in the file system that contains folders of hand pose images. The data source uses each file’s name before the first period as its classification label.

See Also

Creating a data source