/ Модель

Характеристики

Контекст
128 000 токенов
Параметры
7,1 млрд
Размер весов
16,6 ГБ
Лицензия
Apache 2.0
Архитектура
qwen2_5_vl · dense
Базовая модель
Qwen2.5-VL-7B-Instruct
Библиотека
transformers
Опубликована
29 сен 2025

UI-UG-7B

Изображение и текст → текст4 профессии

UI-UG — мультимодальная модель для анализа элементов пользовательских интерфейсов и генерации UI по текстовому описанию.

114скачиваний за 30 дней16лайковвеса обновлены30 сен 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

UI-UG — мультимодальная модель для понимания пользовательских интерфейсов и генерации UI. Она дообучена командой afx-team на Qwen/Qwen2.5-VL-7B-Instruct; архитектура Qwen2.5-VL, около 7,1 млрд параметров, контекст 128 000 токенов. Модель принимает изображения интерфейсов и текстовые инструкции, а ответы формирует в виде текста и структурированных данных.

UI-UG предназначена для описания элементов по координатам, поиска элементов по текстовому описанию с выдачей координат и генерации структурированного DSL для интерфейсов по требованиям. Она распознаёт более 20 категорий элементов и может создавать сопроводительные тестовые данные. В README заявлена генерация UI по описаниям на китайском и английском языках; модель распространяется в формате safetensors и поддерживает чатовый интерфейс.

Лицензия — Apache-2.0. Качество локализации и генерации зависит от сложности и содержания интерфейса; README не приводит численных результатов оценки или подробных ограничений.

Сценарии применения

  • описание элемента интерфейса по координатам
  • поиск и локализация кнопок, иконок и других элементов на скриншоте
  • классификация элементов пользовательского интерфейса
  • генерация структурированного DSL для формы или экрана по требованиям
  • создание моковых данных для сгенерированного интерфейса

Ограничения

README не приводит численных результатов оценки или подробных ограничений; точность локализации и качество генерации могут зависеть от сложности интерфейса.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

🎯 UI-UG: A Unified MLLM for UI Understanding and Generation

Python 3.8+ License Paper Hugging Face Model GitHub Repository

📖 Paper | 🤗 Model | 🚀 Quick Start | 📊 Evaluation | 📄 License

🌟 Overview

UI-UG (A Unified MLLM for UI Understanding and Generation) is a multimodal large model that simultaneously supports both UI understanding and UI generation. It supports various tasks including referring, grounding, captioning and generation.

🚀 Core Features

🔍 1. UI Description Generation (Referring)

  • Element Description: Automatically generate element descriptions based on coordinate regions
  • Semantic Understanding: Understand the function, style, and interaction meaning of UI elements
  • Multi-dimensional Analysis: Include text, color, clickability, and other attributes

📍 2. UI Element Detection (Grounding)

  • Object Detection: Automatically identify and locate various UI elements in interfaces
  • Classification: Support for 20+ categories including text, button, icon, image, etc.
  • Coordinate Annotation: Precisely generate bounding box coordinates for elements

🎨 3. UI Code Generation (Generation)

  • DSL Generation: Generate structured DSL code from requirement descriptions
  • Mock Data: Automatically generate accompanying mock data
  • Multi-language Support: Support for generating UI code from Chinese and English descriptions

🛠️ Quick Start

from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import smart_resize, process_vision_info
import torch
from PIL import Image
import re

# Configuration
IMAGE_FACTOR = 28
MIN_PIXELS = 64 * 28 * 28
MAX_PIXELS = 1280 * 28 * 28
MAX_TOKENS = 8192

# Load model
model_path = "neovateai/UI-UG-7B"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    model_path, torch_dtype=torch.float16, device_map="auto"
)
processor = AutoProcessor.from_pretrained(
    model_path, 
    min_pixels=MIN_PIXELS, 
    max_pixels=MAX_PIXELS
)

def llm_inference(messages):
    """Unified inference function"""
    text = processor.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )
    image_inputs, video_inputs = process_vision_info(messages)
    inputs = processor(
        text=[text],
        images=image_inputs,
        videos=video_inputs,
        padding=True,
        return_tensors="pt",
    )
    inputs = inputs.to(model.device)
    
    generated_ids = model.generate(
        **inputs, 
        max_new_tokens=MAX_TOKENS, 
        do_sample=False
    )
    
    generated_ids_trimmed = [
        out_ids[len(in_ids):] 
        for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
    ]
    
    output_text = processor.batch_decode(
        generated_ids_trimmed, 
        skip_special_tokens=True, 
        clean_up_tokenization_spaces=False
    )
    return output_text[0]

