ScreenParser RF-DETR Medium (UI element detector)

Detects the UI elements of a web page screenshot (buttons, links, text inputs, checkboxes, headings, images, menus, ...) with a box, a class and a confidence. It gives no text: pair it with OCR to read the labels.

  • Model: RF-DETR Medium (34M parameters), LoRA on the DINOv2 backbone, trained at 1024 px.
  • Classes: the 53 UI classes of ScreenParse (class_names in the checkpoint).
  • Training data: ScreenParse (CC-BY-4.0, Gurbuz et al., 2026): 94k screenshots × 5 epochs from the COCO weights, then 2 epochs on 47k further, unseen screenshots at a lower learning rate.

Results

On 2,982 test screenshots of websites never seen in training:

mAP50 mAP50-95 Precision Recall F1
0.265 0.206 0.30 0.27 0.26

Averages over all 53 classes, many of them rare. The common form and page elements score much higher (AP50-95): Radio button 0.78, Text input 0.70, Checkbox 0.68, Heading 0.55, Logo 0.53, Image 0.51, Text 0.42, Button 0.40.

Use

pip install rfdetr huggingface_hub
from huggingface_hub import hf_hub_download
from rfdetr import RFDETR

path = hf_hub_download("REPO_ID", "model.pth")  # e.g. "your-name/screenparser-rfdetr-medium"
model = RFDETR.from_checkpoint(path)

detections = model.predict("screenshot.png", threshold=0.3)
for box, name, score in zip(
    detections.xyxy, detections.data["class_name"], detections.confidence
):
    x1, y1, x2, y2 = box
    print(f"{name:15s} {score:.2f}  center=({(x1 + x2) / 2:.0f}, {(y1 + y2) / 2:.0f})")
  • Threshold ~0.3: this model scores most real elements between 0.3 and 0.5; at RF-DETR's default 0.5 it shows only the most certain few.
  • Input: a screenshot as a file path, PIL image or RGB numpy array. Boxes come back in the screenshot's pixels (x1, y1, x2, y2).
  • A GPU (CUDA or Apple MPS) is used when available; a CPU works, slower.

Limitations

  • Trained on rendered web pages: native desktop or mobile apps may do worse.
  • Weak on rare elements (dropdowns, tables, tabs, date pickers) and on rich-text editors, which it often does not see as inputs.
  • Boxes and classes only, no text.

Credits

Data: ScreenParse, A. Said Gurbuz, Sunghwan Hong, Ahmed Nassar, Marc Pollefeys, Peter Staar, ScreenParse: Moving Beyond Sparse Grounding with Complete Screen Parsing Supervision, ICML 2026 (arXiv:2602.14276), CC-BY-4.0. Base model: RF-DETR by Roboflow, Apache-2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train alenMangattu/screenparser-rfdetr-medium

Paper for alenMangattu/screenparser-rfdetr-medium