<commit_before># [Multilinear Reconstruction](http://phg1024.github.io/MultilinearReconstruction)

## Bilinear Face Model
A bilinear face model can be represented with a third order  tensor $\mathcal C$. This bilinear model can be used to generate new face meshes given identity weights $\mathbf w_{id}$ and expression weights $\mathbf w_{exp}$:
\[\mathcal T = \mathcal C \times_{id} \mathbf w_{id} \times_{exp} \mathbf w_{exp}\]

## Single Image Reconstruction
A set of 2D facial landmarks is generated from bilinear face model $\mathcal C$ with proper identity weights $\mathbf w_{id}$, expression weights $\mathbf w_{exp}$, rigid transformation $\{\mathbf R, \mathbf t\}$ and camera projection matrix $\mathbf M_{proj}$:

\[ \mathbf L = \mathbf M_{proj}\left[\mathbf R \Pi(\mathcal C\times_{id} \mathbf w_{id} \times_{exp} \mathbf w_{exp}) + \mathbf t\right] \]
where $\mathbf L$ is a $n\times2$ matrix of 2D landmarks, and $\Pi$ is a vertex selector for the 3D face mesh.

The goal reconstruction is to recover all unknown parameters ($\mathbf w_{id}$, $\mathbf w_{exp}$, $\mathbf R$, $\mathbf t$, $\mathbf M_{proj}$) from input landmarks.

## Multiple Images Reconstruction
In case multiple images of the same person are available, the reconstruction makes use all images simultaneously to compute best estimation of the unknown parameters. By utilizing the constraint of identity weights, the reconstruction is expected to generate more accurate estimations.<commit_msg>Added data link.<commit_after># [Multilinear Reconstruction](http://phg1024.github.io/MultilinearReconstruction)

## Bilinear Face Model
A bilinear face model can be represented with a third order  tensor $\mathcal C$. This bilinear model can be used to generate new face meshes given identity weights $\mathbf w_{id}$ and expression weights $\mathbf w_{exp}$:
\[\mathcal T = \mathcal C \times_{id} \mathbf w_{id} \times_{exp} \mathbf w_{exp}\]

## Single Image Reconstruction
A set of 2D facial landmarks is generated from bilinear face model $\mathcal C$ with proper identity weights $\mathbf w_{id}$, expression weights $\mathbf w_{exp}$, rigid transformation $\{\mathbf R, \mathbf t\}$ and camera projection matrix $\mathbf M_{proj}$:

\[ \mathbf L = \mathbf M_{proj}\left[\mathbf R \Pi(\mathcal C\times_{id} \mathbf w_{id} \times_{exp} \mathbf w_{exp}) + \mathbf t\right] \]
where $\mathbf L$ is a $n\times2$ matrix of 2D landmarks, and $\Pi$ is a vertex selector for the 3D face mesh.

The goal reconstruction is to recover all unknown parameters ($\mathbf w_{id}$, $\mathbf w_{exp}$, $\mathbf R$, $\mathbf t$, $\mathbf M_{proj}$) from input landmarks.

## Multiple Images Reconstruction
In case multiple images of the same person are available, the reconstruction makes use all images simultaneously to compute best estimation of the unknown parameters. By utilizing the constraint of identity weights, the reconstruction is expected to generate more accurate estimations.

## Data
Some relevant data could be downloaded [here](https://goo.gl/sEB9Dk).
{'fraction_non_alphanumeric': 0.10909690177982861, 'fraction_numerical': 0.005603164139749505, 'mean_word_length': 4.737240075614367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4761299', 'n_tokens_mistral': 808, 'n_tokens_neox': 760, 'n_words': 391}