Wolfram Neural Net Repository
Immediate Computable Access to Neural Net Models
Represent a facial image as a vector
This model is also available through the built-in function FacialFeatures
Released in 2016 and based on the ResNet-101 architecture, this facial feature extractor was trained using specific data augmentation techniques tailored for this task. Starting from the CASIA-WebFace dataset, a far greater per-subject appearance was achieved by synthesizing pose, shape and expression variations from each single image.
Number of layers: 345 | Parameter count: 42,605,504 | Trained size: 172 MB |
Get the pre-trained network:
In[1]:= | ![]() |
Out[1]= | ![]() |
Compute a feature vector for a given image:
In[2]:= | ![]() |
Get the length of the feature vector:
In[3]:= | ![]() |
Out[3]= | ![]() |
Use a batch of face images:
In[4]:= | ![]() |
Compute the feature vectors for the batch of images, and obtain the dimensions of the features:
In[5]:= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Reduce the feature vectors to two dimensions with t-SNE:
In[7]:= | ![]() |
Out[7]= | ![]() |
In[8]:= | ![]() |
Out[8]= | ![]() |
Visualize the results:
In[9]:= | ![]() |
Out[9]= | ![]() |
Obtain the five closest faces to a given one:
In[10]:= | ![]() |
Out[10]= | ![]() |
Inspect the number of parameters of all arrays in the net:
In[11]:= | ![]() |
Out[11]= | ![]() |
Obtain the total number of parameters:
In[12]:= | ![]() |
Out[12]= | ![]() |
Obtain the layer type counts:
In[13]:= | ![]() |
Out[13]= | ![]() |
Display the summary graphic:
In[14]:= | ![]() |
Out[14]= | ![]() |
Wolfram Language 11.2 (September 2017) or above