type
status
date
slug
summary
tags
category
icon
password
page icon
个人主观评分:4.5
作为一篇该领域的文章,读完之后可复现性尚可,但整篇文章对于模型以及调优部分的思考不够细致,文章结构一般,新意度一般,过于重点叙述其数据集的构造,没有谈及训练资源。我发现这个系列的文章可能离商业实在太近了,写的都不清楚,这篇也不例外。不过好在开源了一代的代码,主观评分中有4分给其v1版本开源了代码和权重,但提供的requirements中的各个package的版本互相不兼容,如果想安装运行得费一番调版本的功夫。此外,该项目跑起来后(v1)实际效果很差。其自己构建的数据集也未公开,可以说是contribution非常有限的胡乱吹水的一篇文章
作者团队来自 Apple 
notion image

notion image

Introduction

  1. 多平台支持
      • Ferret-UI 2 是一个多模态大型语言模型(MLLM),它被设计用于在多种平台上实现用户界面(UI)的普遍理解,包括 iPhone、Android、iPad、Webpage 和 AppleTV。
  1. 高分辨率感知
      • 通过自适应缩放支持高分辨率感知,这使得 Ferret-UI 2 能够在用户界面截图的原始分辨率下保持感知能力,确保对视觉元素的更准确识别。
  1. 高级任务训练数据生成
      • 利用 GPT-4o 和集合标记视觉提示(set-of-mark visual prompting)技术,Ferret-UI 2 能够生成更高质量的多模态训练数据,这增强了对 UI 元素空间关系的理解,从而提高了训练数据的质量。
  1. 单步用户中心交互
      • Ferret-UI 2 能够执行复杂、以用户为中心的交互,使其在不断扩展的平台生态系统中具有高度的多功能性和适应性。
  1. 跨平台迁移能力
      • 通过在多个基准测试上进行广泛的实证实验,包括 REFERRING、GROUNDING、用户中心的高级任务(包括 9 个子任务 × 5 平台),GUIDE 下一步行动预测数据集和 GUI-World 多平台基准测试,Ferret-UI 2 显示出显著超越 Ferret-UI 的性能,并且展示了强大的跨平台迁移能力。
  1. 模型架构改进
      • Ferret-UI 2 在模型架构上进行了改进,包括自适应 N 网格(adaptive N-gridding)机制,这有助于在给定的推理成本限制下自动找到最优的网格配置,既保持信息又高效地进行局部编码。
  1. 数据集构建
      • 论文中还详细描述了如何从原始数据注释中策划训练数据集,并构建了自己的数据集以训练强大的多平台 UI 理解模型。
  1. 实验结果
      • 实验结果表明,Ferret-UI 2 在各种任务和基准测试中的表现优于 Ferret-UI,并且在不同的平台上展现了竞争力的性能。
 

该文章瞄准的任务类型

我们follow了Ferret-UI 一代的任务数据生成路径,这一块包括了基础任务和高级任务
notion image

Elementary Tasks(基础任务)主要包括以下六个子任务:

  1. OCR (Optical Character Recognition): 识别给定文本边界框中的文本。
  1. Widget Classification: 预测UI元素的类型。
  1. Tapperbility: 预测所选控件是否可以进行交互(即可点击性)。
  1. Widget Listing: 列出屏幕上的所有控件。
  1. Find Text: 找到给定文本的位置。
  1. Find Widget: 根据控件描述找到控件。
 

Advanced Tasks(高级任务)包括以下三个类型:

  1. Comprehensive Description(全面描述)
      • 提供截图中显示的UI页面的整体功能的一句话描述。
      • 通过将截图划分为几个区域/组,并解释每个区域/组的功能,详细描述截图。
全局描述的要求:Provide a one-sentence description of the overall functionality of the UI page shown in the screenshot. Then, describe the screenshot in detail by dividing it into several areas/groups and explaining the functionality of each area/group. 简单来说就是对该界面的一句话整体描述,然后分区块再进行稍微详细一点的描述
GPT-4o的产出样例:
notion image
 
  1. Multi-Round Perception QA(多轮感知问答)
      • Basic Perceptual Understanding(基础感知理解):解释被引用控件的内容,根据控件描述确定控件的位置,并描述每个控件的功能和状态(启用、禁用、选中、悬停)。
      • Contextual Awareness(上下文意识):理解UI控件呈现的上下文,包括不同UI组件之间的关系以及它们如何共同促进整体用户体验。
      • Layout and Hierarchy Recognition(布局和层级识别):识别控件在UI布局中的分组和嵌套方式。
