faceDetector
Description
The faceDetector
function object stores a pretrained RetinaFace
face detector used to detect faces in images. The RetinaFace face detector is trained on the
WIDER FACE data set. When creating the faceDetector
object, you can load a
RetinaFace face detector that uses either MobileNet-0.25 or ResNet-50 as the backbone
network.
Note
This functionality requires Deep Learning Toolbox™ and the Computer Vision Toolbox™ Model for RetinaFace Face Detection. You can install the Computer Vision Toolbox Model for RetinaFace Face Detection from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.
Creation
Syntax
Description
returns a RetinaFace
face detector object that uses MobileNet-0.25 as the backbone network. The lightweight
architecture of MobileNet-0.25 enables the face detector to maintain a good balance
between detection accuracy and computational efficiency.detector
= faceDetector
returns a pretrained RetinaFace face detector object that uses MobileNet-0.25 or ResNet-50
as the backbone network. You can specify the name of the face detector by using the input
argument detector
= faceDetector(name
)name
, which determines the choice of backbone
network.
specifies the image size to use for inference in addition to any combination of input
arguments from previous syntaxes.detector
= faceDetector(___,InputSize=inputSize
)
Input Arguments
Properties
Object Functions
detect | Detect faces in images using deep learning based face detector |
Examples
References
[1] Deng, Jiankang, Jia Guo, Evangelos Ververas, Irene Kotsia, and Stefanos Zafeiriou. “RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild.” In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 5202–11. Seattle, WA, USA: IEEE, 2020. https://doi.org/10.1109/CVPR42600.2020.00525.
[2] Yang, Shuo, Ping Luo, Chen Change Loy, and Xiaoou Tang. “WIDER FACE: A Face Detection Benchmark.” In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 5525–33. Las Vegas, NV, USA: IEEE, 2016. https://doi.org/10.1109/CVPR.2016.596.
Extended Capabilities
Version History
Introduced in R2025a