Run this model with HF Jobs
Run facebook/levit-192 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/facebook/levit-192. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/facebook/levit-192 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use facebook/levit-192 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/levit-192 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="facebook/levit-192") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("facebook/levit-192") model = AutoModelForImageClassification.from_pretrained("facebook/levit-192", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files15 unmodified lines1617181920212210 unmodified lines333435363738394015 unmodified lines# LeViTLeViT128S model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper [LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Graham et al. and first released in [this repository](https://github.com/facebookresearch/LeViT).Disclaimer: The team releasing LeViT did not write a model card for this model so this model card has been written by the Hugging Face team.10 unmodified linesurl = 'http://images.cocodataset.org/val2017/000000039769.jpg'image = Image.open(requests.get(url, stream=True).raw)feature_extractor = LevitFeatureExtractor.from_pretrained('anugunj/levit-192')model = LevitForImageClassificationWithTeacher.from_pretrained('anugunj/levit-192')inputs = feature_extractor(images=image, return_tensors="pt")outputs = model(**inputs)15 unmodified lines1617181920212210 unmodified lines333435363738394015 unmodified lines# LeViTLeViT-192 model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper [LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inference](https://arxiv.org/abs/2104.01136) by Graham et al. and first released in [this repository](https://github.com/facebookresearch/LeViT).Disclaimer: The team releasing LeViT did not write a model card for this model so this model card has been written by the Hugging Face team.10 unmodified linesurl = 'http://images.cocodataset.org/val2017/000000039769.jpg'image = Image.open(requests.get(url, stream=True).raw)feature_extractor = LevitFeatureExtractor.from_pretrained('facebook/levit-192')model = LevitForImageClassificationWithTeacher.from_pretrained('facebook/levit-192')inputs = feature_extractor(images=image, return_tensors="pt")outputs = model(**inputs)
README.md+3-3