File size: 4,361 Bytes
992778e 1a8be11 4f38cbd 9b3dadb 1a8be11 9b3dadb 1a8be11 4f38cbd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
---
license: apache-2.0
datasets:
- strangerzonehf/Super-Emojies-DLC
language:
- en
base_model:
- google/siglip2-base-patch16-224
pipeline_tag: image-classification
library_name: transformers
tags:
- Emoji-Scope
- Google
- CrossEmoji Classifier
---

# **Emoji-Scope**
> **Emoji-Scope** is an image classification vision-language encoder model fine-tuned from **google/siglip2-base-patch16-224** for a single-label classification task. It is designed to classify emoji images into different style categories using the **SiglipForImageClassification** architecture.
```py
Classification Report:
precision recall f1-score support
Apple Style 0.9336 0.8538 0.8919 725
DoCoMo Style 0.9130 0.8400 0.8750 100
Facebook Style 0.8713 0.8915 0.8813 691
Gmail Style 0.8289 0.8750 0.8514 288
Google Style 0.8725 0.9505 0.9098 727
JoyPixels Style 0.8960 0.9614 0.9276 726
KDDI Style 0.9444 0.9333 0.9389 255
Samsung Style 0.9584 0.9681 0.9632 690
SoftBank Style 0.8407 0.8053 0.8226 190
Twitter Style 0.9939 0.8900 0.9390 727
Windows Style 0.9949 0.9949 0.9949 583
accuracy 0.9200 5702
macro avg 0.9134 0.9058 0.9087 5702
weighted avg 0.9222 0.9200 0.9201 5702
```

The model categorizes images into eleven emoji styles:
- **Class 0:** "Apple Style"
- **Class 1:** "DoCoMo Style"
- **Class 2:** "Facebook Style"
- **Class 3:** "Gmail Style"
- **Class 4:** "Google Style"
- **Class 5:** "JoyPixels Style"
- **Class 6:** "KDDI Style"
- **Class 7:** "Samsung Style"
- **Class 8:** "SoftBank Style"
- **Class 9:** "Twitter Style"
- **Class 10:** "Windows Style"
# **Run with Transformers🤗**
```python
!pip install -q transformers torch pillow gradio
```
```python
import gradio as gr
from transformers import AutoImageProcessor
from transformers import SiglipForImageClassification
from transformers.image_utils import load_image
from PIL import Image
import torch
# Load model and processor
model_name = "prithivMLmods/Emoji-Scope"
model = SiglipForImageClassification.from_pretrained(model_name)
processor = AutoImageProcessor.from_pretrained(model_name)
def emoji_classification(image):
"""Predicts the style category of an emoji image."""
image = Image.fromarray(image).convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist()
labels = {
"0": "Apple Style",
"1": "DoCoMo Style",
"2": "Facebook Style",
"3": "Gmail Style",
"4": "Google Style",
"5": "JoyPixels Style",
"6": "KDDI Style",
"7": "Samsung Style",
"8": "SoftBank Style",
"9": "Twitter Style",
"10": "Windows Style"
}
predictions = {labels[str(i)]: round(probs[i], 3) for i in range(len(probs))}
return predictions
# Create Gradio interface
iface = gr.Interface(
fn=emoji_classification,
inputs=gr.Image(type="numpy"),
outputs=gr.Label(label="Prediction Scores"),
title="Emoji Style Classification",
description="Upload an emoji image to classify its style."
)
# Launch the app
if __name__ == "__main__":
iface.launch()
```
# **Intended Use:**
The **Emoji-Scope** model is designed to classify emoji images based on different style categories. Potential use cases include:
- **Emoji Standardization:** Identifying different emoji styles across platforms.
- **User Experience Design:** Helping developers ensure consistency in emoji usage.
- **Digital Art & Design:** Assisting artists in selecting preferred emoji styles.
- **Educational Purposes:** Teaching differences in emoji representation. |