Shapes.
온디바이스 도형 인식. 손으로 그은 한 획을 사각형, 타원, 삼각형, 별, 직선으로 바꿉니다. 10밀리초 이내.
데모
거친 스케치. 완벽한 도형.
거친 원을 그리면 Shapes가 깔끔한 원으로 스냅합니다. Shapes는 정밀한 벡터 기하로 맞추고, 축·원·정사각형·15도 회전에 스냅하며, 도형이 아닌 낙서는 거부합니다.
Apple에서는 호출 한 번으로 PencilKit 캔버스에 메모 앱 스타일의 스마트 도형 스냅을 더할 수 있고, 라이브 미리보기도 그대로 남습니다. Apple의 “Snap to Shape”는 서드파티 앱이 호출할 수 없는 비공개 API이므로, Shapes가 같은 일을 한 줄로 해냅니다.
모델은 앱 안에 담아 출시할 만큼 작고, 내려받을 것이 없습니다. 브라우저에서는 Shapes가 LiteRT.js로 실행됩니다.
획당 10밀리초 이내.
획당 10밀리초 이내, Apple에서 0.2MB, Android와 웹에서 1.3MB 모델로.
내부 측정. Apple은 Core ML, 브라우저는 LiteRT.js, Node는 사전 빌드된 네이티브 라이브러리.
메모 앱 스타일 스마트 도형
canvasView.enableShapeSnapping() 한 줄로 PencilKit 캔버스에 도형 스냅을 추가합니다. 라이브 미리보기와 실행 취소, 다시 실행이 유지되며, Apple의 비공개 Snap to Shape API가 남긴 공백을 채웁니다.
손으로 그린 다이어그램 다듬기
다이어그램이나 화이트보드 도구에서 거친 스트로크를 정밀한 도형으로 바꿉니다. tldraw, Excalidraw 스트로크 데이터와 함께 작동합니다.
크로스 플랫폼 드로잉
인식기 하나가 iOS, Android, 웹을 아우르므로, 스냅 코드는 한 번만 작성하면 됩니다.
다운로드 없이 앱에 담아 출시
Apple에서 인식기는 0.2MB이고 바이너리 안에 담겨 출시되며, Android 패키지는 기본으로 번들합니다. 브라우저에서는 SDK가 1.3MB를 한 번 가져와 캐시합니다.
영감
Shapes(으)로 만들 아이디어. 프롬프트를 코딩 에이전트에 복사해 시작하세요.
Build a whiteboard that snaps rough sketches into clean shapes.
Build a drawing canvas where a freehand stroke is passed to Desert Ant's Shapes on-device and snapped to a clean rectangle, ellipse, triangle, star, or line in under 10ms. Keep the ink as an undo. Works offline. Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Clean up a freehand diagram into crisp shapes.
In a diagramming tool, run Desert Ant's Shapes on each stroke to convert rough sketches into clean geometry as the user draws. Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Add shape recognition to a web canvas with no download.
Add Desert Ant's Shapes to a browser drawing app (WebAssembly), so a hand-drawn stroke snaps to a clean shape with nothing to download and no server. Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Snap flowchart boxes and connector lines as you sketch them.
In a diagram or flowchart tool, run Desert Ant's Shapes on each stroke so hand-drawn boxes and connector lines snap to clean geometry live. (Add your own arrowheads on a recognized line.) Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Add smart-shape drawing to a kids' learning app.
Use Desert Ant's Shapes on-device so a child's rough drawing of a circle or triangle snaps to a clean shape, teaching by doing. Works offline. Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
Recognize gesture shapes to trigger app actions.
Use Desert Ant's Shapes to turn a drawn gesture (a circle, a triangle) into an app action, recognized on-device in under 10ms. Build it with the Desert Ant SDK. Shapes (Swift, Kotlin, JavaScript / TypeScript). Install and API: https://desertant.com/docs/shapes/. Install: SwiftPM desert-ant-core; Maven ai.desertant:shapes:3.1.0; npm i @desert-ant-labs/shapes @litertjs/core. SDK source: https://github.com/Desert-Ant-Labs/desert-ant-core. Machine-readable catalog of every model and SDK: https://desertant.com/llms.txt.
모델이 하는 일
- PencilKit, tldraw, Excalidraw, 또는 직접 만든 캔버스에서
[x, y]점들로 전달되는 한 번에 한 획씩. - 사각형, 타원, 삼각형, 별, 직선을 인식하고, 도형이 아닌 것은 거부합니다.
- 축, 원, 정사각형, 15도 회전에 스냅합니다.
- 호출 한 번으로 PencilKit 실시간 스냅:
canvasView.enableShapeSnapping(). - 브라우저에서는 LiteRT.js로 실행됩니다. Node는 사전 빌드된 네이티브 라이브러리를 씁니다.
시작하기
도형 인식을(를) 몇 줄의 코드로 iOS or macOS, Android or web 앱에 추가하세요. Shapes 문서.
// Swift Package Manager
.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core", from: "3.1.0")
// target dependency
.product(name: "Shapes", package: "desert-ant-core")
import Shapes
let shapes = Shapes()
let shape = try await shapes.recognize(points: stroke)
// Shape? -> rectangle, ellipse, triangle, star, line
import PencilKit
import Shapes
// Live smart-shape snapping on a PencilKit canvas, in one line.
// Pause after a stroke to preview the fit, lift to snap. Undo-safe,
// and it uses the same recognizer, bundled by default.
canvasView.enableShapeSnapping()
Add Shapes from Desert Ant Labs to this Swift project (iOS, macOS). What it does: 온디바이스 단일 스트로크 도형 인식. 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", from: "3.1.0") // target dependency .product(name: "Shapes", package: "desert-ant-core") Reference: - Model page: https://desertant.com/models/shapes/ - 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:shapes:3.1.0")
import ai.desertant.shapes.Shapes
val shapes = Shapes(context)
val shape = shapes.recognize(points)
// Shape? -> rectangle, ellipse, triangle, star, line
Add Shapes from Desert Ant Labs to this Kotlin project (Android).
What it does: 온디바이스 단일 스트로크 도형 인식.
SDK:
Kotlin (Android)
Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme
// build.gradle.kts (Maven Central)
implementation("ai.desertant:shapes:3.1.0")
Reference:
- Model page: https://desertant.com/models/shapes/
- 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/shapes @litertjs/core
import { Shapes } from "@desert-ant-labs/shapes"; // browser
// import { Shapes } from "@desert-ant-labs/shapes/native"; // server-side Node
const shapes = await Shapes.load();
const shape = await shapes.recognize(points);
// { kind: "ellipse", center: {...}, ... } or null
Add Shapes from Desert Ant Labs to this JavaScript / TypeScript project (Web, Node.js). What it does: 온디바이스 단일 스트로크 도형 인식. SDK: JavaScript / TypeScript (Web, Node.js) Repo: https://github.com/Desert-Ant-Labs/desert-ant-core#readme npm i @desert-ant-labs/shapes @litertjs/core Reference: - Model page: https://desertant.com/models/shapes/ - 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.
사양
- 도형 종류
- 사각형, 타원, 삼각형, 별, 선
- 온디바이스 크기
- 0.2MB Core ML (Apple); 1.3MB LiteRT (Android, 웹)
- 속도
- <10ms
- 웹 런타임
- 브라우저는 LiteRT.js, Node는 네이티브 라이브러리
Shapes는 한 번에 획 하나만 읽으므로, 두 획으로 그린 도형은 인식하지 못합니다. 너무 거칠거나 애매한 획은 일부러 거부하기 때문에, 낙서가 삼각형으로 스냅되는 일이 없습니다.
여러 획으로 이루어진 다이어그램은 획을 먼저 묶는 단계를 직접 만들어야 합니다.
자주 묻는 질문
Shapes은(는) 무엇인가요?
온디바이스 도형 인식. 손으로 그은 한 획을 사각형, 타원, 삼각형, 별, 직선으로 바꿉니다. 10밀리초 이내.
Shapes은(는) 온디바이스로 실행되나요?
네. Shapes은(는) 서버 호출 없이 기기에서 실행되므로, 데이터는 사용자의 기기에 그대로 남습니다.
Shapes은(는) 어떤 플랫폼을 지원하나요?
Shapes은(는) Swift, Kotlin, JavaScript / TypeScript용 네이티브 온디바이스 SDK로 제공됩니다.
Shapes의 비용은 얼마인가요?
모든 모델은 SDK당 월간 활성 기기 10만 대까지 무료입니다. 사용자당 추론은 무제한입니다. 맞춤 라이선스는 문의하기 바랍니다.
Shapes은(는) 얼마나 정확하고 빠른가요?
획당 10밀리초 이내, Apple에서 0.2MB, Android와 웹에서 1.3MB 모델로.