Image Classification
OpenCLIP
Arabic
English
French
perfume
fragrance
retail
image-retrieval
metric-learning
hosted-api
Eval Results (legacy)
Instructions to use ourscent/perfume-recognizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use ourscent/perfume-recognizer with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:ourscent/perfume-recognizer') tokenizer = open_clip.get_tokenizer('hf-hub:ourscent/perfume-recognizer') - Notebooks
- Google Colab
- Kaggle
|
Download README.md from ourscent/perfume-recognizer: direct link, hf CLI and curl.
- Browser
- Download file 5.36 kB
-
https://huggingface.co/ourscent/perfume-recognizer/resolve/main/README.md
- Command line
-
hf download hf://ourscent/perfume-recognizer/README.md
-
curl -L -o README.md https://huggingface.co/ourscent/perfume-recognizer/resolve/main/README.md
5.36 kB
| license: other | |
| license_name: ourscent-hosted-api | |
| license_link: https://intelligence.ourscent.online | |
| library_name: open_clip | |
| pipeline_tag: image-classification | |
| base_model: timm/ViT-B-16-SigLIP | |
| language: [ar, en, fr] | |
| tags: [perfume, fragrance, retail, image-retrieval, metric-learning, hosted-api] | |
| model-index: | |
| - name: ourscent-ViT-B-16-SigLIP (c-20261122) | |
| results: | |
| - task: { type: image-classification, name: Perfume bottle recognition } | |
| dataset: { type: private, name: Held-out photos of real bottles (9,047 photos, 2,017 perfumes) } | |
| metrics: | |
| - { type: accuracy, name: Top-1 accuracy, value: 77.6 } | |
| - { type: top-3-accuracy, name: Top-3 accuracy, value: 93.2 } | |
| # OurScent Intelligence: perfume bottle recognizer | |
| `ourscent-ViT-B-16-SigLIP`, bundle **c-20261122**. Send a photo of a perfume bottle; it returns the | |
| perfumes it knows, ranked by similarity. | |
| **No weights are published.** The model is offered as a hosted API, OurScent Intelligence: | |
| `POST https://api.ourscent.online/v1/vision/identify`. Docs, a free plan and test keys at | |
| https://intelligence.ourscent.online. | |
| ## What it recognizes | |
| - **2,017 perfumes**, the ones bought and asked about most in Saudi Arabia, the Gulf and Egypt. The exact | |
| list is `GET /v1/vision/models/current/coverage`. The OurScent record behind the answers covers more | |
| than 60,000 perfumes; the recognizer covers a curated part of it, and grows with each bundle. | |
| - **Output:** the top *k* candidates (k = 1 to 10), each with an OurScent `perfume_id`, name, house and a | |
| score. With `expand=perfume`, each candidate carries the full perfume record. | |
| - **It does not** read text or barcodes (barcodes have `POST /v1/barcode/lookup`), tell a genuine bottle | |
| from a fake, or estimate how full a bottle is. | |
| ## How it is built | |
| | | | | |
| |---|---| | |
| | Backbone | ViT-B-16-SigLIP, from Google's published SigLIP weights | | |
| | Fine-tuning | Contrastive metric learning on photos of real bottles in everyday settings | | |
| | Embedding | 768 dimensions | | |
| | Input | Pad to square, resize to 224 × 224, normalise with mean 0.5 and standard deviation 0.5 | | |
| | Search | Nearest neighbours against a reference index, scored per perfume as the best single match combined with the perfume's centroid | | |
| | Runtime | ONNX on CPU | | |
| The training photos are an internal collection. They are never served, published or redistributed, and | |
| no photo leaves OurScent through the model, the API or this card. | |
| ## Evaluation (c-20261122, the bundle in production) | |
| Held-out photos of real bottles, **never used in training or validation**. | |
| | | | | |
| |---|---| | |
| | Perfumes covered | 2,017 | | |
| | Test photos | 9,047 | | |
| | **Top-1 accuracy** | **77.6%** | | |
| | **Top-3 accuracy** | **93.2%** | | |
| | Latency, 95th percentile | 68.6 ms (model only, without network time) | | |
| Top-1 is the share of photos where the first candidate is right; top-3, where the right perfume is among | |
| the first three. A shop showing three choices gets the right one about 9 times in 10. Every API answer | |
| names the bundle that produced it (`model`), and `GET /v1/vision/models` lists the versions. | |
| ## Limits and good use | |
| - **Only the perfumes in its index.** A photo of any other perfume returns the nearest perfumes it knows. | |
| Show candidates, not a verdict. | |
| - **Look-alike bottles.** Flankers and concentrations that share one bottle are the hardest cases; expect | |
| the right family in the top three more often than the exact one first. | |
| - **Photo quality.** Best on a clear photo of one bottle filling much of the frame. Blur, strong | |
| reflections, the back of a bottle, the cap alone and crowded shelves lower accuracy. | |
| - **Not a measure of authenticity, quality or contents.** | |
| - **Coverage leans** to perfumes popular in Saudi Arabia, the Gulf and Egypt. | |
| ## Corrections and privacy | |
| Send a correction with `POST /v1/vision/feedback` (the call's `request_id` and the right `perfume_id`); | |
| corrections are reviewed for the next bundle. On-premise licences are discussed case by case on the | |
| Enterprise plan. | |
| ## ملخّص بالعربية | |
| **نموذج OurScent Intelligence للتعرّف على زجاجات العطور**: ترسل صورة زجاجة فيعيد العطور الأقرب مرتّبة | |
| مع درجة الثقة. الإصدار الذي يعمل على الخادم c-20261122 يعرف 2,017 عطراً. على 9,047 صورة لم يرها النموذج | |
| أثناء التدريب: الإجابة الأولى صحيحة في 77.6% من الصور، والعطر الصحيح ضمن أول ثلاث إجابات في 93.2%. | |
| يعرف العطور الموجودة في فهرسه فقط، ولا يحكم على أصالة الزجاجة. الأوزان غير منشورة، والخدمة متاحة عبر | |
| الواجهة البرمجية. | |
| ## Résumé en français | |
| **Le modèle de reconnaissance de flacons d’OurScent Intelligence** : à partir d’une photo de flacon, il | |
| renvoie les parfums les plus proches, classés avec un score. La version en production, c-20261122, | |
| reconnaît 2 017 parfums. Sur 9 047 photos jamais vues à l’entraînement : première réponse juste dans | |
| 77,6 % des cas, bon parfum parmi les trois premières dans 93,2 %. Il ne reconnaît que les parfums de son | |
| index et ne juge pas l’authenticité d’un flacon. Les poids ne sont pas publiés ; le service est accessible | |
| par l’API. | |