Fantast commited on
Commit
6ed4706
1 Parent(s): 1a168b1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md CHANGED
@@ -1,3 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
 
1
+ ### SegFormer Finetuned for Seal Segmentation
2
+
3
+ #### BaseOn https://huggingface.co/nvidia/mit-b0
4
+
5
+
6
+ #### How to use
7
+ Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
8
+
9
+ ```
10
+ from transformers import AutoImageProcessor, SegformerForSemanticSegmentation
11
+ from PIL import Image
12
+ import requests
13
+
14
+ image_processor = AutoImageProcessor.from_pretrained("Fantast/segformer-mit-b0-finetuned-for-seal")
15
+ model = SegformerForSemanticSegmentation.from_pretrained("Fantast/segformer-mit-b0-finetuned-for-seal")
16
+
17
+ url = "http://images.cocodataset.org/val2017/000000039769.jpg"
18
+ image = Image.open(requests.get(url, stream=True).raw)
19
+
20
+ inputs = image_processor(images=image, return_tensors="pt")
21
+ outputs = model(**inputs)
22
+ logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
23
+ list(logits.shape)
24
+ ```
25
+
26
+ For more code examples, we refer to the documentation.
27
+
28
+ License
29
+ The license for this model can be found here.
30
+
31
+ BibTeX entry and citation info
32
+ @article{DBLP:journals/corr/abs-2105-15203,
33
+ author = {Enze Xie and
34
+ Wenhai Wang and
35
+ Zhiding Yu and
36
+ Anima Anandkumar and
37
+ Jose M. Alvarez and
38
+ Ping Luo},
39
+ title = {SegFormer: Simple and Efficient Design for Semantic Segmentation with
40
+ Transformers},
41
+ journal = {CoRR},
42
+ volume = {abs/2105.15203},
43
+ year = {2021},
44
+ url = {https://arxiv.org/abs/2105.15203},
45
+ eprinttype = {arXiv},
46
+ eprint = {2105.15203},
47
+ timestamp = {Wed, 02 Jun 2021 11:46:42 +0200},
48
+ biburl = {https://dblp.org/rec/journals/corr/abs-2105-15203.bib},
49
+ bibsource = {dblp computer science bibliography, https://dblp.org}
50
+ }
51
+
52
  ---
53
  license: mit
54
  ---