andreasjansson/clip-features

Replicate Explore Models

Summary

A model on Replicate that outputs CLIP ViT-L/14 features for text and images, allowing similarity computation between inputs.

andreasjansson / clip-features
Original Article
View Cached Full Text

Cached at: 05/08/26, 06:25 AM

# andreasjansson/clip-features – Replicate Source: [https://replicate.com/andreasjansson/clip-features](https://replicate.com/andreasjansson/clip-features) Cog model that outputs clip\-vit\-large\-patch14 features for text and images\. Run with the API: ``` import replicate import numpy as np from numpy.linalg import norm def cos_sim(a, b): return np.dot(a, b) / (norm(a) * norm(b)) inputs = """ a photo of a dog a cat two cats with remote controls https://replicate.com/api/models/cjwbw/clip-vit-large-patch14/files/36b04aec-efe2-4dea-9c9d-a5faca68b2b2/000000039769.jpg """ # run prediction model = replicate.models.get("andreasjansson/clip-features") outputs = model.predict(inputs=inputs) # output similarity of the three text lines with the image on line 4 for i in range(3): print(outputs[i]["input"]) print(cos_sim(outputs[i]["embedding"], outputs[3]["embedding"])) print() """ # run prediction model = replicate.models.get("andreasjansson/clip-features") outputs = model.predict(inputs=inputs) # output similarity of the three text lines with the image on line 4 for i in range(3): print(outputs[i].input) print(cos_sim(outputs[i].embedding, outputs[3].embedding)) print() ``` Model createdover 1 year ago

Similar Articles

krthr/clip-embeddings

Replicate Explore

A CLIP-based embedding model hosted on Replicate that generates 768-dimensional embeddings for both images and text using the clip-vit-large-patch14 architecture, costing ~$0.00022 per run.

CLIP: Connecting text and images

OpenAI Blog

CLIP is OpenAI's vision-language model that learns from text-image pairs from the internet, enabling zero-shot visual classification without task-specific training data. It addresses major limitations in traditional computer vision by reducing dependence on expensive labeled datasets and improving real-world generalization.

Hierarchical text-conditional image generation with CLIP latents

OpenAI Blog

OpenAI proposes a hierarchical two-stage model for text-conditional image generation using CLIP latents: a prior that generates CLIP image embeddings from text captions, and a diffusion-based decoder that generates images from embeddings. The approach improves image diversity and enables zero-shot language-guided image manipulations.

The Hyperspherical Geometry of CLIP Latent Space: A Semantic Mixture Model

arXiv cs.LG

This paper proposes modeling the CLIP latent space using Mixtures of von Mises–Fisher distributions on the unit hypersphere, capturing its directional and multimodal structure better than Gaussian assumptions. The model improves long-tailed and out-of-distribution detection and provides a semantic decomposition of CLIP embeddings.

abiruyt/text-extract-ocr

Replicate Explore

abiruyt/text-extract-ocr is an open-source OCR model available on Replicate, running on CPU with low cost and fast inference.