Skip to content

Commit

Permalink
Merging new model zoo into existing onnx/models (onnx#75)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Delete base.md

* Update README.md

* Update README.md

* Create backlogs.md

* Create contribute.md

* Update README.md

* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update contribute.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* image folder

* Update README.md

* Update README.md

* Update README.md

* added models folder

* fixes

* Update and rename backlogs.md to squeezenet.md

* Create resnet.md

* Create vgg.md

* Create mobilenet.md

* Change layout - add model pages

* Update README.md

* Update README.md

* added sqnet train nb

* Update train_notebook_squeezenet.ipynb

* Delete train_notebook_squeezenet.ipynb

* added sqnet train nb

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* added test script

* created folders for models

* added extract imagenet script

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Rename train_notebook_squeezenet.ipynb to train_squeezenet.ipynb

* Update squeezenet.md

* adding artifacts for resnet

* minor fix

* updated train_squeezenet

* updated imagenet_verify

* Update README.md

* Update README.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update resnet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update squeezenet.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* resnet training notebook

* fix documentation

* changing name

* renaming squeezenet

* renamed files

* fixing link

* fixed format

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update imagenet_verify.ipynb

* updated train_squeezenet

* updated train_squeezenet

* Update README.md

* added train_vgg

* fix train_vgg

* Update README.md

* Update README.md

* Create imagenet_prep.md

* Update README.md

* Update README.md

* Update README.md

* Update imagenet_prep.md

* Update imagenet_prep.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update contribute.md

* documentation for mobilenet

* add mobilenet training

* fixed link

* fix spelling

* Update README.md

* fixed readme

* fixed imagenet_inference

* added MMS info

* initial feedback

* Update README.md

* Update README.md

* Update README.md

* Update contribute.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* comments and edits on the notebooks and imagenet prep

* added onnx links, fixed CamelCase and add accuracy tables

* fixed formatting

* fixed formatting

* fixed camelcase and contrbution section

* added model description

* added keywords and contributions

* added model server description

* Fixed file

* fixed landing page

* add image placeholders and categories

* fixed model links

* fixed links for real this time

* fixed resnet

* fixed resnet

* updated training and inference notebooks

* fixed models

* fixed models

* added synset

* synset

* removed DS store

* fixed spell

* fixed contri page

* fixed contri page

* fixed contri page

* updated imagenet_verify

* updated extract_imagenet.py, fixed archive sizes, changed name of imagenet_verify, fixed links

* updated target

* version differences

* fixed preprocess

* fixed

* updated readmes, moved folders

* fixed links

* removed DS

* removed DS

* fixed spacing

* push line brreaks

* review commenst

* addressed PR comments

* fixed formatting

* minor updates

* fixed code

* updates after feedback

* fixed links

* Delete .DS_Store

* added PR template

* added model use-cases

* added badges

* Updates after feedback

* fixed links, added imagenet licence info

* formatting

* update wip models

* minor edits

* WaveNet is not based on GAN framework

Rename the heading to Generative Models instead of GAN because WaveNet doesn't involve GAN training framework.

* added license, onnx version, removed MMS, MXNet code

* added pre/post-process scripts, updated PR template, model readme

* typos and grammar fixes

* added sample test data, updated val acc

* fixed formatting

* Update PULL_REQUEST_TEMPLATE.md

* remove README

* update README

* fixed links

* removed keywords, updated notebooks, fixed typos

* added model checker info

* merged ack with ref

* added arcface model

* updated PR temp, image name, imagenet pre/post

* added md5 checksum, opset version

* fixed links

* Update PULL_REQUEST_TEMPLATE.md
  • Loading branch information
abhinavs95 authored and houseroad committed Jul 9, 2018
1 parent b1458f1 commit 4aa95e1
Show file tree
Hide file tree
Showing 40 changed files with 9,292 additions and 20 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Jupyter Notebook
.ipynb_checkpoints

# virtualenv
.venv
venv/
ENV/

# mac
.DS_Store

# PyCharm
.idea/
70 changes: 70 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Model Name

## Use-cases
Model use cases

## Description
Description of model

## Model

|Model |Download |Checksum| Download (with sample test data)|ONNX version|Opset version|Accuracy |
|-------------|:--------------|:--------------|:--------------|:--------------|:--------------|:--------------|
|Model Name |ONNX Model download link with size | MD5 checksum for the ONNX model| tar file containing ONNX model and synthetic test data (in .pb format)|ONNX version used for conversion| Opset version used for conversion|Accuracy values |

All ONNX models must pass the ONNX model checker before contribution. The snippet of code below can be used to perform the check. If any errors are encountered, it implies the check has failed.

```
import onnx
from onnx import checker
model_proto = onnx.load("path to .onnx file")
checker.check_model(model_proto)
```

<hr>

## Inference
Step by step instructions on how to use the pretrained model and link to an example notebook/code. This section should ideally contain:

### Input to model
Input to network (Example: 224x224 pixels in RGB)

### Preprocessing steps
Preprocessing required

### Output of model
Output of network

### Postprocessing steps
Post processing and meaning of output
<hr>

## Dataset (Train and validation)
This section should discuss datasets and any preparation steps if required.
<hr>

## Validation accuracy
Details of experiments leading to accuracy and comparison with the reference paper.
<hr>

## Training
Training details (preprocessing, hyperparameters, resources and environment) along with link to a training notebook (optional).

Also clarify in case the model is not trained from scratch and include the source/process used to obtain the ONNX model.
<hr>

## Validation
Validation script/notebook used to obtain accuracy reported above along with details of how to use it and reproduce accuracy.
<hr>

## References
Link to references
<hr>

## Contributors
Contributors' name
<hr>

## License
Add license information
<hr>
161 changes: 141 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,159 @@
# ONNX Models
# Open Neural Network eXchange (ONNX) Model Zoo

This is a repository for storing ONNX models.
[![Generic badge](https://img.shields.io/badge/Status-Work_In_Progress-red.svg)](#)
[![Generic badge](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](contribute.md)

### Models
<p align="center">
<img src="images/ONNX_Model_Zoo_Graphics.png" width="60%"/>
</p>

- [BVLC AlexNet](bvlc_alexnet) (244 MByte)
The ONNX Model Zoo is a collection of pre-trained models for state-of-the-art models in deep learning, available in the ONNX format. Accompanying each model are [Jupyter](http://jupyter.org) notebooks for model training and running inference with the trained model. The notebooks are written in Python and include links to the training dataset as well as references to the original paper that describes the model architecture. The notebooks can be exported and run as python(.py) files.

- [BVLC GoogleNet](bvlc_googlenet) (28 MByte)
## What is ONNX?
The Open Neural Network eXchange ([ONNX](http://onnx.ai)) is a open format to represent deep learning models. With ONNX, developers can move models between state-of-the-art tools and choose the combination that is best for them. ONNX is developed and supported by a community of partners.

- [BVLC CaffeNet](bvlc_reference_caffenet) (244 MByte)
## Models

- [BVLC R-CNN ILSVRC13](bvlc_reference_rcnn_ilsvrc13) (231 MByte)
### Image Classification
This collection of models take images as input, then classifies the major objects in the images into a set of predefined classes.

- [DenseNet-121](densenet121) (33 MByte)
|Model Class |Reference |Description |
|-|-|-|
|<b>[MobileNet](models/image_classification/mobilenet/)</b>|[Sandler et al.](https://arxiv.org/abs/1801.04381)|Efficient CNN model for mobile and embedded vision applications. <br>Top-5 error from paper - ~10%|
|<b>[ResNet](models/image_classification/resnet/)</b>|[He et al.](https://arxiv.org/abs/1512.03385), [He et al.](https://arxiv.org/abs/1603.05027)|Very deep CNN model (up to 152 layers), won the ImageNet Challenge in 2015. <br>Top-5 error from paper - ~6%|
|<b>[SqueezeNet](models/image_classification/squeezenet/)</b>|[Iandola et al.](https://arxiv.org/abs/1602.07360)|A light-weight CNN providing Alexnet level accuracy with 50X fewer parameters. <br>Top-5 error from paper - ~20%|
|<b>[VGG](models/image_classification/vgg/)</b>|[Simonyan et al.](https://arxiv.org/abs/1409.1556)|Deep CNN model (upto 19 layers) which won the ImageNet Challenge in 2014. <br>Top-5 error from paper - ~8%|
|<b>[Bvlc_AlexNet](bvlc_alexnet)</b>|[Krizhevsky et al.](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)|Deep CNN model for Image Classification |
|<b>[Bvlc_GoogleNet](bvlc_googlenet)</b>|[Szegedy et al.](https://arxiv.org/pdf/1409.4842.pdf)|Deep CNN model for Image Classification|
|<b>[Bvlc_reference_CaffeNet](bvlc_reference_caffenet)</b>|[Krizhevsky et al.](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)|Deep CNN model for Image Classification|
|<b>[Bvlc_reference_RCNN_ILSVRC13](bvlc_reference_rcnn_ilsvrc13)</b>|[Girshick et al.](https://arxiv.org/abs/1311.2524)|Deep CNN model for Image Classification|
|<b>[DenseNet121](densenet121)</b>|[Huang et al.](https://arxiv.org/abs/1608.06993)|Deep CNN model for Image Classification|
|<b>[Inception_v1](inception_v1)</b>|[Szegedy et al.](https://arxiv.org/abs/1409.4842)|Deep CNN model for Image Classification|
|<b>[Inception_v2](inception_v2)</b>|[Szegedy et al.](https://arxiv.org/abs/1512.00567)|Deep CNN model for Image Classification|
|<b>[ShuffleNet](shufflenet)</b>|[Zhang et al.](https://arxiv.org/abs/1707.01083)|Deep CNN model for Image Classification|
|<b>[ZFNet512](zfnet512)</b>|[Zeiler et al.](https://arxiv.org/abs/1311.2901)|Deep CNN model for Image Classification|

- [Inception-v1](inception_v1) (28 MByte)
<hr>

- [Inception-v2](inception_v2) (45 MByte)
### Face Detection and Recognition
These models detect and/or recognize human faces in images. Some more popular models are used for detection/recognition of celebrity faces, gender, age, and emotions.

- [ResNet-50](resnet50) (103 MByte)
|Model Class |Reference |Description |
|-|-|-|
|<b>[ArcFace](models/face_recognition/ArcFace/)</b>|[Deng et al.](https://arxiv.org/abs/1801.07698)|ArcFace is a CNN based model for face recognition which learns discriminative features of faces and produces embeddings for input face images.|
|<b>CNN Cascade</b>|[Li et al.](https://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Li_A_Convolutional_Neural_2015_CVPR_paper.pdf)|[contribute](contribute.md)|

- [ShuffleNet](shufflenet) (5.3 MByte)
<hr>

- [SqueezeNet](squeezenet) (5 MByte)
### Object Detection & Segmentation
These models detect the presence of multiple objects in an image and segment out areas of the image where the objects are detected.

- [VGG-19](vgg19) (575 MByte)
|Model Class |Reference |Description |
|-|-|-|
|<b>Tiny_YOLOv2</b>|[Redmon et al.](https://arxiv.org/pdf/1612.08242.pdf)|Deep CNN model for Object Detection|
|<b>SSD</b>|[Liu et al.](https://arxiv.org/abs/1512.02325)|[contribute](contribute.md)|
|<b>Faster-RCNN</b>|[Ren et al.](https://arxiv.org/abs/1506.01497)|[contribute](contribute.md)|
|<b>Mask-RCNN</b>|[He et al.](https://arxiv.org/abs/1703.06870)|[contribute](contribute.md)|
|<b>YOLO v2</b>|[Redmon et al.](https://arxiv.org/abs/1612.08242)|[contribute](contribute.md)|
|<b>YOLO v3</b>|[Redmon et al.](https://pjreddie.com/media/files/papers/YOLOv3.pdf)|[contribute](contribute.md)|

- [ZFNet-512](zfnet512) (349 MByte)
<hr>

- [MNIST](mnist) (26 kByte)
### Semantic Segmentation
Semantic segmentation models will identify multiple classes of objects in an image and provide information on the areas of the image that object was detected.

- [Emotion-FERPlus](emotion_ferplus) (34 MByte)
|Model Class |Reference |Description |
|-|-|-|
|<b>FCN</b>|[Long et al.](https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf)|[contribute](contribute.md)|

- [Tiny-YOLOv2](tiny_yolov2) (61 MByte)
<hr>

### Usage
### Emotion Recognition

|Model Class |Reference |Description |
|-|-|-|
|[Emotion FerPlus](emotion_ferplus) |[Barsoum et al.](https://arxiv.org/abs/1608.01041) |Deep CNN model for Emotion recognition|
<hr>

### Hand Written Digit Recognition

|Model Class |Reference |Description |
|-|-|-|
|[MNIST- Hand Written Digit Recognition](mnist) |[Convolutional Neural Network with MNIST](https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_103D_MNIST_ConvolutionalNeuralNetwork.ipynb) |Deep CNN model for hand written digit identification|
<hr>

### Super Resolution

|Model Class |Reference |Description |
|-|-|-|
|Image Super resolution using deep convolutional networks | [Dong et al.](http://ieeexplore.ieee.org/document/7115171/?reload=true) |[contribute](contribute.md)|
<hr>

### Gender Detection

|Model Class |Reference |Description |
|-|-|-|
|Age and Gender Classification using Convolutional Neural Networks| [Levi et al.](https://www.openu.ac.il/home/hassner/projects/cnn_agegender/CNN_AgeGenderEstimation.pdf) |[contribute](contribute.md)|
<hr>

### Style Transfer
|Model Class |Reference |Description |
|-|-|-|
|Unpaired Image to Image Translation using Cycle consistent Adversarial Network|[Zhu et al.](https://arxiv.org/abs/1703.10593)|[contribute](contribute.md)|
<hr>

### Machine Translation

|Model Class |Reference |Description |
|-|-|-|
|Neural Machine Translation by jointly learning to align and translate| [Bahdanau et al.](https://arxiv.org/abs/1409.0473)|[contribute](contribute.md)|
|Google's Neural Machine Translation System| [Wu et al.](https://arxiv.org/abs/1609.08144)|[contribute](contribute.md)|
<hr>

### Speech Processing

|Model Class |Reference |Description |
|-|-|-|
|Speech recognition with deep recurrent neural networks| [Graves et al.](https://www.cs.toronto.edu/~fritz/absps/RNN13.pdf)|[contribute](contribute.md)|
|Deep voice: Real time neural text to speech | [Arik et al.](https://arxiv.org/abs/1702.07825) |[contribute](contribute.md)|

<hr>

### Language Modelling

|Model Class |Reference |Description |
|-|-|-|
|Deep Neural Network Language Models| [Arisoy et al.](https://pdfs.semanticscholar.org/a177/45f1d7045636577bcd5d513620df5860e9e5.pdf) |[contribute](contribute.md)|
<hr>

### Visual Question Answering & Dialog

|Model Class |Reference |Description |
|-|-|-|
|VQA: Visual Question Answering |[Agrawal et al.](https://arxiv.org/pdf/1505.00468v6.pdf)|[contribute](contribute.md)|
|Yin and Yang: Balancing and Answering Binary Visual Questions |[Zhang et al.](https://arxiv.org/pdf/1511.05099.pdf)|[contribute](contribute.md)|
|Making the V in VQA Matter|[Goyal et al.](https://arxiv.org/pdf/1612.00837.pdf)|[contribute](contribute.md)|
|Visual Dialog| [Das et al.](https://arxiv.org/abs/1611.08669)|[contribute](contribute.md)|

<hr>

### Other interesting models

|Model Class |Reference |Description |
|-|-|-|
|Text to Image| [Generative Adversarial Text to image Synthesis ](https://arxiv.org/abs/1605.05396)|[contribute](contribute.md)|
|Sound Generative models| [WaveNet: A Generative Model for Raw Audio ](https://arxiv.org/abs/1609.03499)|[contribute](contribute.md)|
|Time Series Forecasting| [Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks ](https://arxiv.org/pdf/1703.07015.pdf)|[contribute](contribute.md)|
|Recommender systems|[DropoutNet: Addressing Cold Start in Recommender Systems](http://www.cs.toronto.edu/~mvolkovs/nips2017_deepcf.pdf)|[contribute](contribute.md)|
|Collaborative filtering||[contribute](contribute.md)|
|Autoencoders||[contribute](contribute.md)|

<hr>

## Model Visualization
You can see visualizations of each model's network architecture by using [Netron](https://lutzroeder.github.io/Netron).

## Usage

Every ONNX backend should support running these models out of the box. After downloading and extracting the tarball of each model, there should be

Expand Down Expand Up @@ -102,7 +221,9 @@ outputs = list(backend.run_model(model, inputs))
for ref_o, o in zip(ref_outputs, outputs):
np.testing.assert_almost_equal(ref_o, o)
```
## Contributions
Do you want to contribute a model? To get started, pick any model presented above with the [contribute](contribute.md) link under the Description column. The links point to a page containing guidelines for making a contribution.

# License

[MIT License](LICENSE)
[MIT License](LICENSE)
5 changes: 5 additions & 0 deletions contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# How to Contribute to the Model Zoo

To contribute a new model, create a [pull request](https://github.com/abhinavs95/modelzoo/pull/new/). A pre-defined pull request [template](PULL_REQUEST_TEMPLATE.md) is loaded when creating a new pull request, which describes all the artifacts required for making the contribution.

View an [example submission](./models/image_classification/resnet/README.md) to get a sense of the final output.
Binary file added images/ONNX Model Zoo Graphics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ONNX_Model_Zoo_Graphics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ONNX_logo_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions models/face_recognition/ArcFace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ArcFace

## Use cases
For each face image, the model produces a fixed length embedding vector corresponding to the face in the image. The vectors from face images of a single person have a higher similarity than that from different persons. Therefore, the model is primarily used for face recognition/verification. It can also be used in other applications like facial feature based clustering.

## Description
ArcFace is a CNN based model for face recognition which learns discriminative features of faces and produces embeddings for input face images. To enhance the discriminative power of softmax loss, a novel supervisor signal called additive angular margin (ArcFace) is used here as an additive term in the softmax loss. ArcFace can use a variety of CNN networks as its backend, each having different accuracy and performance.

## Model
The model LResNet100E-IR is an ArcFace model that uses ResNet100 as a backend with modified input and output layers.

|Model |Download |Checksum| Download (with sample test data)|ONNX version|Opset version|LFW * accuracy (%)|CFP-FF * accuracy (%)|CFP-FP * accuracy (%)|AgeDB-30 * accuracy (%)|
|-------------|:--------------|:--------------|:--------------|:--------------|:--------------|:--------------|:--------------|:--------------|:--------------|
|LResNet100E-IR| [248.9 MB](https://s3.amazonaws.com/onnx-model-zoo/arcface/resnet100/resnet100.onnx)|[MD5](https://s3.amazonaws.com/onnx-model-zoo/arcface/resnet100/resnet100-md5.txt)| [226.6 MB](https://s3.amazonaws.com/onnx-model-zoo/arcface/resnet100/resnet100.tar.gz) | 1.2.1 |7|99.77 | 99.83 | 94.21 | 97.87|

\* each of the accuracy metrics correspond to accuracies on different [validation sets](#val_data) each with their own [validation methods](#val_method).

## Inference
We used MXNet as framework to perform inference. View the notebook [arcface_inference](arcface_inference.ipynb) to understand how to use above models for doing inference. A brief description of the inference process is provided below:

### Input
The input to the model should preferably be images containing a single face in each image. There are no constraints on the size of the image. The example displayed in the inference notebook was done using jpeg images.

### Preprocessing
In order to input only face pixels into the network, all input images are passed through a pretrained face detection and alignment model, [MTCNN detector](https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html). The output of this model are landmark points and a bounding box corresponding to the face in the image. Using this output, the image is processed using affine transforms to generate the aligned face images which are input to the network. Check [face_preprocess.py](face_preprocess.py) and [inference notebook](arcface_inference.ipynb) for code.

### Output
The model outputs an embedding vector for the input face images. The size of the vector is tunable (512 for LResNet100E-IR).

### Postprocessing
The post-processing involves normalizing the output embedding vectors to have unit length. Check [face_postprocess.py](face_postprocess.py) for code.

To do quick inference with the model, check out [Model Server](https://github.com/awslabs/mxnet-model-server/blob/master/docs/model_zoo.md/#arcface-resnet100_onnx).

## Dataset
### Training
**Refined MS-Celeb-1M** is a refined version of the [MS-Celeb-1M dataset](https://arxiv.org/abs/1607.08221). The refined version contains 3.8 million images from 85000 unique identities.

### <a name="val_data"></a>Validation
The following three datasets are used for validation:
* **Labelled Faces in the Wild (LFW)** contains 13233 web-collected images from 5749 identities with large variations in pose, exposure and illuminations.

* **Celebrities in Frontal Profile (CFP)** consists of 500 subjects, each with 10 frontal and 4 profile images.

* **Age Database (AgeDB)** is a dataset with large variations in pose, expression, illuminations, and age. AgeDB contains 12240 images of 440 distinct subjects, such as actors, actresses, writers, scientists, and politicians. Each image is annotated with respect to the identity, age and gender attribute. The minimum and maximum ages are 3 and 101, respectively. The average age range for each subject is 49 years. There are four groups of test data with different year gaps (5, 10, 20 and 30 years respectively). The last subset, AgeDB-30 is used here as its the most challenging.

### Setup
1. Download the file `faces_ms1m_112x112.zip` : [8.1 GB](https://s3.amazonaws.com/onnx-model-zoo/arcface/dataset/faces_ms1m_112x112.zip)
2. Unzip `faces_ms1m_112x112.zip` to produce a folder of the same name. Use path to this folder in the notebooks. This folder contains the training as well as the validation datasets.

## Validation accuracy
The accuracies obtained by the models on the validation set are mentioned above. Maximum deviation of 0.2%(CFP-FP) in accuracy is observed compared to that in the paper.

## Training
We used MXNet as framework to perform training. View the [training notebook](train_arcface.ipynb) to understand details for parameters and network for each of the above variants of ArcFace.

## <a name="val_method"></a>Validation
The validation techniques for the three validation sets are described below:
* **LFW** : Face verification accuracy on 6000 face pairs.

* **CFP** : Two types of face verification - Frontal-Frontal (FF) and Frontal-Profile (FP), each having 10 folders with 350 same-person pairs and 350 different person pairs.

* **AgeDB** : Validation is only performed on AgeDB-30 as mentioned above, with a metric same as LFW.

We used MXNet as framework to perform validation. Use the notebook [arcface_validation](arcface_validation.ipynb) to verify the accuracy of the model on the validation set. Make sure to specify the appropriate model name in the notebook.

## References
* All models are from the paper [ArcFace: Additive Angular Margin Loss for Deep Face Recognition](https://arxiv.org/abs/1801.07698).
* Original training dataset from the paper [MS-Celeb-1M: A Dataset and Benchmark for Large-Scale Face Recognition](https://arxiv.org/abs/1607.08221).
* [InsightFace repo](https://github.com/deepinsight/insightface), [MXNet](http://mxnet.incubator.apache.org)

## Contributors
[abhinavs95](https://github.com/abhinavs95) (Amazon AI)

## License
Apache 2.0
Loading

0 comments on commit 4aa95e1

Please sign in to comment.