# Load image
image_path = "figures/alipay_demo.png"
original_image = Image.open(image_path)
original_width, original_height = original_image.size

# Calculate resize dimensions
resized_height, resized_width = smart_resize(
    original_height, original_width, IMAGE_FACTOR, MIN_PIXELS, MAX_PIXELS
)

📊 Task Examples

1️⃣ Referring Task: Describe element by coordinates

# Scale coordinates from original to resized dimensions
def scale_coordinates(original_coords, original_size, resized_size):
    orig_x1, orig_y1, orig_x2, orig_y2 = original_coords
    orig_w, orig_h = original_size
    new_w, new_h = resized_size
    
    scaled_x1 = int(orig_x1 * new_w / orig_w)
    scaled_y1 = int(orig_y1 * new_h / orig_h)
    scaled_x2 = int(orig_x2 * new_w / orig_w)
    scaled_y2 = int(orig_y2 * new_h / orig_h)
    
    return f"({scaled_x1}, {scaled_y1}),({scaled_x2}, {scaled_y2})"

# Example usage
original_coords_str = "(600, 623),(907, 634)"
# Parse original coordinates
coord_match = re.findall(r'\((\d+),\s*(\d+)\)', original_coords_str)
original_coords = [int(coord_match[0][0]), int(coord_match[0][1]), int(coord_match[1][0]), int(coord_match[1][1])]
scaled_coords_str = scale_coordinates(original_coords, (original_width, original_height), (resized_width, resized_height))

referring_messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image_path},
            {"type": "text", "text": f"Describe the region {scaled_coords_str}"}
        ]
    }
]

referring_result = llm_inference(referring_messages)
print("Referring Result:", referring_result)

2️⃣ Grounding Task: Detect element by description

grounding_messages = [
    {
        "role": "user", 
        "content": [
            {"type": "image", "image": image_path},
            {"type": "text", "text": "List all the ui items."}
        ]
    }
]

grounding_result = llm_inference(grounding_messages)

# Extract coordinates from grounding result and rescale them
coord_pattern = r'\((\d+),\s*(\d+)\),\((\d+),\s*(\d+)\)'
matches = re.findall(coord_pattern, grounding_result)
for match in matches:
    scaled_coords = [int(match[0]), int(match[1]), int(match[2]), int(match[3])]
    original_coords_str = scale_coordinates(scaled_coords, (resized_width, resized_height), (original_width, original_height))
    grounding_result = grounding_result.replace(f"({match[0]}, {match[1]}),({match[2]}, {match[3]})", original_coords_str)

print("Grounding Result:", grounding_result)

3️⃣ Generation Task: Generate UI from description

generation_messages = [
    {
        "role": "user",
        "content": [
            # {"type": "image", "image": image_path}, # your optional referring image
            {"type": "text", "text": "Generate a login form with email field, password field, and submit button"}
        ]
    }
]

generation_result = llm_inference(generation_messages)
print("Generation Result:", generation_result)

� Performance

🎯 Task Specifications

Task TypeDescriptionEvaluation Metrics
ReferringUI element referring generationJSON format accuracy, Classification accuracy, text similarity, color similarity
GroundingUI element detection and localizationJSON format accuracy, mAP, AP50, AP75
GenerationUI code generationJSON format accuracy, LLM-based judgement (following Web2Code)

📄 License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

🤝 Acknowledgments

📖 Citation

If you find this work useful, please consider citing:

@misc{yang2025uiugunifiedmllmui,
      title={UI-UG: A Unified MLLM for UI Understanding and Generation}, 
      author={Hao Yang and Weijie Qiu and Ru Zhang and Zhou Fang and Ruichao Mao and Xiaoyu Lin and Maji Huang and Zhaosong Huang and Teng Guo and Shuoyang Liu and Hai Rao},
      year={2025},
      eprint={2509.24361},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2509.24361}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2_5_VLForConditionalGeneration
Ревизия весов
6418137

0 моделей