|
| 1 | +# Copyright (c) 2022 Intel Corporation |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +description: >- |
| 16 | + The "levit-128s" model is one of the LeViT models family: a hybrid neural network |
| 17 | + for fast inference image classification. The model is pre-trained on the ImageNet |
| 18 | + dataset. LeViT-128s model is a small LeViT variant that has 128 channels on input |
| 19 | + of the transformer stage and 2, 3 and 4 number of pairs of Attention and MLP blocks |
| 20 | + at 1, 2 and 3 model stages respectively. |
| 21 | +
|
| 22 | + The model input is a blob that consists of a single image of "1, 3, 224, 224" in |
| 23 | + "RGB" order. |
| 24 | +
|
| 25 | + The model output is typical object classifier for the 1000 different classifications |
| 26 | + matching with those in the ImageNet database. |
| 27 | +
|
| 28 | + For details see repository <https://github.com/rwightman/pytorch-image-models> and |
| 29 | + paper <https://arxiv.org/abs/2104.01136>. |
| 30 | +task_type: classification |
| 31 | +files: |
| 32 | + - name: timm-0.5.4-py3-none-any.whl |
| 33 | + size: 431537 |
| 34 | + checksum: e8f1967a8e2029fe21a43875132b4b123227b718abc35725d7f2b9fd0ef2062884ac3dd558570b51a780aad89bc375d6 |
| 35 | + source: https://files.pythonhosted.org/packages/49/65/a83208746dc9c0d70feff7874b49780ff110810feb528df4b0ecadcbee60/timm-0.5.4-py3-none-any.whl |
| 36 | + - name: LeViT-128S-96703c44.pth |
| 37 | + size: 32152063 |
| 38 | + checksum: ac05427904bc10921aa04e4c5970ce75429e4b77231b6735d584d570f4dfaebd9de42539d2200802f1d5a069e8e0071a |
| 39 | + original_source: https://dl.fbaipublicfiles.com/LeViT/LeViT-128S-96703c44.pth |
| 40 | + source: https://storage.openvinotoolkit.org/repositories/open_model_zoo/public/2022.2/levit-128s/LeViT-128S-96703c44.pth |
| 41 | +postprocessing: |
| 42 | + - $type: unpack_archive |
| 43 | + format: zip |
| 44 | + file: timm-0.5.4-py3-none-any.whl |
| 45 | +conversion_to_onnx_args: |
| 46 | + - --model-path=$dl_dir |
| 47 | + - --model-path=$config_dir |
| 48 | + - --model-name=create_levit |
| 49 | + - --import-module=model |
| 50 | + - --model-param=weights=r"$dl_dir/LeViT-128S-96703c44.pth" |
| 51 | + - --input-shape=1,3,224,224 |
| 52 | + - --input-names=image |
| 53 | + - --output-names=probs |
| 54 | + - --output-file=$conv_dir/levit-128s.onnx |
| 55 | +input_info: |
| 56 | + - name: image |
| 57 | + shape: [1, 3, 224, 224] |
| 58 | + layout: NCHW |
| 59 | +model_optimizer_args: |
| 60 | + - --input_model=$conv_dir/levit-128s.onnx |
| 61 | + - --mean_values=image[123.675,116.28,103.53] |
| 62 | + - --scale_values=image[58.395, 57.12, 57.375] |
| 63 | + - --reverse_input_channels |
| 64 | + - --output=probs |
| 65 | +framework: pytorch |
| 66 | +license: https://raw.githubusercontent.com/rwightman/pytorch-image-models/master/LICENSE |
0 commit comments