Update README.md
Browse files
README.md
CHANGED
|
@@ -1,54 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 🎬
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
-
python_version: "3.10"
|
| 10 |
pinned: false
|
| 11 |
-
license: mit
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
2) SAM2 segmentation (Meta)
|
| 17 |
-
3) MatAnyone professional video matting (CVPR 2025)
|
| 18 |
-
4) High‑fidelity compositing with your chosen background
|
| 19 |
-
|
| 20 |
-
This Space is a lightweight UI that calls a backend worker for heavy processing, ensuring fast builds and a responsive demo.
|
| 21 |
-
|
| 22 |
-
## How to use
|
| 23 |
-
- Upload a short MP4 (≤30s recommended for demo)
|
| 24 |
-
- Choose/provide a background image URL
|
| 25 |
-
- Click Process — the Space sends the job to your backend and shows progress
|
| 26 |
-
- Download the processed result
|
| 27 |
-
|
| 28 |
-
## Configure
|
| 29 |
-
Set Space Secrets (Settings → Variables):
|
| 30 |
-
- BACKEND_API_URL: https://your-backend.example.com
|
| 31 |
-
- AUTH_TOKEN: optional “Bearer ...” if your backend requires it
|
| 32 |
-
- DEFAULT_BACKGROUND_URL: optional fallback image
|
| 33 |
-
|
| 34 |
-
## Why decouple UI and compute?
|
| 35 |
-
- Faster, reliable Space builds (no large model installs here)
|
| 36 |
-
- Heavy GPU/CPU workloads run on your backend or a dedicated worker
|
| 37 |
-
|
| 38 |
-
## Requirements
|
| 39 |
-
Keep requirements minimal for quick builds:
|
| 40 |
-
- gradio==4.44.0
|
| 41 |
-
- requests>=2.31.0
|
| 42 |
-
- python-multipart>=0.0.9 (if server receives uploads)
|
| 43 |
-
|
| 44 |
-
If you process media locally in this Space, add apt.txt:
|
| 45 |
-
- ffmpeg
|
| 46 |
-
- libgl1
|
| 47 |
-
- libglib2.0-0
|
| 48 |
-
|
| 49 |
-
## Troubleshooting
|
| 50 |
-
- Match sdk_version to the gradio version in requirements
|
| 51 |
-
- Avoid git+ and torch installs in this Space; run models on the backend
|
| 52 |
-
- If uploads fail, test with smaller clips first, then tune backend timeouts
|
| 53 |
-
|
| 54 |
-
Built with ❤️ by MyAvatar — production‑ready and scalable.
|
|
|
|
| 1 |
---
|
| 2 |
+
title: VideoBackgroundReplacer
|
| 3 |
emoji: 🎬
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.0
|
| 8 |
app_file: app.py
|
|
|
|
| 9 |
pinned: false
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Video Background Replacer
|
| 13 |
+
AI-powered video background replacement using SAM2 and MatAnyone
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|