jonathandinu_face-parsing
jonathandinu · View on Hugging Face ↗
Get this model
Seeders: 1 · Leechers: 0
Observed 2026-09-02T13:56:39Z via announce.aitorrent.org:7070.
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
language: en library_name: transformers tags:
- vision
- image-segmentation
- nvidia/mit-b5
- transformers.js
- onnx datasets:
- celebamaskhq
Face Parsing
Semantic segmentation model fine-tuned from nvidia/mit-b5 with CelebAMask-HQ for face parsing. For additional options, see the Transformers Segformer docs.
ONNX model for web inference contributed by Xenova.
Usage in Python
Exhaustive list of labels can be extracted from config.json.
| id | label | note |
|---|---|---|
| 0 | background | |
| 1 | skin | |
| 2 | nose | |
| 3 | eye_g | eyeglasses |
| 4 | l_eye | left eye |
| 5 | r_eye | right eye |
| 6 | l_brow | left eyebrow |
| 7 | r_brow | right eyebrow |
| 8 | l_ear | left ear |
| 9 | r_ear | right ear |
| 10 | mouth | area between lips |
| 11 | u_lip | upper lip |
| 12 | l_lip | lower lip |
| 13 | hair | |
| 14 | hat | |
| 15 | ear_r | earring |
| 16 | neck_l | necklace |
| 17 | neck | |
| 18 | cloth | clothing |
import torch
from torch import nn
from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
from PIL import Image
import matplotlib.pyplot as plt
import requests
# convenience expression for automatically determining device
device = (
"cuda"
# Device for NVIDIA or AMD GPUs
if torch.cuda.is_available()
else "mps"
# Device for Apple Silicon (Metal Performance Shaders)
if torch.backends.mps.is_available()
else "cpu"
)
# load models
image_processor = SegformerImageProcessor.from_pretrained("jonathandinu/face-parsing")
model = SegformerForSemanticSegmentation.from_pretrained("jonathandinu/face-parsing")
model.to(device)
# expects a PIL.Image or torch.Tensor
url = "https://images.unsplash.com/photo-1539571696357-5a69c17a67c6"
image = Image.open(requests.get(url, stream=True).raw)
# run inference on image
inputs = image_processor(images=image, return_tensors="pt").to(device)
outputs = model(**inputs)
logits = outputs.logits # shape (batch_size, num_labels, ~height/4, ~width/4)
# resize output to match input image dimensions
upsampled_logits = nn.functional.interpolate(logits,
size=image.size[::-1], # H x W
mode='bilinear',
align_corners=False)
# get label masks
labels = upsampled_logits.argmax(dim=1)[0]
# move to CPU to visualize in matplotlib
labels_viz = labels.cpu().numpy()
plt.imshow(labels_viz)
plt.show()
Usage in the browser (Transformers.js)
import {
pipeline,
env,
} from "https://cdn.jsdelivr.net/npm/@xenova/[email protected]";
// important to prevent errors since the model files are likely remote on HF hub
env.allowLocalModels = false;
// instantiate image segmentation pipeline with pretrained face parsing model
model = await pipeline("image-segmentation", "jonathandinu/face-parsing");
// async inference since it could take a few seconds
const output = await model(url);
// each label is a separate mask object
// [
// { score: null, label: 'background', mask: transformers.js RawImage { ... }}
// { score: null, label: 'hair', mask: transformers.js RawImage { ... }}
// ...
// ]
for (const m of output) {
print(`Found ${m.label}`);
m.mask.save(`${m.label}.png`);
}
p5.js
Since p5.js uses an animation loop abstraction, we need to take care loading the model and making predictions.
// ...
// asynchronously load transformers.js and instantiate model
async function preload() {
// load transformers.js library with a dynamic import
const { pipeline, env } = await import(
"https://cdn.jsdelivr.net/npm/@xenova/[email protected]"
);
// important to prevent errors since the model files are remote on HF hub
env.allowLocalModels = false;
// instantiate image segmentation pipeline with pretrained face parsing model
model = await pipeline("image-segmentation", "jonathandinu/face-parsing");
print("face-parsing model loaded");
}
// ...
full p5.js example
Model Description
- Developed by: Jonathan Dinu
- Model type: Transformer-based semantic segmentation image model
- License: non-commercial research and educational purposes
- Resources for more information: Transformers docs on Segformer and/or the original research paper.
Limitations and Bias
Bias
While the capabilities of computer vision models are impressive, they can also reinforce or exacerbate social biases. The CelebAMask-HQ dataset used for fine-tuning is large but not necessarily perfectly diverse or representative. Also, they are images of.... just celebrities.
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:b3e9193affa65712158fbf1976441d0295f952b0&dn=jonathandinu_face-parsingOpen magnet in torrent client · infohash b3e9193affa65712158fbf1976441d0295f952b0
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| README.md | 5.5 KB (5,617 B) | 2a9050e8baae84f04e100a2433b23bc6276b36ca | d98d46f09fe6cf246482edff8cc386a0cb8c0dd2109fd04883b298c6069b5d82 |
| config.json | 1.6 KB (1,689 B) | ec0bfdcb824a07a97703061444af609eefa5c968 | 01d82e818569beda6aec804642e34ce187bed43326337d52ce370ff015964d68 |
| demo.png | 629.9 KB (645,068 B) | 75dd69755ff94cc474c98ab09df2391d4c183ece | 31c74d29ab9e45f3401f404f7bfc09e2cf9f5825611f07dc20b25d00eb1cac8a |
| model.safetensors | 322.9 MB (338,580,732 B) | ba1255a81e301921d31310ceb364372f7a4c161c | c2bec795a8c243db71bd95be538fd62559003566466c71237e45c99b920f4b62 |
| preprocessor_config.json | 374 B (374 B) | 89faa86b52097b90ef95c2cc85eb6c298a24a57e | e5a25d8fc054bf780be930e161b47d188bec1b0bf0a44fd5fdfb3f3312c0be0b |
| pytorch_model.bin | 323.1 MB (338,821,701 B) | 69501cf0e564bf7d4af80fa06777a1f24a3802ef | e0139f52e953a00ca01d86faf7363f067a535291a003c096dd9c56b09d8945f1 |
| quantize_config.json | 749 B (749 B) | 85932dbd336e3ad7dc1efa5f948cd55c1025f085 | 0494ea17ec2065e76a2080099f004258ab1ae3ac6b892bd5be44d44008c147ef |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/jonathandinu_face-parsing/
- Slug
- jonathandinu_face-parsing
- Infohash
- b3e9193affa65712158fbf1976441d0295f952b0
- License
- no license recorded
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: jonathandinu_face-parsing.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | jonathandinu/face-parsing |
|---|---|
| Revision (pinned) | 758b82e15a0178c9db39c1ff666a8b56e3a550c8 |
| Fetched at | 2026-09-02T04:38:08Z |
| License at fetch | no license recorded |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-09-02T04:38:17Z
no license recorded646.6 MB (678,055,930 bytes)transformerspytorchonnxsafetensorssegformervisionimage-segmentationnvidia/mit-b5transformers.jsendpoints_compatible1 language (en)paper: 2105.15203