classify-ad-assets
Use when classifying images for ad platform eligibility using a 3-stage pipeline — rule-based filtering, face detection, and Gemini Vision AI assessment. Produces quality scores and platform-specific eligibility for Meta, Pinterest, and Google ads.
| Model | Source |
|---|---|
| sonnet | pack: ad-assets |
Full Reference
classify-ad-assets
Section titled “classify-ad-assets”3-stage classification pipeline for ad asset eligibility. Stage 1 filters disqualified images instantly via rule-based checks with no AI cost. Stage 2 detects face presence via Gemini humanElement score or client-side face-api.js. Stage 3 sends qualifying assets through Gemini Vision for multi-criteria quality scoring, producing platform-specific eligibility flags for Meta, Pinterest, and Google.
Quick Reference
Section titled “Quick Reference”| Fact | Value |
|---|---|
| Gemini Vision model | gemini-2.5-flash |
| Cost per image | ~$0.0007–$0.001 |
| Cost per 1,000 images | ~$0.70–$1.00 |
| Required env var | GEMINI_API_KEY |
| Stage 1 min dimensions | 600x314px |
| Stage 3 concurrency default | 5 parallel requests |
| Overall score threshold (strong) | >= 0.70 |
| Overall score threshold (marginal) | >= 0.55 |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Set up env vars, Zod schemas, and the full config object | setup.md |
| Filter images by dimensions, format, file size, and excluded folders (Stage 1) | rule-filter.md |
| Detect faces with Gemini proxy, face-api.js, or TensorFlow.js fallback (Stage 2) | face-detection.md |
| Score images with Gemini Vision — prompt, API call, retry logic, cost (Stage 3) | gemini-vision.md |
| Compute weighted scores, platform thresholds, and eligibility flags | scoring-eligibility.md |
| Classify a single asset or run a concurrent batch with CLI and output shapes | batch-processing.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.
Announcement
Section titled “Announcement”┏━ 🏷 classify-ad-assets ━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Score and flag ad images for Meta, Pinterest, and Google eligibility ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