Downloads · 30 days
5
9% of all-time downloads
Fantast/segformer-mit-b0-finetuned-for-seal
segformer-mit-b0-finetuned-for-seal is a machine learning model from Fantast. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
Downloads · 30 days
5
9% of all-time downloads
All-time downloads
54
Public
Repo size
29.8 MB
Likes
0
Public
Click a slice to open those files.
.bin14.9 MB · 100%
From the Hugging Face model README
Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
from transformers import AutoImageProcessor, SegformerForSemanticSegmentation
from PIL import Image
import requests
image_processor = AutoImageProcessor.from_pretrained("Fantast/segformer-mit-b0-finetuned-for-seal")
model = SegformerForSemanticSegmentation.from_pretrained("Fantast/segformer-mit-b0-finetuned-for-seal")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = image_processor(images=image, return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
list(logits.shape)
For more code examples, we refer to the documentation.
License The license for this model can be found here.
BibTeX entry and citation info @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} }