Practical overview
When it fits
Use it when you need the repository’s documented research pipeline for preprocessing face datasets, training a Sphereface model, or investigating angular-softmax embeddings.
Who it is for
- Researchers reproducing or adapting the SphereFace face-recognition method.
- Developers studying angular-softmax face embeddings and a Caffe/Matlab face-processing workflow.
Documented uses
- Prepare face datasets by detecting faces and landmarks and aligning images.
- Train a Sphereface model using aligned CASIA-WebFace images.
- Evaluate face recognition using LFW image pairs.
Requirements & limits
The repository is public and released under the MIT License.
- The original workflow depends on Matlab, Caffe/matcaffe, MTCNN, and Piotr’s Image & Video Matlab Toolbox.
- The README describes the 20-layer CNN as its example and names 4-, 20-, 36- and 64-layer architectures.
- The repository points users seeking an easier-to-use PyTorch reimplementation to a separate project.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare face datasets for Sphereface training
Run the documented preprocessing stage to detect and align faces from CASIA-WebFace and LFW.
Before you start
- Clone the Sphereface repository and build Caffe and matcaffe.
- Install Matlab, MTCNN, and Piotr’s Image & Video Matlab Toolbox.
- Place the CASIA-WebFace training set and LFW test set in the preprocessing data directory.
Steps
In the preprocessing directory, retrieve and unpack the LFW data using the documented script and commands.
Run the face-detection demo in Matlab to detect faces and landmarks in both datasets.
Run the face-alignment demo in Matlab to generate canonical-pose aligned image folders.
Expected outcome
The preprocessing stage creates a data list and aligned CASIA-WebFace and LFW image folders for the later training and test stages.
Guide limitations
- The repository documents this as part of a larger pipeline; training and testing require their own subsequent stages.
- The instructions rely on Matlab, Caffe/matcaffe, MTCNN, and the named datasets.
Train the documented Sphereface model
Prepare aligned CASIA-WebFace training images and invoke the repository’s documented Caffe training script.
Before you start
- Complete the repository setup, including Matlab, Caffe and matcaffe.
- Complete preprocessing and place the aligned CASIA-WebFace images in the training data directory.
Steps
Move the aligned CASIA-WebFace folder from the preprocessing results into the training data directory.
Run the Matlab list-generation script to create the training image-and-label list.
Invoke the documented Sphereface training script with the listed device argument.
Expected outcome
The README says training places a Caffe model file and training log in the result directory.
Guide limitations
- The documented example is tied to the repository’s Caffe/Matlab setup and prepared CASIA-WebFace data.
- The instructions describe a research example, not a hosted service or a guaranteed result on other data.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- wy1iu/sphereface · Official homepage title · retained in its source language
Related options
SphereFace PyTorch re-implementation — The repository README points to this separate reimplementation for users seeking a PyTorch version.

