CLAUDE LABJP
MCP — Claude now supports more of the MCP 2026-07-28 spec, bringing a stateless core, stronger OAuth and OIDC authorization, and versioned extensions for Apps and TasksDESIGN — /design arrived as a research preview on August 17. Hand it an idea, a screenshot, or an existing design and it returns editable artboards in Claude DesignOUTPUT — A Concise output style now leads with the result, which helps when you would rather not read past the preamblePERMISSIONS — Auto mode is the new default, and you write allow and deny rules as plain sentences rather than patternsLIMITS — The 50 percent increase to weekly limits runs through August 31 for Pro, Max, Team, and seat-based Enterprise plans. Six days remainRESUME — Sessions that hit a usage limit now continue automatically once the limit resets, and protections against credential leaks have been strengthenedMCP — Claude now supports more of the MCP 2026-07-28 spec, bringing a stateless core, stronger OAuth and OIDC authorization, and versioned extensions for Apps and TasksDESIGN — /design arrived as a research preview on August 17. Hand it an idea, a screenshot, or an existing design and it returns editable artboards in Claude DesignOUTPUT — A Concise output style now leads with the result, which helps when you would rather not read past the preamblePERMISSIONS — Auto mode is the new default, and you write allow and deny rules as plain sentences rather than patternsLIMITS — The 50 percent increase to weekly limits runs through August 31 for Pro, Max, Team, and seat-based Enterprise plans. Six days remainRESUME — Sessions that hit a usage limit now continue automatically once the limit resets, and protections against credential leaks have been strengthened
Articles/API & SDK
API & SDK/2026-07-11Advanced

Is This New Wallpaper Too Close to One We Already Ship? Near-Duplicate Detection with a Perceptual-Hash Pre-Filter and Claude Vision

A two-stage pipeline that catches the near-duplicates a SHA256 hash misses — recolored, lightly cropped, re-encoded — by pre-filtering with a perceptual hash and adjudicating only the close pairs with Claude Vision. With measured precision calibration and cost design from running a wallpaper catalog solo.

Claude Visionimage processingduplicate detection2perceptual hashcost design4

Premium Article

I was about to add sixty freshly finished wallpapers to the catalog one morning when I stopped scrolling. That blue gradient — I feel like I've shipped something close to it before.

Memory is not reliable. Somewhere in a catalog that had grown to a few thousand images, was there really a near-match, or was I imagining it? For a while I had no way to check, and I published on a quiet "probably fine."

Shipping the same wallpaper twice with only a color change reads as recycling. It costs you a little in the store's impression, and a little in daily trust. This article is about catching the near-duplicates an exact hash never sees — using a perceptual hash and Claude Vision in two stages — with the numbers from running a wallpaper catalog as a solo indie developer.

The morning an exact hash let one slip through

My first move was to compare the raw bytes of each file with SHA256. That is airtight for duplicate files: identical bytes produce identical hashes. I once built a ledger around exactly this idea to clean up duplicates on the Files API (I wrote it up in Deduplicating with content hashes on the Files API).

In the wallpaper workflow, though, it was almost useless. The reason is simple: most of what I perceive as "similar" is, byte for byte, a different file.

OperationAppearanceSHA256
Warm the color balance slightlyNearly identicalChanges completely
Trim a few percent off the edgesNearly identicalChanges completely
Re-encode on export (quality 90 to 85)IdenticalChanges completely
Downscale by 10 percentIdenticalChanges completely

An exact hash returns an unrelated value if even one pixel differs. So the case that troubled me most — looks the same, but slightly different — was precisely the one it could never catch, by design.

What I needed was a tool that measures visual closeness, not byte equality.

Why pair a perceptual hash with Vision

The classic tool for quantifying visual closeness is the perceptual hash. You shrink the image drastically, convert it to grayscale, keep only the light-dark relationships between neighboring pixels, and fold that into 64 bits. Because color tweaks and light compression preserve the light-dark skeleton, similar images produce similar hashes.

A perceptual hash alone was not precise enough, though. Loosen the threshold and you miss fewer duplicates but also pick up unrelated designs that happen to share a composition. Tighten it and you miss the recolored near-duplicates. That band — where loosening and tightening both fail — is exactly the region a human resolves at a glance but a machine struggles with.

So I split the roles. The perceptual hash stays a cheap, fast, high-volume pre-filter for narrowing candidates, and only the final "is this essentially the same?" call goes to Claude Vision. Vision is expensive, but after the narrowing it runs very few times. Earn recall with the cheap filter; recover precision with the expensive judgment. That division of labor is the heart of the design.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Catch the recolored and lightly cropped near-duplicates that an exact SHA256 match lets slip through, using a perceptual hash and Vision in two stages
Cost design that avoids the all-pairs comparison (a perceptual hash trims candidate pairs to about 0.03 percent before Vision) with real precision calibration
An abstain route that sends the gray zone to a human queue, plus a design that avoids flagging legitimate series variations as duplicates
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

API & SDK2026-07-05
Don't Let the Opus 4.7 Fast Mode Retirement (July 24) Kill Your Unattended Jobs
claude-opus-4-7 fast mode retires on 2026-07-24, and speed: fast starts throwing errors. Here's how to keep unattended pipelines from breaking silently: mechanically detect where fast mode is used, add a fail-closed runtime guard, and migrate to 4.8 with working code.
API & SDK2026-08-23
The September Price Increase for Sonnet 5 Isn't Happening. Rebuilding a Forecast I Got Wrong in July
Sonnet 5's introductory $2/$10 pricing was supposed to rise to $3/$15 on September 1. It won't. Here's how to recompute your own effective cost from the usage numbers you already have, with working code.
API & SDK2026-08-19
The listen Stream Kept Reopening Against My Serverless MCP Server
No errors anywhere, yet connections to the MCP server kept piling up overnight. Here is what happens when a fixed platform timeout meets a resubscribe loop, reproduced in a few dozen lines.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →