Zero-Shot Image Classification
Transformers.js
ONNX
clip
mobileclip
image-feature-extraction
feature-extraction
Instructions to use Xenova/mobileclip_s2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/mobileclip_s2 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('zero-shot-image-classification', 'Xenova/mobileclip_s2');
Download preprocessor_config.json from Xenova/mobileclip_s2: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/Xenova/mobileclip_s2/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://Xenova/mobileclip_s2/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/Xenova/mobileclip_s2/resolve/main/preprocessor_config.json
382 Bytes
| { | |
| "crop_size": { | |
| "height": 256, | |
| "width": 256 | |
| }, | |
| "do_center_crop": true, | |
| "do_convert_rgb": true, | |
| "do_normalize": false, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "feature_extractor_type": "CLIPFeatureExtractor", | |
| "image_processor_type": "CLIPFeatureExtractor", | |
| "resample": 2, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "shortest_edge": 256 | |
| } | |
| } |