This project hasn't been updated in a long time, so it no longer appears on the homepage, categories, or search results — the data is preserved and this page still works normally.
Modelzero-shot-image-classification
Marqo

Marqo/marqo-fashionCLIP

!GitHub(https://img.shields.io/badge/GitHub-black?logo=github)(https://github.com/marqo-ai/marqo-FashionCLIP) Marqo-FashionCLIP Model Card Marqo-FashionCLIP and Marqo-FashionSigLIP outperform the previous state-of-the-art fashion CLIP models (see res...

39likes
32.3kdownloads
0views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: multimodal retrieval

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: fashion

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: multimodal retrieval

#1 Repository Của Tháng

GitHub

Marqo-FashionCLIP Model Card

Marqo-FashionCLIP and Marqo-FashionSigLIP outperform the previous state-of-the-art fashion CLIP models (see results below). Marqo-FashionCLIP leverages Generalised Contrastive Learning (GCL) which allows the model to be trained on not just text descriptions but also categories, style, colors, materials, keywords and fine-details to provide highly relevant search results on fashion products. The model was fine-tuned from ViT-B-16 (laion2b_s34b_b88k).

Github Page: Marqo-FashionCLIP

Blog: Marqo Blog

Usage

Hugging Face

The model can be loaded with AutoModel by

from transformers import AutoModel, AutoProcessor
model = AutoModel.from_pretrained('Marqo/marqo-fashionCLIP', trust_remote_code=True)
processor = AutoProcessor.from_pretrained('Marqo/marqo-fashionCLIP', trust_remote_code=True)

import torch
from PIL import Image

image = [Image.open("docs/fashion-hippo.png")]
text = ["a hat", "a t-shirt", "shoes"]
processed = processor(text=text, images=image, padding='max_length', return_tensors="pt")

with torch.no_grad():
    image_features = model.get_image_features(processed['pixel_values'], normalize=True)
    text_features = model.get_text_features(processed['input_ids'], normalize=True)

    text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)

print("Label probs:", text_probs)
# [0.99990773, 0.00006382, 0.00002847]

OpenCLIP

The model can be seamlessly used with OpenCLIP by

import open_clip
model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:Marqo/marqo-fashionCLIP')
tokenizer = open_clip.get_tokenizer('hf-hub:Marqo/marqo-fashionCLIP')

import torch
from PIL import Image

image = preprocess_val(Image.open("docs/fashion-hippo.png")).unsqueeze(0)
text = tokenizer(["a hat", "a t-shirt", "shoes"])

with torch.no_grad(), torch.cuda.amp.autocast():
    image_features = model.encode_image(image, normalize=True)
    text_features = model.encode_text(text, normalize=True)

    text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)

print("Label probs:", text_probs)
# [0.9998498302475922, 0.000119267522939106, 0.000030902229468640687]

Transformers.js

You can also run the model in JavaScript with the Transformers.js library.

First, install it from NPM using:

npm i @huggingface/transformers

Then, compute embeddings as follows:

import { CLIPTextModelWithProjection, CLIPVisionModelWithProjection, AutoTokenizer, AutoProcessor, RawImage, softmax, dot } from '@huggingface/transformers';

const model_id = 'Marqo/marqo-fashionCLIP';

// Load tokenizer and text model
const tokenizer = await AutoTokenizer.from_pretrained(model_id);
const text_model = await CLIPTextModelWithProjection.from_pretrained(model_id);

// Load processor and vision model
const processor = await AutoProcessor.from_pretrained(model_id);
const vision_model = await CLIPVisionModelWithProjection.from_pretrained(model_id);

// Run tokenization
const texts = ['a hat', 'a t-shirt', 'shoes'];
const text_inputs = tokenizer(texts, { padding: 'max_length', truncation: true });

// Compute text embeddings
const { text_embeds } = await text_model(text_inputs);

// Read image and run processor
const image = await RawImage.read('https://raw.githubusercontent.com/marqo-ai/marqo-FashionCLIP/main/docs/fashion-hippo.png');
const image_inputs = await processor(image);

// Compute vision embeddings
const { image_embeds } = await vision_model(image_inputs);

// Compute similarity scores
const normalized_text_embeds = text_embeds.normalize().tolist();
const normalized_image_embeds = image_embeds.normalize().tolist()[0];

