forked from onnx/models
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging new model zoo into existing onnx/models (onnx#75)
* 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
1 parent
b1458f1
commit 4aa95e1
Showing
40 changed files
with
9,292 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.