Running AI in a Manifest V3 Extension: Putting 1024-D Vector Search Inside the Browser
说明与用途
OmniPic 在 Chrome MV3 扩展中实现客户端图像搜索,使用 1024 维向量和本地存储,确保 0 字节上传并遵守 MV3 限制。
问题
Implement on‑device image feature extraction and vector similarity search in a Chrome MV3 extension while respecting MV3 constraints (disposable service worker, limited memory/bundle size, stricter permissions).
结果
OmniPic demonstrates that on‑device AI can be built within MV3 limits, providing fast, private image search without server involvement.
工作流
- Load image from page or user upload
- Extract features on‑device using a lightweight model
- Convert features to a 1024‑dimensional vector
- Store vector and metadata in browser storage
- For a query image, repeat extraction
- Compute cosine similarity against stored vectors
- Return top‑K similar results to the user
证据
This is an engineering write‑up, not a product launch. It documents how I run image feature extraction and vector similarity search entirely on the client side of a Chrome extension — no image ever leaves the user's device — under the constraints Manifest V3 imposes.
The index lives locally. Vectors and metadata are stored in browser storage. Queries never touch the network, which is what makes a "0 bytes uploaded" claim structurally true rather than a policy promise.
The service worker is disposable. Background work can be killed at any time, so long tasks and model state must be designed to be resumable and split into short units.
- 记录日期: 2026-10-26T02:11:35.968Z