Repository navigation
OpenMontage Drama Studio: Pillow for backdrop keying and vision-QA downscaling in an AI short-drama studio #10347
charliewwdev
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I wanted to share a small project where Pillow ended up doing a surprising amount of the quiet work: OpenMontage Drama Studio, a self-hosted web studio for making AI short dramas (短剧 / 漫剧).
What it does
You start with an idea and move through seven stages: script → cast → scenes → props → storyboard → video → voice → edit. Characters, locations and props get generated (or uploaded) once, then reused as references when each storyboard shot is turned into a clip.
Where Pillow comes in
Image.open(...).convert("RGBA"), sample the border and corners to estimate the plate colour, and walk the pixels viaim.load(). A pixel is keyed when its luma and chroma are close to that plate. Then we punch enclosed holes (the gap between an arm and a torso), despill the white fringe that sticks to hair and fabric edges, and repair PNGs that were already partially keyed.Image.Resampling.LANCZOSand re-encode as JPEG (quality=85, optimize=True). That one change made the QA step reliable.Run it
This starts the API (which also serves the built web UI), Postgres and Redis. You bring S3 or MinIO storage, an LLM API key, and a Volcengine Ark key for Seedream images and Seedance video (both are paid APIs).
It's an independent product rebuilt from the AGPL-3.0 calesthio/OpenMontage codebase and is not affiliated with that project. Thanks for Pillow. The pixel-access API made the backdrop keying a lot easier to iterate on than I expected.
All reactions