# Wolfram Neural Net Repository

Immediate Computable Access to Neural Net Models

Predict a person's age from an image of their face

Originally released in 2015 as a pre-trained model for the launch of the IMDB-WIKI dataset by the Computer Vision Lab at ETH Zurich, this model is based on the VGG-16 architecture and is designed to run on cropped images of faces only. The model was then fine-tuned on the dataset for the 2015 Looking At People Age Estimation Challenge. An ensemble of these models won first place at the challenge.

Number of layers: 40 | Parameter count: 134,674,341 | Trained size: 540 MB |

- IMDB-WIKI, a dataset consisting of 520,000 images of faces, each featuring labels for gender and age. Looking at People Apparent Age V1, a dataset consisting of 5,000 images, each displaying a single individual, labeled with the apparent age.

This model achieves 0.264975 ε-error on the Looking at People Apparent Age V1 dataset.

Get the pre-trained net:

In[1]:= |

Out[1]= |

Guess the age of a person from a photograph. First, obtain the trained net:

In[2]:= |

Out[2]= |

Obtain the probability distribution over all possible ages:

In[3]:= |

Out[3]= |

Plot the probability distribution over possible ages:

In[4]:= |

Out[4]= |

The recommended estimator of the age is the mean of the probability mass function:

In[5]:= |

Out[5]= |

By default, the mode is used as the estimator:

In[6]:= |

Out[6]= |

This net is designed to work with cropped images of faces only. If the photograph is not a facial image, the results may be unexpected:

In[7]:= |

In[8]:= |

Out[8]= |

Crop the photograph:

In[9]:= |

Out[9]= |

Guess the age of a person from the cropped image:

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]= |

Export the net into a format that can be opened in MXNet:

In[15]:= |

Out[15]= |

Export also creates a *net.params *file containing parameters:

In[16]:= |

Out[16]= |

Get the size of the parameter file:

In[17]:= |

Out[17]= |

The size is similar to the byte count of the resource object:

In[18]:= |

Out[18]= |

Represent the MXNet net as a graph:

In[19]:= |

Out[19]= |

Wolfram Language 11.2 (September 2017) or above

- R. Rothe, R. Timofte, L. Van Gool, "Deep Expectation of Real and Apparent Age from a Single Image without Facial Landmarks," International Journal of Computer Vision (IJCV) (2016)
- Available from: https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki