# Weave

- **Event:** [RAISE Summit Hackathon](https://cerebralvalley.ai/e/raise-summit-hackathon)
- **When:** Jul 4 at 9:00 AM – Jul 5 at 7:00 PM (GMT+2)
- **Where:** Paris, France
- **Team:** [Preetham tjit](https://cerebralvalley.ai/u/ptjit)
- **GitHub:** https://github.com/preethamresearch/weave
- **Demo video:** https://youtu.be/NBrv3koBNn8
- **Gallery:** https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/91

Weave — the ad exchange that runs on your device, not in the cloud.
In-scene ads, chosen for each viewer by Gemma, entirely on-device. Unskippable for the brand, invisible to surveillance. Zero bytes leave the machine.

⭐ Situation (the problem):
Advertising is broken on both ends. No one watches ads — 2 in 3 viewers skip or block them, and by 2028 brands will lose $172B/year to ad fraud alone (Juniper Research); roughly $1 of every $3 in digital ad spend is wasted. The targeting that does run is surveillance — your identity is shipped to a cloud ad exchange, the same ad-tech a US court ruled an illegal monopoly (Apr 2025) and the EU fined €2.95B (Sep 2025). "In-scene" advertising (brands woven into the film you're watching) is the fast-growing fix — but today it's decided server-side, so your profile still leaves your device.

⭐ Task:
Move the entire ad exchange onto the viewer's device — make the targeting private, lawful, and unskippable, with no cloud — and prove nothing about the user ever leaves the machine.

⭐ Action (what we built):
Weave makes Gemma the entire on-device decision stack:
- Sees — Gemma vision scans the clip for ad surfaces; SAM 2 segments + tracks them across every frame.
- Obeys — a live law engine enforces the ad law of 25 countries (alcohol/tobacco/gambling bans, age gates); Gemma cites the exact statute before any brand can bid.
- Judges — an on-device auction ranks brands by taste, fit, and narrative consistency; Gemma picks one winner.
- Executes — SAM 2 burns the winning ad into the final video (original audio intact, one-click download).
- Proves — a Privacy Firewall meters every byte; the only network call is to on-device Ollama → external bytes = 0.

⭐ Result (statistics):
- 0 bytes leave the device — verified live on-screen by the Privacy Firewall.
- 25 countries' ad law enforced locally (switch to 🇫🇷 France and alcohol brands are struck instantly, statute named).
- 100% on-device targeting · 100% viewable, unskippable placement (vs. the 2-in-3 that skip/block interruptive ads).
- Full working pipeline: click a surface → SAM 2 tracks it → Gemma auction → ad burned into a downloadable MP4 — no cloud, no upload.
- Brand value up, waste down: an in-scene ad can't be skipped, blocked, or faked — it recovers the ~$1-in-$3 today's ad spend loses, and it feels inclusive instead of interruptive.

The one-liner: The same targeting Big Tech runs on a cloud full of GPUs, Weave runs on your laptop — privately, lawfully, and with taste.

Built for the RAISE Summit Hackathon · Google DeepMind on-device track. Stack: Gemma (Ollama) + SAM 2 + React/Vite + Node.

## More from RAISE Summit Hackathon

- [DriftRadar](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/88)
- [MILA](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/89)
- [GrAIt](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/90)
- [AlphaGo](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/92)
- [MOE](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/93)
- [ThePromptDefence](https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/94)

---

Markdown version of https://cerebralvalley.ai/e/raise-summit-hackathon/hackathon/gallery/91. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
