SegFormer model fine-tuned on
ATR dataset
for clothes segmentation but can also be used for human segmentation.
The dataset on hugging face is called "mattmdjaga/human_parsing_dataset".
NEW
-
Training code
. Right now it only contains the pure code with some comments, but soon I'll add a colab notebook version
and a blog post with it to make it more friendly.
from transformers import SegformerImageProcessor, AutoModelForSemanticSegmentation
from PIL import Image
import requests
import matplotlib.pyplot as plt
import torch.nn as nn
processor = SegformerImageProcessor.from_pretrained("sayeed99/segformer_b3_clothes")
model = AutoModelForSemanticSegmentation.from_pretrained("sayeed99/segformer_b3_clothes")
url = "https://plus.unsplash.com/premium_photo-1673210886161-bfcc40f54d1f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cGVyc29uJTIwc3RhbmRpbmd8ZW58MHx8MHx8&w=1000&q=80"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits.cpu()
upsampled_logits = nn.functional.interpolate(
logits,
size=image.size[::-1],
mode="bilinear",
align_corners=False,
)
pred_seg = upsampled_logits.argmax(dim=1)[0]
plt.imshow(pred_seg)
@article{DBLP:journals/corr/abs-2105-15203,
author = {Enze Xie and
Wenhai Wang and
Zhiding Yu and
Anima Anandkumar and
Jose M. Alvarez and
Ping Luo},
title = {SegFormer: Simple and Efficient Design for Semantic Segmentation with
Transformers},
journal = {CoRR},
volume = {abs/2105.15203},
year = {2021},
url = {https://arxiv.org/abs/2105.15203},
eprinttype = {arXiv},
eprint = {2105.15203},
timestamp = {Wed, 02 Jun 2021 11:46:42 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2105-15203.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
Runs of sayeed99 segformer_b3_clothes on huggingface.co
5.0K
Total runs
-227
24-hour runs
-175
3-day runs
-363
7-day runs
1.5K
30-day runs
More Information About segformer_b3_clothes huggingface.co Model
segformer_b3_clothes huggingface.co is an AI model on huggingface.co that provides segformer_b3_clothes's model effect (), which can be used instantly with this sayeed99 segformer_b3_clothes model. huggingface.co supports a free trial of the segformer_b3_clothes model, and also provides paid use of the segformer_b3_clothes. Support call segformer_b3_clothes model through api, including Node.js, Python, http.
segformer_b3_clothes huggingface.co is an online trial and call api platform, which integrates segformer_b3_clothes's modeling effects, including api services, and provides a free online trial of segformer_b3_clothes, you can try segformer_b3_clothes online for free by clicking the link below.
sayeed99 segformer_b3_clothes online free url in huggingface.co:
segformer_b3_clothes is an open source model from GitHub that offers a free installation service, and any user can find segformer_b3_clothes on GitHub to install. At the same time, huggingface.co provides the effect of segformer_b3_clothes install, users can directly use segformer_b3_clothes installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
segformer_b3_clothes install url in huggingface.co: