Zero-Shot Image Classification
Transformers.js
ONNX
clip
mobileclip
image-feature-extraction
feature-extraction
Instructions to use Xenova/mobileclip_b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/mobileclip_b with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('zero-shot-image-classification', 'Xenova/mobileclip_b');
Add/update the quantized ONNX model files and README.md for Transformers.js v3
#4
by whitphx - opened
README.md
CHANGED
|
@@ -60,5 +60,5 @@ const normalized_image_embeds = image_embeds.normalize().tolist();
|
|
| 60 |
const probabilities = normalized_image_embeds.map(
|
| 61 |
x => softmax(normalized_text_embeds.map(y => 100 * dot(x, y)))
|
| 62 |
);
|
| 63 |
-
console.log(probabilities); // [[ 0.999993040175817, 0.
|
| 64 |
-
```
|
|
|
|
| 60 |
const probabilities = normalized_image_embeds.map(
|
| 61 |
x => softmax(normalized_text_embeds.map(y => 100 * dot(x, y)))
|
| 62 |
);
|
| 63 |
+
console.log(probabilities); // [[ 0.999993040175817, 0.000006828091823405, 1.3173235896278122e-7 ]]
|
| 64 |
+
```
|