Espada
Built at Meta Global AI Developer Hackathon · Oct 26, 2026 · Remote

Image Unit Tests is a self-verifying image-generation agent that solves the problem of "constraint failure" in synthetic data generation. If you are building computer vision datasets, you need exact counts (e.g., "exactly 8 apples"). Image generators frequently fail this, forcing humans to manually count objects and re-prompt. We built a closed-loop agent that autonomously fixes these failures: Muse Spark parses the brief into a strict JSON constraint checklist. Muse Image generates the picture. SAM 3.1 segments the objects. A deterministic Python script counts the masks. If the count is wrong, the agent provides precise numeric feedback (e.g., "you have 9, remove 1") back to Muse Image. Crucially, our project includes a rigorous evaluation of the verifier itself. Through a blinded human audit, we discovered that while numeric feedback steers the editor (reducing human-counted error by 3.79 vs 0.74 for generic feedback), SAM has a 72.7% false-pass rate on hard counts. We built an UNCERTAIN state to route these ambiguous images to human review, proving that for high-stakes synthetic data, a deterministic verifier is necessary, but human-in-the-loop is still required to enforce ground truth.