多轮感知问答的要求
  • Basic Perceptual Understanding: Interpret the content of referred widgets, ground the positions of the widgets based on the widget descriptions, and describe the functionality and status (enabled, disabled, selected, hovered) of each widget. 解读提到的widgets,基于描述去找到widgets,然后描述每个widget的功能
  • Contextual Awareness: Understand the context in which UI widgets are presented, including the relationships between different UI components and how they contribute to the overall user experience. 简单来说就是理解当前这个界面的上下文,对于用户有啥用
  • Layout and Hierarchy Recognition: Recognize how widgets are grouped and nested within the UI layout. 识别出widgets在当前这个布局中按什么分组的。
GPT-4o的产出样例
notion image
 
  1. Multi-Round Interaction QA(多轮交互问答)
      • 生成以用户为中心的交互指令。例如,使用“请帮我确认提交”而不是“请点击[Box0]按钮”。
      • 识别和交互按钮、链接、图标、滚动条和开关,并识别不能与之交互的控件,如静态文本和背景图像。
      • 识别和交互输入字段、下拉菜单、复选框和单选按钮,以及它们在特定交互任务中的当前状态(例如,已检查、未检查、已填写、为空)。
      • 根据当前可见的控件(如标签、菜单和面包屑导航)预测潜在导航路径的当前步骤。
多轮交互问答的要求
  • Generate instructions for user-centered interaction. For example, “please help me confirm submission” instead of “please click on [Box0] button”. 生成以用户为中心的交互指示
  • Identify and interact with buttons, links, icons, scrollbars, and toggles, and recognize widgets that cannot be interacted with, such as static text and background images. 识别出可交互的和不可交互的界面中的元素
  • Identify and interact with input fields, dropdowns, checkboxes, and radio buttons, as well as their current states (e.g., checked, unchecked, filled, empty) in the context of specific interaction tasks.识别出可交互元素中的状态
  • Predict current step for potential navigation paths based on currently visible widgets like tabs, menus and breadcrumbs controls. 基于当前可见的widgets,预测下一步动作
GPT-4o的产出样例
notion image
 
 
Ferret-UI 一代的 limitation
  • grounding resolution 是固定的(简要来说,visual grounding 是指输入是图片(image)和对应的物体描述(sentence\caption\description),输出是描述物体的box 的能力)
  • 只在手机平台试过,其他平台是 Challenge
  • 不同平台高质量数据难获取, Ferret-UI 中提出的靠 GPT-4 prompting 的方式来产生数据,丢失了图片中的空间信息。

 

用到的数据集

notion image
notion image
notion image
 
notion image
 
Spotlight 没找到 😭
 
 

Related Works

Works v.s. 聚焦的范围
Category
Work Name
Author Team
Focus Area
Single-Platform UI Agents
DigiRL
Bai et al., 2024
Android agents targeting human-like interactions
AppAgent V2
Li et al., 2024c
Android agents targeting human-like interactions
AutoDroid
Wen et al., 2024
Android agents targeting human-like interactions
MobileFlow
Nong et al., 2024
Android agents targeting human-like interactions
WebShop
Yao et al., 2022
Web-based agents navigating and performing tasks
WebArena
Zhou et al., 2023
Web-based agents navigating and performing tasks
LASER
Ma et al., 2023
Web-based agents navigating and performing tasks
WebAgent
Gur et al., 2023
Web-based agents navigating and performing tasks
AutoWebGLM
Lai et al., 2024
Web-based agents navigating and performing tasks
WebVoyager
He et al., 2024
Web-based agents navigating and performing tasks
Agent-E
Abuelsaad et al., 2024
Web-based agents navigating and performing tasks
MindSearch
Chen et al., 2024b
AI engine for web search
AssistGUI
Gao et al., 2023
Computer OS interaction
OS-Copilot
Wu et al., 2024
Computer OS interaction
SYNAPSE
Zheng et al., 2023
Computer OS interaction
UFO
Zhang et al., 2024a
Computer OS interaction
Multi-Platform UI Agents
GPT-4V
Zheng et al., 2024a; Cheng et al., 2024
Generalist agent when grounded
OmniACT
Kapoor et al., 2024
Supports both desktop and web interfaces
CogAgent
Hong et al., 2023
UI navigation on PC webpages and Android devices
Mind2Web
Deng et al., 2024
Enables agents to operate across different platforms
Mobile-Agent
Wang et al., 2024b
Enables agents to operate across different platforms
Mobile-Agent V2
Wang et al., 2024a
Features Harmony OS and Android OS for non-English and English scenarios
Ferret-UI
You et al., 2024
Mobile UI understanding for Android and iPhone screenshots
Works v.s. 基准测试数据
Work
Authors
Benchmark Type
Rico
Deka et al., 2017
Mobile app interaction
Mobile-Env
Zhang et al., 2023
Mobile device control
AndroidEnv
Toyama et al., 2021
Mobile device control
AndroidWorld
Rawles et al., 2024a
Mobile device control
Android in-the-Wild
Rawles et al., 2024b
Mobile device control
AndroidControl
Li et al., 2024b
Mobile device control
AMEX
Chai et al., 2024
Mobile device control
Windows Agent Arena
Bonatti et al., 2024
PC windows environment
OSWorld
Xie et al., 2024
Real computer environments (including Ubuntu, MacOS, and Windows)
WebSRC
Chen et al., 2021
Web-based interaction (structural reading comprehension and task execution)
Mind2Web
Deng et al., 2024
Web-based interaction (structural reading comprehension and task execution)
WebCanvas
Pan et al., 2024
Web-based interaction (structural reading comprehension and task execution)
MobileAgent-Bench
Wang et al., 2024c
Performance of multimodal agents across mobile and web interfaces
VisualWebBench
Liu et al., 2024b
Performance of multimodal agents across mobile and web interfaces
VisualAgentBench
Liu et al., 2024c
Multimodal LLMs as visual foundation agents
GUI Odyssey
Lu et al., 2024
Cross-App navigation
GUI-World
Chen et al., 2024a
Multi-platform benchmarking for GUI agents
CRAB
Xu et al., 2024
Cross-environment tasks for GUI agents

Frerret-UI V2

3.1 训练集的建立

notion image
notion image
.
notion image
notion image
Webpage: The web data is derived from the WebUI dataset (Wu et al., 2023).
Bounding boxes of all types of UI widgets and text annotations for non-picture widgets are directly parsed from the source HTML view hierarchy tree, providing high-quality annotations. For picture widgets we further use OCR to detect texts contained in the pictures.
Android: The Android data for screenshots, bounding boxes and text annotations is transformed from the RICO dataset (Deka et al., 2017). Similar to the WebUI dataset, we also perform picture only OCR to complete the missing text annotations in picture widgets.

数据清洗

  • 把超过边界的 bounding-box 丢掉或者边界设为屏幕最大值。
  • 丢掉空白截图或者没有 boundingbox 的截图
  • 超过 5% non-ASCII 编码 的字符的屏幕截图也被丢掉(不打算支持多语言)
  • 扔掉 和标签不太相关的 bounding-boxes (比如 UI Types),把标签分类成 13 个:‘Checkbox’, ‘Button’, ‘Container’, ‘Dialog’, ‘Icon’, ‘PageControl’, ‘Picture’, ‘SegmentedControl’, ‘Slider’, ‘TabBar’, ‘Text’, ‘TextField’, and ‘Toggle’,
 
和 Ferret-UI(一代)不同的是,一代更加依赖于模型检测出的bounding-boxes(意味着可能导致漏召回或者不准的数据质量问题),二代的训练集更多地使用了人力标注或者是直接从HTML解析而来。
 

Set of Mark

notion image
我们发现,当直接把屏幕截图输入给GPT-4o时,它很难找到我们提到的widgets的位置(也就是grounding能力很差),为了解决这个问题,我们用了一个叫Set of Mark Visual Prompting (SoM) 的方法来使GPT-4o生成多轮感知对话和多轮交互对话的训练数据集。同类型的UI有同样的颜色,
 

模型结构

notion image

Visual Encoding

Ferret-UI 2 和Ferret-UI的区别不大,我们用了AnyResolution的方法(AnyRes,从Llava-next中来)来提升模型在Referring和Grounding 方面的能力。具体来说,CLIP Encoder先从截屏中提取全局(低分辨率)和局部(图片的高分辨率小切片)的特征,然后这些特征直接被Flatten后塞入LLM。Visual Sampler会基于用户的指示来选取相应的UI区域。模型后面就会生成grounded描述。

Adaptive N-gridding【不知道干啥的,也没code,不如忽略】

notion image
我们 用提出的 adaptive N-gridding mechanism 来计算最优的网格尺寸,以达到对局部图像特征进行提取。然后re-sizing和encoding每个grid的视觉特征。这是对Ferret-UI 一代的关键性改良。
 

模型组成

Following Ferret-UI (You et al., 2024), Ferret-UI 2 uses a CLIP ViT-L/14 model as the image encoder; for the LLM backone, besides Vicuna-13B (Chiang et al., 2023) as used in the original Ferret-UI, we also tried 2 additional LLMs at mobile scales, including Gemma-2B (Team et al., 2024) and Llama3-8B (Dubey et al., 2024). As to dynamic high-resolution image encoding, we set the size limit N to 8, so that the maximal grid number is 16 for adaptive gridding.
 

