Spaces:
Runtime error
Runtime error
jhj0517
commited on
Commit
·
a5bb941
1
Parent(s):
869e94e
Update README to huggingface metadata
Browse files
README.md
CHANGED
|
@@ -1,78 +1,11 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
- Add filters to segment parts of a video with pixelated or solid color
|
| 13 |
-
|
| 14 |
-
<table>
|
| 15 |
-
<tr>
|
| 16 |
-
<td align="center"><strong>Pixelize the girl's face</strong></td>
|
| 17 |
-
</tr>
|
| 18 |
-
<tr>
|
| 19 |
-
<td>
|
| 20 |
-
<video controls autoplay loop src="https://github.com/user-attachments/assets/c5758970-dc15-4bc8-a918-8d3e8e44a73a" muted="false"></video>
|
| 21 |
-
</td>
|
| 22 |
-
</tr>
|
| 23 |
-
</table>
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
- Divide segmentation parts into layers and save them as PSD files.
|
| 27 |
-
|
| 28 |
-
<table>
|
| 29 |
-
<tr>
|
| 30 |
-
<td align="center"><strong>Divide clothes into layers and save as PSD file</strong></td>
|
| 31 |
-
</tr>
|
| 32 |
-
<tr>
|
| 33 |
-
<td style="text-align: center;">
|
| 34 |
-
<img src="https://github.com/jhj0517/sam2-playground/blob/master/docs/example_psd_file.png" alt="Example_PSD">
|
| 35 |
-
</td>
|
| 36 |
-
</tr>
|
| 37 |
-
</table>
|
| 38 |
-
|
| 39 |
-
See [PROMPT_GUIDE.md](https://github.com/jhj0517/sam2-playground/blob/master/docs/PROMPT_GUIDE.md) to see how to prompt the segmentation parts of the image.
|
| 40 |
-
|
| 41 |
-
# Installation and Running
|
| 42 |
-
### Prerequisites
|
| 43 |
-
To run this Web UI, you need these prerequisites. If you don't have them, please install them in the following links :
|
| 44 |
-
|
| 45 |
-
- `git` : https://git-scm.com/downloads
|
| 46 |
-
- `python=>3.10` : https://www.python.org/downloads/
|
| 47 |
-
- `FFmpeg` : https://ffmpeg.org/download.html
|
| 48 |
-
|
| 49 |
-
After installing FFmpeg, **make sure to add the `FFmpeg/bin` folder to your system PATH!** <br>
|
| 50 |
-
And for CUDA, if you're not using an Nvidia GPU and CUDA 12.4, edit the [requirements.txt](https://github.com/jhj0517/sam2-playground/blob/master/requirements.txt) to match your environment.
|
| 51 |
-
|
| 52 |
-
### Option 1 : Running with Shell / Batch Scripts
|
| 53 |
-
There's a set of shell / batch scripts for installation and running.
|
| 54 |
-
|
| 55 |
-
1. Download `sam2-playground.zip` with the file corresponding to your OS from [sam2-playground-portable.zip]() and extract its contents.
|
| 56 |
-
2. Run `install.bat` or `install.sh` to install dependencies. (This will create a `venv` directory and install dependencies there.)
|
| 57 |
-
3. Start WebUI with `start-webui.bat` or `start-webui.sh`
|
| 58 |
-
4. To update, run `update.bat` or `update.sh`
|
| 59 |
-
|
| 60 |
-
### Option 2: Docker
|
| 61 |
-
1. Clone the repository
|
| 62 |
-
```
|
| 63 |
-
git clone https://github.com/jhj0517/sam2-playground.git
|
| 64 |
-
```
|
| 65 |
-
3. Build the image ( Image is about ~6 GB )
|
| 66 |
-
```
|
| 67 |
-
docker compose build
|
| 68 |
-
```
|
| 69 |
-
3. Run the container
|
| 70 |
-
```
|
| 71 |
-
docker compose up
|
| 72 |
-
```
|
| 73 |
-
4. Connect to `localhost:7860` with your browser.
|
| 74 |
-
|
| 75 |
-
If needed, update [`docker-compose.yaml`](https://github.com/jhj0517/sam2-playground/blob/master/docker-compose.yaml) to match your environments.
|
| 76 |
-
|
| 77 |
-
## Todo 🗓
|
| 78 |
-
- [ ] Support `change()` API for `gradio_image_prompter` and automatically generate preview for video predictor
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: sam2-playground
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: red
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.41.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|