Problem
BannerStat crawls websites and collects ad banners with their landing links, so advertisers and agencies can monitor competitors. The product shows where a competitor advertises, but cannot answer "what is new from the competitor". The market thinks in ad campaigns (ACs), while the stream is a flat heap of banners. Grouping is unsupervised: no labels, an unknown number of campaigns, a new one every day, so classification is out. Duplicates, color-biased embedders and extreme formats such as header strips hurt clustering.
Example from the article: the database holds about 6 million programmatic banners and gains about half a million a month. One advertiser's banners are very diverse, so competitive analysis stays slow until they are grouped into campaigns.
Solution in brief
Cluster only within one landing URL, remove duplicates with perceptual hashes and then embeddings, and embed banners with SigLIP-base plus a LoRA adapter trained on labeled campaigns. Add OCR text as a BM25 similarity matrix on top of the visual distance and run HDBSCAN on the combined matrix. ARI rose from 0.559 to 0.689.
Questions this case answers
- How to group an unlabeled stream of images into clusters within one source when the number of groups is unknown and grows daily and duplicates are common
- How to pick an image embedder that stays stable across formats and combine visual distance with exact-word text similarity for clustering
- How to group a stream of ad banners into ad campaigns without labels or a known number of campaigns
- How to deduplicate millions of near-identical images cheaply with perceptual hashes and embeddings
Tools and methods
- pHash + colorHash with chunk join — level-1 deduplication in SQL
- Embedding cosine threshold — level-2 deduplication
- SIS (Scale-Invariant Score) — custom metric for choosing an embedder
- SigLIP-base + LoRA (HuggingFace PEFT) — visual embeddings, triplet loss
- EasyOCR and BM25 — banner text and its lexical similarity
- HDBSCAN — clustering; ARI, NMI and noise share as metrics
Google or a one-time email code. No password.