训练细节

  • 占比较低的类型有相对更高的损失函数权重
  • 占比较低的类型有相对更复杂的任务
      notion image

关于 Ferret

安装 Ferret 试用:
注意,这里的官方给出的依赖库版本有问题,实际需要:
13b 挺耗显存的,得 80G 才能相对顺利的跑起来,弹出预测速度相对较慢

论文概述:

“Ferret-v2: An Improved Baseline for Referring and Grounding with Large Language Models” 是对多模态大语言模型(MLLMs)在“指代与定位”(Referring and Grounding)任务中的改进,目标是提升模型在图像区域内文本描述和视觉特征对齐的精度和灵活性。相比于前一代 Ferret,Ferret-v2 对模型架构、训练方法和高分辨率图像的处理能力进行了显著优化。

论文的贡献

  1. 提出了高效的区域表达方法
  • 结合了离散坐标、连续区域特征以及区域名称的混合表示方法,使得模型可以处理各种形状(如点、矩形、自由形状)的图像区域。
  • 通过区域特征提取器聚合区域特征,并与坐标表示结合,增强了空间信息的表达能力。
  1. 引入高分辨率扩展能力
  • 提出并对比了两种高分辨率扩展方法:
  • 直接上采样(Direct Upsampling):简单将图像尺寸扩大。
  • 任意分辨率(Any Resolution):将图像划分为局部网格块进行编码。结果显示该方法更适合高分辨率图像处理,且在冻结与不冻结视觉编码器的情况下均表现良好。
  1. 改进的模型架构
  • 增强了模型对全局与局部特征对齐的能力。
  • 通过多粒度视觉编码改进了模型的推理能力,适配更广泛的任务场景。
  1. 优化了训练策略
  • 结合了额外的任务数据集(如视觉问答 VQA 和光学字符识别 OCR),大幅提升了模型在跨任务中的泛化性能。
  1. 在多任务上表现出色
  • 在任务如 ROC(区域-对象对应性)、REC(指代表达理解)和 TextVQA 等上,表现优于原始 Ferret 和其他主流方法。

用到的数据集

  1. 核心数据集
  • GRIT:用于训练基础的图文对齐能力。
  • RefCOCOg:测试指代表达理解能力。
  • LVIS-box:用于检测与区域对应性分析。
  • TextVQA:评估视觉问答能力。
  1. 扩展数据集
  • 添加了与任务相关的数据(如 OCR 数据集),进一步提升模型对特定任务的适应性。

解决的问题

  1. 高分辨率图像的处理局限性
  • 传统 MLLMs 使用固定分辨率的图像编码器,难以有效捕捉高分辨率细节。Ferret-v2 的“任意分辨率”方法克服了这一限制,显著提升了区域定位和对齐的精度。
  1. 多模态推理中的细节对齐问题
  • 通过多粒度视觉编码和增强的区域表示方法,模型更好地将文本描述与图像区域对齐,实现精细化的多模态推理。
  1. 泛化能力不足
  • 引入更广泛的任务数据,提升模型在视觉问答、光学字符识别等任务中的表现。

Relate Posts
MobileAgent系列学习 — Mobile Agent v2
Lazy loaded image
CLIP系列学习(八) — CLIPSeg
Lazy loaded image
CLIP系列学习(七)— SigLIP
Lazy loaded image
CLIP系列学习(三) — LongCLIP
Lazy loaded image
CLIP系列学习(二) — BLIP & BLIP 2
Lazy loaded image
CLIP系列学习(一)— CLIP
Lazy loaded image
MobileAgent系列学习 — Mobile Agent v2时间序列大模型学习(一) — Chronos
Loading...
Yixin Huang
Yixin Huang
一个热爱生活的算法工程师
Latest posts
时间序列论文阅读 — TimeCMA(AAAI 2025)
2025-4-23
时间序列论文阅读-ChatTime: A Unified Multimodal Time Series Foundation Model Bridging
2025-4-23
VLM系列论文阅读-Mixed Preference Optimization (MPO)
2025-2-6
VLM系列论文阅读 — Flamingo
2025-2-6
认识你自己,才是这件事的最终乐趣 — 抄录
2025-2-5
用GPT4学量化投资 — Junior Level - Unit 1: Introduction to Stock Markets and Data Handling
2025-1-23
Announcement
🎉NotionNext 4.5已经上线🎉
-- 感谢您的支持 ---
👏欢迎更新体验👏