
给图片打标签、排名次。
在相册里找出截图、收据和自拍,找出有人闭眼的照片,以及不宜给人看的敏感照片。Eye 在设备上给每张照片打标签,不上传任何图片。
Eye 把近似重复的照片归成一组,从每组连拍里挑出该留的那张:没人闭眼,表情最好。同一瞬间拍下的四十张,最后只剩一张需要看。
在搭载 M6 的 Mac 上,Neural Engine 处理一张照片只需 5.5 毫秒,1 万张照片不到一分钟。在 Chrome 中通过 WebGPU 运行,一张照片用时 41 毫秒。
5.5 毫秒给一张照片打好标签。
Eye 在 M6 Mac 的 Neural Engine 上给一张照片打标签只需 5.5 毫秒,在 Chrome 中通过 WebGPU 为 41 毫秒。Core ML 和 LiteRT 两个构建在六个公开测试集上得分相同。
在一台搭载 Apple M6 的 Mac 上,对一张照片做完整分析。
| 运行时 | 用时 |
|---|---|
| Core ML, Neural Engine | 5.5ms |
| LiteRT, GPU (Metal) | 30ms |
| LiteRT.js, WebGPU, in Chrome | 41ms |
| LiteRT, CPU, 4 threads | 49ms |
| LiteRT.js, WebAssembly with threads, in Chrome | 176ms |
在公开测试集上的准确度,两个构建使用同一套评分代码
| 测试集 | Core ML | LiteRT(CPU) |
|---|---|---|
| KonIQ-10k, aesthetic SRCC | 0.6288 | 0.6291 |
| COCO val2017, person AP50 | 0.3814 | 0.3837 |
| MIT1003, where people look, CC | 0.7153 | 0.7195 |
| CUHK cropping, crop IoU | 0.8244 | 0.8241 |
| WIDER Face val, AP, hard | 0.6806 | 0.6812 |
| CEW, eyes open AUC | 0.9943 | 0.9945 |
两个构建在每个测试集上的结果相差都在千分之几以内。速度在一台搭载 Apple M6 的 Mac 上测得,LiteRT 构建尚未在 Android 手机上测过。
应用场景
给图片打标签、排名次。.
整理相册
把截图、收据、文档和白板照片与用户亲手拍的照片分开,相册应用就能把它们归档,或提示用户清理掉。
连拍只留最好的一张
把近似重复的照片收成一组,先展示该留的那张,没有人闭眼。其余的轻点一下就能删掉。
隐藏敏感照片
在共享家庭相册或浏览器上传表单中,赶在有人看到之前,把露骨、暴力或医疗类照片模糊处理。用严格阈值即可自动隐藏照片。
按内容搜索照片
在 558 种场景和各种照片类型中,找出所有拍到狗、海滩或收据的照片。可在 Web 应用或 Node 后端中运行,不需要云端视觉 API。
裁出封面图
为缩略图或分享卡片挑出视频里最好的一帧,或照片最合适的方形、宽屏裁剪。Eye 还能把横过来的照片转正。
模型能做什么
- 一次
analyze调用即可返回带置信度的标签、三个分数(美感分、保留分和封面分),以及照片中的人、宠物和人脸。同一次调用还会给出任意宽高比下的最佳裁剪、旋转校正和一个嵌入向量。 - 标签涵盖照片类型(截图、收据、文档、身份证件、白板等)、画质(清晰、模糊、背景虚化)和人物(合影、人像、所有人都在笑)。其余标签涵盖保留或删除的理由、敏感内容和 558 种场景。
- 每个标签都经过校准,0.5 是推荐阈值,0.9 是严格阈值。在 0.5 下,截图标签的正确率为 98%,收据标签为 100%,人物为 95%,闭眼为 92%。
- 场景标签的正确率中位数为 88%。保留或删除的理由(例如「没有记忆点」「构图不佳」)最不可靠,只宜用作建议。
- 每张人脸都有各自的标签:闭眼、微笑、看向镜头或看向别处、开心、惊讶。Eye 默认每张照片最多分析 20 张人脸。
Eye.duplicates、Eye.best和Eye.similar作用于整个图库:近似重复分组(可选只针对相隔几秒拍摄的照片)、一组照片里该留的那张,以及按相似度排序的照片。- 分析结果在 Swift、Kotlin 和 JavaScript 中保存为相同的 JSON,应用可以先存下来,之后无需加载模型就能筛选。
parts决定计算哪些部分:photo、layout、faces和sharpness。每个部分对应一次或多次模型运行,不需要的部分可以省掉。- Apple 平台上为 48 MB 的 Core ML,在 Neural Engine 上运行;Android、Linux、Windows、Node 和浏览器上为 66 MB 的 LiteRT。SDK 在首次使用时下载模型并缓存。
- 在浏览器中,若浏览器支持 WebGPU,Eye 通过 WebGPU 在 GPU 上运行,否则通过 WebAssembly 在 CPU 上运行。
快速上手
只需几行代码,即可为你的 iOS or macOS, Android or web 应用加上 图像分类。 Eye 文档.
// Swift Package Manager
.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "4.0.0")
// target dependency
.product(name: "Eye", package: "desert-ant-core")
import Eye
let eye = Eye()
let photo = try await eye.analyze(contentsOf: photoURL)
if photo.has(.screenshot) || photo.has(.receipt) { archive(photo) }
if photo.has(.sensitive, .strict) { hide(photo) }
photo.scores?.aesthetic // 0.81: better than 81% of photos
let keeper = Eye.best(of: burst)
Add Eye from Desert Ant Labs to this Swift project (iOS, macOS). What it does: Eye:设备端照片标签与评分. SDK: Swift (iOS, macOS) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme // Swift Package Manager .package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "4.0.0") // target dependency .product(name: "Eye", package: "desert-ant-core") Reference: - Model page: https://desertant.com/models/eye/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
// build.gradle.kts (Maven Central)
implementation("ai.desertant:eye:4.0.0")
import ai.desertant.eye.Eye
import ai.desertant.eye.Tags
Eye(context).use { eye ->
val photo = eye.analyze(bitmap)
if (photo.has(Tags.DOG) && !photo.has(Tags.BLURRY)) keep(photo)
val groups = Eye.duplicates(library)
}
Add Eye from Desert Ant Labs to this Kotlin project (Android).
What it does: Eye:设备端照片标签与评分.
SDK:
Kotlin (Android)
Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme
// build.gradle.kts (Maven Central)
implementation("ai.desertant:eye:4.0.0")
Reference:
- Model page: https://desertant.com/models/eye/
- Full catalog and other models: https://desertant.com/llms.txt
Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
npm i @desert-ant-labs/eye @litertjs/core # browser
npm i @desert-ant-labs/eye # Node
import { Eye, Tag } from "@desert-ant-labs/eye";
const eye = await Eye.load();
const photo = await eye.analyze(image);
if (photo.has(Tag.dog) && !photo.has(Tag.blurry)) keep(photo);
const groups = Eye.duplicates(library, { dates });
Add Eye from Desert Ant Labs to this JavaScript / TypeScript project (Web, Node.js). What it does: Eye:设备端照片标签与评分. SDK: JavaScript / TypeScript (Web, Node.js) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme npm i @desert-ant-labs/eye @litertjs/core # browser npm i @desert-ant-labs/eye # Node Reference: - Model page: https://desertant.com/models/eye/ - Full catalog and other models: https://desertant.com/llms.txt Add the SDK, then follow its README for the exact API and current version. Do not invent API names or method signatures; confirm them against the README.
规格
- 速度
- Neural Engine 上每张照片 5.5 毫秒(M6 Mac);Chrome 中通过 WebGPU 为 41 毫秒
- 准确度
- 阈值 0.5 下:截图精确率 98%,收据 100%,场景中位数 88%
- 标签
- 照片类型、保留或删除、画质、人物、人脸、敏感内容,以及 558 种场景
- 设备端体积
- 48 MB Core ML(Apple);66 MB LiteRT(Android、Linux、Windows、Node、浏览器)
- 平台
- iOS 18+、macOS 15+、tvOS 18+、visionOS 2+(Core ML);Android、Linux、Windows(LiteRT);浏览器和 Node(LiteRT.js)
Eye 是用照片训练的,因此插画、截图和大幅修图的评分不太可靠。保留或删除的理由(例如「没有记忆点」「构图不佳」)最不可靠,只宜用作建议;需要自动处理的场合请用严格阈值。人脸分析只描述一张脸,不识别这个人是谁。
常见问题
Eye 是什么?
按类型和内容给每张照片打标签,从截图、收据到 558 种场景,全程在设备上完成。
Eye 在设备上运行吗?
是的。Eye 在设备上运行,不调用任何服务器,因此数据始终留在用户手中。
Eye 支持哪些平台?
Eye 以面向 Swift, Kotlin, JavaScript / TypeScript 的原生设备端 SDK 形式提供。
Eye 的价格是多少?
每个模型免费支持最多 10 万台月活跃设备。推理次数不限。 如需定制授权,请联系我们。
Eye 的准确度和速度如何?
Eye 在 M6 Mac 的 Neural Engine 上给一张照片打标签只需 5.5 毫秒,在 Chrome 中通过 WebGPU 为 41 毫秒。Core ML 和 LiteRT 两个构建在六个公开测试集上得分相同。