Downloads · 30 days
391
4% of all-time downloads
helenai/microsoft-swin-tiny-patch4-window7-224-ov
microsoft-swin-tiny-patch4-window7-224-ov is a image classification model from helenai. Use it when you need a label for an image. It is set up for transformers.
This is the microsoft/swin-tiny-patch4-window7-224 model converted to OpenVINO, for accellerated inference.
Downloads · 30 days
391
4% of all-time downloads
All-time downloads
9.8K
Public
Repo size
172 MB
Likes
1
Public
Click a slice to open those files.
.bin114 MB · 95%
From the Hugging Face model README
This is the microsoft/swin-tiny-patch4-window7-224 model converted to OpenVINO, for accellerated inference.
An example of how to do inference on this model:
from optimum.intel.openvino import OVModelForImageClassification
from transformers import AutoFeatureExtractor, pipeline
model_id = "helenai/microsoft-swin-tiny-patch4-window7-224"
model = OVModelForImageClassification.from_pretrained(model_id, compile=False)
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)
model.reshape(1,3, feature_extractor.size["height"], feature_extractor.size["width"])
model.compile()
ov_pipe = pipeline("image-classification", model=model, feature_extractor=feature_extractor)
image_url_or_path = "http://images.cocodataset.org/val2017/000000039769.jpg"
ov_pipe(image_url_or_path)