Adaptive Post-Production Product Placement
About the Project
Motivation
Traditional product placement in movies is static, generalized, and often irrelevant to global audiences.
Movies today show the same brands to everyone, regardless of location, availability, or viewer relevance. Unlike modern digital advertising platforms that rely on personalization, cinematic ads remain one-size-fits-all—leading to low engagement and wasted exposure.
What We Built
We built a post-production adaptive product placement system that dynamically replaces branded objects in movies based on viewer context, without reshooting or altering the storyline.
Key idea:
Instead of changing the movie, we change the ads inside the movie.
Technical Architecture
1. Video Input & User Control
Users can interact with the system in two ways:
- Full Video Mode: submit the entire video and allow the system to automatically detect all relevant replacement opportunities
- Manual Targeting Mode: use movable on-screen selection buttons to indicate specific regions or objects where replacements should occur
This creates a lightweight video-editing workflow that combines user intent with automated understanding.
2. Video Understanding
- Gemini watches the video end-to-end
- Identifies frames containing relevant branded objects
- Uses the user’s request and optional manual selections to filter semantically meaningful scenes
Input: Video + user intent → Output: Target frames
3. Object Segmentation
- SAM 3 (Segment Anything Model v3) performs precise object segmentation
- Generates pixel-accurate masks for selected objects
- Handles occlusion, lighting consistency, and perspective
4. Brand Replacement
Using the generated masks, we apply post-production inpainting and embedding to replace original brands with context-aware alternatives.
Replacement logic considers:
- Location
- Regional availability
- Viewer relevance
$$ \text{Ad Selection} = f(\text{Location}, \text{Availability}, \text{Context}) $$
Example Use Cases
Ordered Examples
- iPhones in U.S. releases → Huawei for China
- Starbucks cups → Milo in Nigeria
- Ford F-150 → VW Golf for viewers in Germany
Unordered Capabilities
- No reshoots required
- Post-production only
- User-guided or fully automated
- Region-aware personalization
- Scalable to long-form content
Why It Matters
Instead of advertising at everyone, we advertise to the right audience.
This system transforms static product placement into a dynamic, personalized advertising layer without breaking immersion.
Built With
- comfyui
- fastapi
- gemini
- python
- pytorch
- sam3
- typescript
- vastai
Log in or sign up for Devpost to join the conversation.