--- license: apache-2.0 base_model: - facebook/dinov3-vitl16-pretrain-lvd1689m pipeline_tag: image-feature-extraction tags: - product_recognition - image_embedding --- # Cat2Real-DINOv3-384 Cat2Real-DINOv3-384 is a product image embedding model fine-tuned from DINOv3. It maps the real-world product images and catalog packshots to the same embedding space for similarity search. # How to Get Started with the Model The example below demonstrates how to obtain an image embedding with the [AutoModel] class. ```python import torch import cv2 from torchvision import transforms from transformers import AutoImageProcessor, AutoModel from transformers.image_utils import load_image image_path = "your local image path" dim = 384 image = cv2.imread(image_path) image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) image = cv2.resize(image, (dim, dim)) transform = transforms.ToTensor() image = transform(image) image = image.unsqueeze(0) model_name = "zhanganyi88/Cat2Real-DINOv3-384" processor = AutoImageProcessor.from_pretrained(model_name) model = AutoModel.from_pretrained( model_name, device_map="auto", ) inputs = processor(images=image, return_tensors="pt").to(model.device) with torch.inference_mode(): outputs = model(**inputs) embedding = outputs.pooler_output print("embedding shape:", embedding.shape) ```