File size: 1,429 Bytes
ecf84ef 6edb70d ecf84ef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ---
title: "ViT-Tiny"
subtitle: "Vision transformer image classifier"
category: "Vision AI"
model_type:
- "Classification"
license: apache-2.0
code: "https://huggingface.co/timm/vit_tiny_patch16_224.augreg_in21k"
tags:
- robotics-ai-suite
- vision-ai
- "chipset:ptl"
thumbnail: assets/thumbnail.png
---
ViT-Tiny image classification model, a [Geti™](https://github.com/open-edge-platform/geti)
build of [ViT-Tiny](https://huggingface.co/timm/vit_tiny_patch16_224.augreg_in21k)
converted to OpenVINO™ IR with FP16 weights. It maps an input image to class
scores. Model weights are hosted in the source repository
[OpenVINO/vit_tiny_cls-fp16-ov](https://huggingface.co/OpenVINO/vit_tiny_cls-fp16-ov).
# How to Use
1. Install required packages:
```sh
pip install openvino-model-api[huggingface]
```
2. Run model inference:
```python
import cv2
from model_api.models import Model
from model_api.visualizer import Visualizer
model = Model.from_pretrained("OpenVINO/vit_tiny_cls-fp16-ov")
image = cv2.imread("image.jpg")
result = model(image)
vis = Visualizer().render(image, result)
cv2.imwrite("output.jpg", vis)
```
# Legal information
The original model is distributed under the
[Apache-2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md)
license. More details can be found in the
[original model card](https://huggingface.co/timm/vit_tiny_patch16_224.augreg_in21k).
|