BiSeNet Face Parsing Model (Hair Segmentation)
This is a BiSeNet-based face parsing model trained on CelebAMask-HQ dataset. Used for accurate hair segmentation in the DermaIntel application.
Model Details
- Architecture: BiSeNet with ResNet-18 backbone
- Format: ONNX
- Input Size: 512x512 RGB
- Classes: 19 facial components
Class Labels
| Index | Label |
|---|---|
| 0 | background |
| 1 | skin |
| 2 | l_brow |
| 3 | r_brow |
| 4 | l_eye |
| 5 | r_eye |
| 6 | eye_g (glasses) |
| 7 | l_ear |
| 8 | r_ear |
| 9 | ear_r (earring) |
| 10 | nose |
| 11 | mouth |
| 12 | u_lip |
| 13 | l_lip |
| 14 | neck |
| 15 | neck_l |
| 16 | cloth |
| 17 | hair |
| 18 | hat |
Usage
from huggingface_hub import hf_hub_download
import onnxruntime as ort
# Download model
model_path = hf_hub_download(
repo_id="PayamFard123/dermaintel-face-parsing",
filename="resnet18.onnx"
)
# Load model
session = ort.InferenceSession(model_path)
Original Source
Model weights from: https://github.com/yakhyo/face-parsing
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support