SupremoUGH's picture
first commit
ab8b628 unverified
raw
history blame contribute delete
294 Bytes
from transformers import ViTImageProcessor
from .utils import MODEL_DIR
processor = ViTImageProcessor.from_pretrained(MODEL_DIR)
def preprocess_image(image):
"""Preprocesses a single image for ViT inference."""
inputs = processor(images=image, return_tensors="pt")
return inputs