AswinTorch GitHub avatar

photo-sticker-extract-demo

AswinTorch

一个独立的 Expo iOS 演示应用,使用 Apple Vision 从照片中提取主体,生成带有白色轮廓和投影的贴纸,并播放基于 WebGPU 的像素爆炸动画。

Stars

37

7 天增长

暂无数据

Fork 数

3

开放 Issue

0

开源协议

暂无数据

最近更新

2026-06-26

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

该演示将 Apple Vision、Core Image、WebGPU 和 Reanimated 整合在一个应用中,展示了精美的贴纸提取用户体验,并伴有引人注目的粒子动画。

适合谁使用

  • 探索 VisionKit 和 Core Image 集成的 iOS 开发者
  • 对原生模块和 WebGPU 使用感兴趣的 React Native 开发者
  • 原型设计贴纸创建效果的 UI/UX 设计师
  • 评估 Expo 高级原生功能能力的开发者

典型使用场景

  • 从用户照片创建自定义贴纸
  • 在移动应用中原型化图像主体提取功能
  • 在 React Native 中展示 WebGPU 粒子动画
  • 演示对不支持设备的降级处理

项目优势

  • 利用 Apple Vision 框架实现精确的主体提取
  • 在单个 Expo 演示中结合了 Vision、Core Image、WebGPU 等多种原生技术
  • 当未检测到主体或 iOS < 17 时提供原始照片的降级方案
  • 附有视频演示供参考

使用前须知

  • 仅支持 iOS 且需要 iOS 17+
  • 无法在 Expo Go 中运行,需要自定义开发客户端和 Xcode
  • WebGPU 及部分动画在 iOS 模拟器上可能不可靠

README 快速开始

Photo → Sticker Extraction Demo

A standalone Expo (iOS-only) demo of a single feature: take or pick a photo, lift its subject with Apple Vision into a sticker (white outline + drop shadow on a transparent PNG), and play a WebGPU "pixel-explosion" animation as the extracted sticker rises and settles into place.

Video demo: Watch on X

How it works

  • Subject lift + sticker render — a local Expo native module (modules/stickerizer, Swift) using VisionKit VNGenerateForegroundInstanceMaskRequest + Core Image. iOS 17+.
  • Pixel-explosion animation — WebGPU via react-native-wgpu (components/pixel-explosion-scene.ts), driven by a particle grid sampled from the photo.
  • Lift / pinch transitions — Reanimated (components/lift-extraction-stage.tsx).

Requirements

  • iOS 17.0+ (simulator or device) and a recent Xcode.
  • A custom dev client — this uses native modules, so it does not run in Expo Go.

Run

bun install        # or npm install
npx expo run:ios   # prebuilds ios/, links the Stickerizer pod, installs to the sim

The iOS Simulator has no camera, so use "Choose photo" with an image that has a clear subject. (Drag an image into the simulator's Photos app first.) On a device, the camera shutter works too.

Animations and effects may not work in the simulator — WebGPU and some Reanimated transitions can be unreliable or disabled there. Use a physical device to see the full pixel-explosion and lift animation in action.

On iOS < 17 (or if no subject is detected) the flow falls back to showing the raw photo.

项目描述

Expo demo: photo → Apple Vision sticker extraction with WebGPU pixel-explosion animation

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web 开发前端框架
14,861
vercel-labs
精选
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI 与机器学习AI 智能体
1,191