This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Speaklab combined GPU server: gaze correction + background matting. | |
| Single endpoint handles both pipelines, sharing download/normalize/encode steps. | |
| Optimized: downscale for face detection, numpy compositing (no intermediate FFmpeg). | |
| POST / — process video | |
| video_url, supabase_url, supabase_key (required) | |
| gaze: bool (default false), gaze_x, gaze_y | |
| matting: bool (default false), bg_mode, bg_color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Vast.ai GPU server for LivePortrait eye contact correction. | |
| Takes a video where the person is looking at their screen (not camera), | |
| and corrects their gaze to look directly at the camera. | |
| Uses LivePortrait's keypoint manipulation: modifies eye keypoints | |
| (indices 11, 15) to redirect gaze, then renders with full pipeline. | |
| Pipeline: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Vast.ai GPU model server for RVM video matting. | |
| Simple HTTP server that receives matting jobs and returns results. | |
| Vast.ai PyWorker proxies requests to this server. | |
| Proxy-Matte Workflow: | |
| 1. Download video | |
| 2. FFmpeg downscale to 540p proxy (skip if source ≤540p) | |
| 3. RVM inference on proxy → grayscale alpha matte video |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json, urllib.request | |
| u = "https://pjxynrqzydcxstnpsbtg.supabase.co" | |
| v = u + "/storage/v1/object/public/video-matting/" | |
| v += "temp/bc175e3e-dd17-42e2-81b1-dd92b200173f/input.webm" | |
| k = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9." | |
| k += "eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBqeH" | |
| k += "lucnF6eWRjeHN0bnBzYnRnIiwicm9sZSI6InNlcn" | |
| k += "ZpY2Vfcm9sZSIsImlhdCI6MTczMTk4MTYyNiwiZXh" | |
| k += "wIjoyMDQ3NTU3NjI2fQ.S1v0czmrqPqSKx7LYMB" | |
| k += "cmRBXnEFmmiaKz2tXJOHPXtI" |