跳到正文
DEV Community· Zikra·· 2 小時前AI 評分41

MemoryBox:以本機 AI 搜尋截圖的私隱優先工具

Memory Box

AI 導讀

MemoryBox 是一款以私隱為先的截圖搜尋工具,網頁示範版讓用戶手動上載截圖,再以自然語言搜尋。它使用 Tesseract.js OCR 讀取文字,並透過 Ollama 在本機運行 Gemma 3 4B 和 nomic-embed-text,結合關鍵字及向量相似度搜尋。AI 推理不依賴雲端 API,桌面應用程式則是長遠計劃。

正文

Cover image for Memory Box

Zikra

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

MemoryBox is a privacy-first screenshot search tool that helps students, developers, and researchers find images using natural-language queries. This web demo requires manual screenshot uploads and uses OCR, Gemma 3 4B, and local embeddings for visual understanding and semantic search.

The actual vision is a desktop app that, with user permission, accesses selected screenshots and pictures, indexes them automatically, and runs open-weight AI models locally. The planned business model is a one-time desktop license.

Demo

Code

MemoryBox web demo

MemoryBox is a privacy-first screenshot search demo. Drop screenshots into the browser, let local Tesseract.js OCR read their text, then search that extracted text. Optionally, use a locally running Ollama vision model to create extra screenshot metadata. There is no application backend, account system, analytics, upload endpoint, cloud OCR, or cloud AI API.

Run locally

Use Node.js 20 or newer:

npm install
npm run dev

Open the local Vite address shown in the terminal (normally http://localhost:5173). For a production build:

npm run typecheck
npm test
npm run build
npm run preview

Demo workflow

  1. Drag PNG, JPG/JPEG, or WebP screenshots onto the upload panel, or use Choose images.
  2. Approve the browser’s first-time OCR language-data download if prompted by Tesseract.js.
  3. Watch per-image indexing progress and failures.
  4. Optionally open Local AI and use Test connection. MemoryBox defaults to gemma3:4b at http://localhost:11434.
  5. Enable automatic analysis for new…

How I Built It

I built MemoryBox as a browser-based demo using Tesseract.js for OCR and Ollama for local AI inference. Gemma 3 4B analyzes screenshots and generates visual descriptions, while the open-weight nomic-embed-text model creates embeddings for semantic search. A hybrid search system combines keyword matching with vector similarity, storing metadata and embeddings in IndexedDB. All AI inference runs locally through Ollama, without cloud AI APIs. The long-term plan is to bring this workflow to a desktop app with permission-based access to local screenshots.

Why Does Open Innovation Matter?

Open innovation made privacy-first, local AI possible with no dependence on paid cloud APIs. Using open-weight Gemma and nomic-embed-text through Ollama lets users analyze and search personal screenshots on their own devices, keeping sensitive information local. It also gives developers the freedom to inspect, replace, and improve models, making MemoryBox more adaptable and affordable.

My First User

My first user was my sister, who used MemoryBox to find screenshots she couldn't locate manually. It was genuinely helpful for her, and she paid me ₹100 for it-my first revenue from the project!

My second user was a friend who liked the idea and offered to share around $200 worth of API credits he won in a competition to help me develop it further. These early responses showed me that MemoryBox could solve a real problem for people.

Prize Categories

Best Use of Gemma - MemoryBox uses Google's open-weight Gemma 3 4B vision model locally through Ollama to understand screenshots, generate visual descriptions, and extract useful context. Combined with local embeddings, it enables privacy-first screenshot search based on meaning rather than exact keywords, without relying on cloud AI APIs.

Thank You!

來源:DEV Community · dev.to