Randomly splitting Face (Image) Dataset
This Matlab function can be used to randomly split any given face (image) dataset into training and testing sets. The function considers class/person labels. For example, in ORL Face dataset, there are 40 persons each with 10 images; the function can randomly split the 10 images of each person into 5 train images and 5 test images, as follows:
load ORL_FaceDataSet % uploaded here
[TrainSet TestSet]=Split_DataSet(ORL_FaceDataSet, 10, 5, 5);
Note that, you can select different numbers of train and test images.
Cite As
Falah Alsaqre (2026). Randomly splitting Face (Image) Dataset (https://www.mathworks.com/matlabcentral/fileexchange/89759-randomly-splitting-face-image-dataset), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
