DEV Community

Dharamveer Singh
Dharamveer Singh

Posted on

SlothShot 🦥: Find Any Screenshot by What It Says or Means, Fully Offline

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Everyone has a screenshot graveyard. You capture an error, a chat, a recipe, a bank page. Three weeks later you remember "that Docker port thing", but the file is called Screenshot 2026-10-12 143022.png and it's buried among 800 others.

SlothShot is a local, offline librarian for those screenshots. It watches your screenshots folder, reads the text in every image with OCR, and lets you find them again by the exact words or by meaning. Searching docker port problem finds the screenshot that says address already in use, even though I never typed those words.

It saves the effort of remembering file names, scrolling thumbnails, and renaming things you were never going to rename. It can also rename screenshots for you from what they contain, and it never uploads anything anywhere.

Who gets to be lazier? Anyone with a screenshot folder: developers saving errors, students saving slides, anyone who screenshots instead of taking notes.

Demo


The demo runs with the Wi-Fi switched off, on an Intel i3 laptop with 8 GB of RAM and no GPU. A keyword search for friend sent recipe ingredients finds nothing, because those words aren't on screen. The hybrid search finds the recipe chat anyway.

Code

GitHub logo DS013git / SlothShot

Local-first Windows screenshot search with OCR and semantic embeddings, plus automatic filename suggestions and renaming.

SlothShot 🦥

A lazy librarian for your screenshots. It reads them, remembers them, and finds them by the words you remember or by what they were about. All on your own computer, with the Wi-Fi off.

Private, offline screenshot search for Windows. Find images by exact OCR text or semantic meaning with local OCR and embeddings.

🎬 Demo walkthrough and recording script: docs/DEMO.md.

You take a screenshot of an error, a chat, a recipe, a bank page. Three weeks later you remember "that Docker port thing", not the file name. SlothShot watches your screenshots folder, reads the text in every image with OCR, and lets you search by exact words and by meaning. Searching docker port problem finds the screenshot that says address already in use.

SlothShot uses OCR for search and offers three screenshot naming methods: OCR-only (the default, no Ollama), a local text model…

MIT licensed. Fast tests (107), ruff and mypy all pass on a fresh clone.

How I Built It

SlothShot is built around three open models, all running on the CPU through ONNX, with no PyTorch and no GPU:

  • OCR: RapidOCR with PP-OCRv6 small models (Apache-2.0), which ship inside the package.
  • Embeddings: BAAI/bge-small-en-v1.5 (MIT), run through fastembed. It is about 65 MB and is downloaded once.
  • Optional naming: a small local text model (qwen3:1.7b) or vision model (qwen3-vl:2b-instruct) through Ollama.

The pipeline is deliberately simple:

  1. A watcher notices a new screenshot and waits until the file is stable.
  2. The indexer hashes the file (SHA-256), so renames and copies don't repeat OCR.
  3. RapidOCR reads the text.
  4. The text goes into SQLite FTS5, so keyword search uses BM25 ranking.
  5. The text is also embedded and stored as float32 vectors in the same SQLite file.
  6. Hybrid search merges both rankings with Reciprocal Rank Fusion. There is no vector database, only an exact cosine-similarity scan in NumPy.

There is a command-line tool, a local Streamlit UI bound to 127.0.0.1, and an autostart script for Windows.

Measured on my own laptop (i3-1215U, 7.65 GiB RAM, CPU only):

What Result
Search at 5,000 records keyword about 2 ms, semantic about 142 ms
Peak RAM while indexing 586 MiB
Database for 105 images 0.34 MiB
Retrieval on my synthetic set (12 queries), top-1 hit keyword 0.83, hybrid 0.92, semantic 1.00

Two caveats: I wrote the test queries and the generator myself, so real-world accuracy will be lower. The 5,000-record timings use scaled copies of the real index.

Credits: RapidOCR, fastembed, ONNX Runtime, Streamlit, watchdog, SQLite, Ollama, and the BGE and Qwen model teams.

Why Does Open Innovation Matter?

Screenshots hold the most private things on a computer: chats, one-time passwords, bank pages, medical results. A cloud OCR API would mean uploading all of that.

Open models made the opposite design possible:

  • Private by construction. I ran the whole pipeline (OCR, embeddings, indexing, all three search modes) in a process where every network connection raised an error. It made zero connection attempts.
  • No per-image fee and no rate limit. The only cost is CPU time.
  • Swappable and auditable. The embedding and naming models are single lines in a config file. I could read every component and replace it.
  • It runs on cheap hardware. Small ONNX models fit on a laptop with no GPU.

Openness also let me find out what didn't work. I tried a local vision model to name screenshots. On my CPU-only laptop it took many minutes per image, so I made the instant OCR-based naming the default and kept vision as an opt-in. A hosted vision model would be faster than mine. I still wouldn't give it my bank screenshots.

My Agent Session

Updating SlothShot Metadata, Demo Script, and DEV Draft
You

Correct the outdated filename claim in docs/DEMO.md, set the GitHub repository description and topics, and make sure the DEV post says SlothShot can rename files.

Agent

Reviewed the demo script and repository state. The outdated sentence claimed filenames never change automatically. Prepared a one-line correction that says SlothShot can rename files automatically with its default OCR naming and that individual suggestions can be reviewed in the UI.

Agent
Agent
Agent
Agent

The demo narration is corrected, GitHub metadata is updated, and the unpublished DEV draft is ready for review.

OpenAI's Codex wrote most of the code. I directed the design, ran everything on my own laptop, and used a second AI assistant as an independent reviewer (a full-history secret scan and a fresh-clone test run). Three moments shaped the project:

  1. The vision model was too slow. Reading the Ollama log showed about 23 seconds just to encode one screenshot, before any text came out. That led to the OCR-first default.
  2. Renames failed with WinError 5. The cause was Codex's own Windows sandbox, which added a special permission entry to my project folder. The fix was running the app from a normal PowerShell, and I documented the lock handling.
  3. Two indexers raced each other. The watcher and the Index now button once crashed on a UNIQUE constraint error. We reproduced it, fixed it with INSERT OR IGNORE, and added tests.

The Lazy Payoff

  • Finding is instant, indexing is slow. Searching is a few milliseconds to about 140 ms at 5,000 screenshots. Reading a real screenshot is the slow part, about 12–25 seconds each on my laptop. That's a one-time background cost, and it resumes where it stopped. Slow and steady.

  • Honest limits: English-first, Windows-only in practice, and the database isn't encrypted, so OCR'd one-time codes are stored as plain text. The README says so.

Prize Categories

No partner categories. SlothShot uses no partner technology, so I'm entering for the overall prize.

Top comments (0)