dekho-ui-classify-medium - UI icon classifier
2 min readupdated
The model is designed for local analysis of interface elements: it evaluates and ranks English labels for cropped desktop icon images. Built on the MobileNetV4 Conv Medium architecture (a lightweight convolutional model for mobile devices), it uses a multi-class head with independent sigmoid scores, allowing multiple semantic labels to be assigned to a single icon. The tool helps desktop agents better understand screen structure and complement optical character recognition systems.
Key features
- Icon classification: the model achieves 56.68% recall@1 and 85.18% recall@5 metrics on the test set.
- Local execution: runs on both CPU and GPU, taking 96×96 pixel crops as input.
- Fixed vocabulary: model weights take up 108.4 MB on disk, and an ordered class list file is included.
What you can do
- Agent integration: combine UI element detection, icon recognition, and optical character recognition into a unified local screen map.
- Fallback access: use visual labels to improve application accessibility when standard system application programming interfaces return incomplete data.
- Search and sorting: automatically rank known classes for interface fragments.
Example
import sys
from PIL import Image
from huggingface_hub import snapshot_download
release = snapshot_download(
"shikhar-cs-eng/dekho-ui-classify-medium",
revision="v1.0.0",
allow_patterns=[
"dekho_ui_classify.py", "dekho-ui-classify-medium.safetensors",
"labels.json", "preprocessing.json", "LICENSE",
],
)
sys.path.insert(0, release)
from dekho_ui_classify import DekhoUIClassifier
dekho = DekhoUIClassifier(release, device="cpu")
with Image.open("icon-crop.png") as crop:
for label, score in dekho.predict(crop, top_k=5):
print(label, round(score, 3))
Read more
DetailsMetrics: 56.68% recall@1, 71.85% recall@2, 85.18% recall@5.
Performance: average inference time on CPU is 12.01 ms, and on NVIDIA L40S is 4.59 ms.
Training: 150 epochs, 171,100 optimizer steps, 14,502 classified labels.
License: Apache 2.0.










Comments