const text_probs = softmax(normalized_text_embeds.map((text_embed) => 
    100.0 * dot(normalized_image_embeds, text_embed)
));
console.log(text_probs);
// [0.9998498302475922, 0.000119267522939106, 0.000030902229468640687]

Benchmark Results

Average evaluation results on 6 public multimodal fashion datasets (Atlas, DeepFashion (In-shop), DeepFashion (Multimodal), Fashion200k, KAGL, and Polyvore) are reported below:

Text-To-Image (Averaged across 6 datasets)

ModelAvgRecallRecall@1Recall@10MRR
Marqo-FashionCLIP0.1920.0940.2900.200
FashionCLIP2.00.1630.0770.2490.165
OpenFashionCLIP0.1320.0600.2040.135
ViT-B-16-laion2b_s34b_b88k0.1740.0880.2610.180

Category-To-Product (Averaged across 5 datasets)

ModelAvgPP@1P@10MRR
Marqo-FashionCLIP0.7050.7340.6760.776
FashionCLIP2.00.6840.6810.6860.741
OpenFashionCLIP0.6460.6530.6390.720
ViT-B-16-laion2b_s34b_b88k0.6620.6730.6520.743

Sub-Category-To-Product (Averaged across 4 datasets)

ModelAvgPP@1P@10MRR
Marqo-FashionCLIP0.7070.7470.6670.772
FashionCLIP2.00.6570.6760.6380.733
OpenFashionCLIP0.5980.6190.5780.689
ViT-B-16-laion2b_s34b_b88k0.6380.6510.6240.712

Similar Projects

Discover other similar projects and AI models.

Modelzero-shot-image-classification
Marqo/marqo-fashionSigLIP

Marqo-FashionSigLIP Model Card !GitHub(https://img.shields.io/badge/GitHub-black?logo=github)(https://github.com/marqo-ai/marqo-FashionCLIP) Marqo Fashion Siglip 2 is available. marqo-fashion-SigLip-2 has shown a further 78% improvement in MMR and r...

♥0
361.4k
Feb 18, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
190.2M
Jun 1, 2026
Modeltext-ranking
cross-encoder/ms-marco-MiniLM-L6-v2

Cross-Encoder for MS Marco This model was trained on the MS Marco Passage Ranking(https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages...

♥0
71.4M
Aug 9, 2026
Modelsentence-similarity
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic se...

♥0
39.2M
Jan 28, 2026
Modelfill-mask
google-bert/bert-base-uncased

BERT base model (uncased) Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper(https://arxiv.org/abs/1810.04805) and first released in this repository(https://github.com/google-resear...

♥0
29.0M
Feb 19, 2024
Modelzero-shot-image-classification
openai/clip-vit-base-patch32

Model Card: CLIP Disclaimer: The model card is taken and modified from the official CLIP repository, it can be found here(https://github.com/openai/CLIP/blob/main/model-card.md). Model Details The CLIP model was developed by researchers at OpenAI to...

♥0
16.7M
Feb 29, 2024
Modelzero-shot-image-classification
laion/CLIP-ViT-B-32-laion2B-s34B-b79K

Model Card for CLIP ViT-B/32 - LAION-2B Table of Contents 1. Model Details(model-details) 2. Uses(uses) 3. Training Details(training-details) 4. Evaluation(evaluation) 5. Acknowledgements(acknowledgements) 6. Citation(citation) 7. How To Get Started...

♥0
4.1M
Jan 22, 2025
Modelzero-shot-image-classification
laion/CLIP-ViT-H-14-laion2B-s32B-b79K

Model Card for CLIP ViT-H/14 - LAION-2B Table of Contents 1. Model Details(model-details) 2. Uses(uses) 3. Training Details(training-details) 4. Evaluation(evaluation) 5. Acknowledgements(acknowledgements) 6. Citation(citation) 7. How To Get Started...

♥0
479.5k
Jan 22, 2025
Modelzero-shot-image-classification
patrickjohncyh/fashion-clip

!Youtube Video(https://img.shields.io/badge/youtube-video-red)(https://www.youtube.com/watch?v=uqRSc-KSA1Y) !HuggingFace Model(https://img.shields.io/badge/HF%20Model-Weights-yellow)(https://huggingface.co/patrickjohncyh/fashion-clip) !Open In Colab(...

♥0
1.0M
Sep 17, 2024