Ahmed107 / apple_MobileCLIP-S0

huggingface.co
Total runs: 15
24-hour runs: 0
7-day runs: -2
30-day runs: -2
Model's Last Updated: August 27 2024
zero-shot-image-classification

Introduction of apple_MobileCLIP-S0

Model Details of apple_MobileCLIP-S0

https://github.com/apple/ml-mobileclip with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @xenova/transformers

Example: Perform zero-shot image classification.

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

const model_id = 'Xenova/mobileclip_s0';

// 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, {
  quantized: false, // NOTE: vision model is sensitive to quantization.
});

// Run tokenization
const texts = ['cats', 'dogs', 'birds'];
const text_inputs = tokenizer(texts, { padding: 'max_length', truncation: true });

// Compute text embeddings
const { text_embeds } = await text_model(text_inputs);
const normalized_text_embeds = text_embeds.normalize().tolist();

// Read image and run processor
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
const image = await RawImage.read(url);
const image_inputs = await processor(image);

// Compute vision embeddings
const { image_embeds } = await vision_model(image_inputs);
const normalized_image_embeds = image_embeds.normalize().tolist();

// Compute probabilities
const probabilities = normalized_image_embeds.map(
  x => softmax(normalized_text_embeds.map(y => 100 * dot(x, y)))
);
console.log(probabilities); // [[ 0.9989384093386391, 0.001060433633052551, 0.000001157028308360134 ]]

Runs of Ahmed107 apple_MobileCLIP-S0 on huggingface.co

15
Total runs
0
24-hour runs
-1
3-day runs
-2
7-day runs
-2
30-day runs

More Information About apple_MobileCLIP-S0 huggingface.co Model

More apple_MobileCLIP-S0 license Visit here:

https://choosealicense.com/licenses/other

apple_MobileCLIP-S0 huggingface.co

apple_MobileCLIP-S0 huggingface.co is an AI model on huggingface.co that provides apple_MobileCLIP-S0's model effect (), which can be used instantly with this Ahmed107 apple_MobileCLIP-S0 model. huggingface.co supports a free trial of the apple_MobileCLIP-S0 model, and also provides paid use of the apple_MobileCLIP-S0. Support call apple_MobileCLIP-S0 model through api, including Node.js, Python, http.

apple_MobileCLIP-S0 huggingface.co Url

https://huggingface.co/Ahmed107/apple_MobileCLIP-S0

Ahmed107 apple_MobileCLIP-S0 online free

apple_MobileCLIP-S0 huggingface.co is an online trial and call api platform, which integrates apple_MobileCLIP-S0's modeling effects, including api services, and provides a free online trial of apple_MobileCLIP-S0, you can try apple_MobileCLIP-S0 online for free by clicking the link below.

Ahmed107 apple_MobileCLIP-S0 online free url in huggingface.co:

https://huggingface.co/Ahmed107/apple_MobileCLIP-S0

apple_MobileCLIP-S0 install

apple_MobileCLIP-S0 is an open source model from GitHub that offers a free installation service, and any user can find apple_MobileCLIP-S0 on GitHub to install. At the same time, huggingface.co provides the effect of apple_MobileCLIP-S0 install, users can directly use apple_MobileCLIP-S0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

apple_MobileCLIP-S0 install url in huggingface.co:

https://huggingface.co/Ahmed107/apple_MobileCLIP-S0

Url of apple_MobileCLIP-S0

apple_MobileCLIP-S0 huggingface.co Url

Provider of apple_MobileCLIP-S0 huggingface.co

Ahmed107
ORGANIZATIONS

Other API from Ahmed107

huggingface.co

Total runs: 15
Run Growth: 7
Growth Rate: 46.67%
Updated:March 12 2026
huggingface.co

Total runs: 15
Run Growth: 4
Growth Rate: 28.57%
Updated:December 05 2023
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:November 07 2023
huggingface.co

Total runs: 11
Run Growth: 4
Growth Rate: 36.36%
Updated:December 05 2023
huggingface.co

Total runs: 11
Run Growth: 4
Growth Rate: 36.36%
Updated:November 21 2024
huggingface.co

Total runs: 8
Run Growth: 0
Growth Rate: 0.00%
Updated:December 04 2023
huggingface.co

Total runs: 6
Run Growth: -3
Growth Rate: -50.00%
Updated:November 09 2023
huggingface.co

Total runs: 5
Run Growth: -1
Growth Rate: -20.00%
Updated:February 20 2024
huggingface.co

Total runs: 4
Run Growth: -4
Growth Rate: -100.00%
Updated:November 10 2023
huggingface.co

Total runs: 4
Run Growth: 0
Growth Rate: 0.00%
Updated:January 13 2025
huggingface.co

Total runs: 2
Run Growth: -5
Growth Rate: -250.00%
Updated:December 31 2023
huggingface.co

Total runs: 2
Run Growth: -5
Growth Rate: -250.00%
Updated:December 31 2023
huggingface.co

Total runs: 1
Run Growth: -7
Growth Rate: -700.00%
Updated:February 06 2024