MogensR commited on
Commit
76580be
Β·
1 Parent(s): 41bfe3c

Update readme.md

Browse files
Files changed (2) hide show
  1. README.md +51 -0
  2. readme.md +0 -68
README.md CHANGED
@@ -14,3 +14,54 @@ tags:
14
  - SAM2
15
  - MatAnyOne
16
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  - SAM2
15
  - MatAnyOne
16
  ---
17
+
18
+ # 🎬 BackgroundFX Pro β€” Professional Video Background Replacement
19
+
20
+ **BackgroundFX Pro** is an advanced video background replacement app built for **Hugging Face Spaces (GPU)**.
21
+ It combines cutting-edge AI segmentation and matting models with a simple Gradio UI:
22
+
23
+ - **[SAM2](https://huggingface.co/facebook/sam2)** β†’ high-quality object segmentation (first frame or image prompts).
24
+ - **[MatAnyone](https://huggingface.co/PeiqingYang/MatAnyone)** β†’ temporal video matting with consistent alpha masks.
25
+ - **Rembg fallback** β†’ ensures every video can be processed, even if models fail.
26
+
27
+ πŸ‘‰ The result: **fast, stable, professional-grade background replacement** β€” ideal for content creators, streamers, and marketing.
28
+
29
+ ---
30
+
31
+ ## ✨ Features
32
+
33
+ - πŸŽ₯ Upload any video and replace its background with:
34
+ - Solid colors
35
+ - AI-generated images
36
+ - Custom uploaded backgrounds
37
+ - ⚑ GPU-optimized (Tesla T4 / CUDA 12.x)
38
+ - 🧩 Model pre-warm for faster startup
39
+ - πŸ›‘οΈ Fallback pipeline so you *never lose frames*
40
+ - πŸ“‚ Persistent caching in `/data/.cache` for Hugging Face Spaces
41
+
42
+ ---
43
+
44
+ ## πŸš€ Try it on Hugging Face Spaces
45
+
46
+ [**β–Ά Open BackgroundFX Pro on Hugging Face**](https://huggingface.co/spaces/MogensR/VideoBackgroundReplacer2)
47
+
48
+ No installation required β€” runs directly in your browser with GPU acceleration.
49
+
50
+ ---
51
+
52
+ ## πŸ› οΈ Developer Notes
53
+
54
+ ### Local Development (with Docker)
55
+
56
+ Clone the repo and build locally:
57
+
58
+ ```bash
59
+ git clone https://huggingface.co/spaces/MogensR/VideoBackgroundReplacer2
60
+ cd VideoBackgroundReplacer2
61
+
62
+ # Build container (CUDA 12.3 base, Python 3.10, Torch 2.3.1+cu121)
63
+ docker build -t backgroundfx-pro .
64
+
65
+ # Run locally
66
+ docker run --gpus all -p 7860:7860 backgroundfx-pro
67
+
readme.md DELETED
@@ -1,68 +0,0 @@
1
- # 🎬 BackgroundFX Pro β€” Professional Video Background Replacement
2
-
3
- **BackgroundFX Pro** is an advanced video background replacement app built for **Hugging Face Spaces (GPU)**.
4
- It combines cutting-edge AI segmentation and matting models with a simple Gradio UI:
5
-
6
- - **[SAM2](https://huggingface.co/facebook/sam2)** β†’ high-quality object segmentation (first frame or image prompts).
7
- - **[MatAnyone](https://huggingface.co/PeiqingYang/MatAnyone)** β†’ temporal video matting with consistent alpha masks.
8
- - **Rembg fallback** β†’ ensures every video can be processed, even if models fail.
9
-
10
- πŸ‘‰ The result: **fast, stable, professional-grade background replacement** β€” ideal for content creators, streamers, and marketing.
11
-
12
- ---
13
-
14
- ## ✨ Features
15
-
16
- - πŸŽ₯ Upload any video and replace its background with:
17
- - Solid colors
18
- - AI-generated images
19
- - Custom uploaded backgrounds
20
- - ⚑ GPU-optimized (Tesla T4 / CUDA 12.x)
21
- - 🧩 Model pre-warm for faster startup
22
- - πŸ›‘οΈ Fallback pipeline so you *never lose frames*
23
- - πŸ“‚ Persistent caching in `/data/.cache` for Hugging Face Spaces
24
-
25
- ---
26
-
27
- ## πŸš€ Try it on Hugging Face Spaces
28
-
29
- [**β–Ά Open BackgroundFX Pro on Hugging Face**](https://huggingface.co/spaces/your-username/BackgroundFX-Pro)
30
-
31
- No installation required β€” runs directly in your browser with GPU acceleration.
32
-
33
- ---
34
-
35
- ## πŸ› οΈ Developer Notes
36
-
37
- ### Local Development (with Docker)
38
-
39
- Clone the repo and build locally:
40
-
41
- ```bash
42
- git clone https://huggingface.co/spaces/your-username/BackgroundFX-Pro
43
- cd BackgroundFX-Pro
44
-
45
- # Build container (CUDA 12.3 base, Python 3.10, Torch 2.3.1+cu121)
46
- docker build -t backgroundfx-pro .
47
-
48
- # Run locally
49
- docker run --gpus all -p 7860:7860 backgroundfx-pro
50
-
51
- app/ # Main Gradio app (app.py + utils + models)
52
- third_party/ # External model repos (SAM2, MatAnyone)
53
- requirements.txt # Python deps (beyond torch/cu121)
54
- Dockerfile # Container build (for HF Spaces + local)
55
- .dockerignore # Excludes junk/test files from image
56
-
57
-
58
- ---
59
-
60
- ✨ This way:
61
- - HF visitors see **what it does** + a **button to try it**.
62
- - Devs get copy-paste **Docker build/run** instructions.
63
- - You highlight SAM2 + MatAnyone, but also note fallbacks and HF infra.
64
-
65
- ---
66
-
67
- Do you want me to also **make a lightweight β€œbanner image”** (e.g. 1200Γ—400, LinkedIn-style) for the top of the README so the Space looks polished?
68
-