Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
---
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- image-segmentation
|
| 6 |
+
- image-matting
|
| 7 |
+
- background-removal
|
| 8 |
+
- computer-vision
|
| 9 |
+
- custom-architecture
|
| 10 |
+
library_name: transformers
|
| 11 |
+
pipeline_tag: image-segmentation
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# MODNet – Fast Image Matting for Background Removal
|
| 15 |
+
|
| 16 |
+
This repository provides a Hugging Face–compatible version of **MODNet (Mobile Object Detection Network)** for fast and high-quality foreground matting and background removal.
|
| 17 |
+
|
| 18 |
+
The model is designed to produce **pixel-perfect alpha mattes**, handling fine details such as hair, fabric edges, and soft shadows, while remaining efficient enough for real-time CPU inference.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## 🔹 Model Details
|
| 23 |
+
|
| 24 |
+
- **Architecture**: MODNet (custom architecture)
|
| 25 |
+
- **Task**: Image matting / background removal
|
| 26 |
+
- **Framework**: PyTorch
|
| 27 |
+
- **Backbone**: MobileNetV2
|
| 28 |
+
- **Input**: RGB image tensor `(B, 3, H, W)`
|
| 29 |
+
- **Output**: `(semantic, detail, matte)` predictions
|
| 30 |
+
|
| 31 |
+
This model uses a **custom architecture** and requires loading with:
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
trust_remote_code=True
|
| 35 |
+
---
|