브라우저 AI 추론
WebGPU + ONNX Runtime으로 브라우저에서 AI 모델을 실행합니다. 서버 없이 프라이버시를 보장합니다.
ONNX Runtime Web
import * as ort from "onnxruntime-web";
// WebGPU 백엔드 사용
ort.env.wasm.numThreads = 4;
const session = await ort.InferenceSession.create(
"./model.onnx",
{ executionProviders: ["webgpu"] }
);
const input = new ort.Tensor("float32", imageData, [1, 3, 224, 224]);
const results = await session.run({ input });
const predictions = results.output.data;활용 사례
- 실시간 이미지 분류
- 텍스트 임베딩 생성
- 얼굴/객체 감지
댓글 0