kiheh85202 commited on
Commit
1797b56
1 Parent(s): 93076bf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - vision
5
+ - image-segmentation
6
+ datasets:
7
+ - scene_parse_150
8
+ widget:
9
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
10
+ example_title: Tiger
11
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
12
+ example_title: Teapot
13
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
14
+ example_title: Palace
15
+ ---
16
+
17
+ # DPT (large-sized model) fine-tuned on ADE20k
18
+
19
+ Dense Prediction Transformer (DPT) model trained on ADE20k for semantic segmentation. It was introduced in the paper [Vision Transformers for Dense Prediction](https://arxiv.org/abs/2103.13413) by Ranftl et al. and first released in [this repository](https://github.com/isl-org/DPT).
20
+
21
+ Disclaimer: The team releasing DPT did not write a model card for this model so this model card has been written by the Hugging Face team.
22
+
23
+ ## Model description
24
+
25
+ DPT uses the Vision Transformer (ViT) as backbone and adds a neck + head on top for semantic segmentation.
26
+
27
+ ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dpt_architecture.jpg)
28
+
29
+ ## Intended uses & limitations
30
+
31
+ You can use the raw model for semantic segmentation. See the [model hub](https://huggingface.co/models?search=dpt) to look for
32
+ fine-tuned versions on a task that interests you.
33
+
34
+ ### How to use
35
+
36
+ Here is how to use this model:
37
+
38
+ ```python
39
+ from transformers import DPTFeatureExtractor, DPTForSemanticSegmentation
40
+ from PIL import Image
41
+ import requests
42
+
43
+ url = "http://images.cocodataset.org/val2017/000000039769.jpg"
44
+ image = Image.open(requests.get(url, stream=True).raw)
45
+
46
+ feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
47
+ model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
48
+
49
+ inputs = feature_extractor(images=image, return_tensors="pt")
50
+
51
+ outputs = model(**inputs)
52
+ logits = outputs.logits
53
+ ```
54
+
55
+ For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/dpt).
56
+
57
+ ### BibTeX entry and citation info
58
+
59
+ ```bibtex
60
+ @article{DBLP:journals/corr/abs-2103-13413,
61
+ author = {Ren{\'{e}} Ranftl and
62
+ Alexey Bochkovskiy and
63
+ Vladlen Koltun},
64
+ title = {Vision Transformers for Dense Prediction},
65
+ journal = {CoRR},
66
+ volume = {abs/2103.13413},
67
+ year = {2021},
68
+ url = {https://arxiv.org/abs/2103.13413},
69
+ eprinttype = {arXiv},
70
+ eprint = {2103.13413},
71
+ timestamp = {Wed, 07 Apr 2021 15:31:46 +0200},
72
+ biburl = {https://dblp.org/rec/journals/corr/abs-2103-13413.bib},
73
+ bibsource = {dblp computer science bibliography, https://dblp.org}
74
+ }
75
+ ```