thesisabc commited on
Commit
606017d
1 Parent(s): a1187ae

Upload 5 files

Browse files
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - vision
4
+ - image-segmentation
5
+ datasets:
6
+ - segments/sidewalk-semantic
7
+ widget:
8
+ - src: https://segmentsai-prod.s3.eu-west-2.amazonaws.com/assets/admin-tobias/439f6843-80c5-47ce-9b17-0b2a1d54dbeb.jpg
9
+ example_title: Brugge
10
+ ---
11
+ # SegFormer (b0-sized) model fine-tuned on Segments.ai sidewalk-semantic.
12
+ SegFormer model fine-tuned on [Segments.ai](https://segments.ai) [`sidewalk-semantic`](https://huggingface.co/datasets/segments/sidewalk-semantic). It was introduced in the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Xie et al. and first released in [this repository](https://github.com/NVlabs/SegFormer).
13
+ ## Model description
14
+ SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a downstream dataset.
15
+ ### How to use
16
+ Here is how to use this model to classify an image of the sidewalk dataset:
17
+ ```python
18
+ from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
19
+ from PIL import Image
20
+ import requests
21
+ feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512")
22
+ model = SegformerForSemanticSegmentation.from_pretrained("segments-tobias/segformer-b0-finetuned-segments-sidewalk")
23
+ url = "https://segmentsai-prod.s3.eu-west-2.amazonaws.com/assets/admin-tobias/439f6843-80c5-47ce-9b17-0b2a1d54dbeb.jpg"
24
+ image = Image.open(requests.get(url, stream=True).raw)
25
+ inputs = feature_extractor(images=image, return_tensors="pt")
26
+ outputs = model(**inputs)
27
+ logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
28
+ ```
29
+ For more code examples, we refer to the [documentation](https://huggingface.co/transformers/model_doc/segformer.html#).
30
+ ### BibTeX entry and citation info
31
+ ```bibtex
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
+ ```
gitattributes.txt ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ model.safetensors filter=lfs diff=lfs merge=lfs -text
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da0498037a44ec0b335ca7c96fe2422cac4d28550cd09df80f71c557bf0e027e
3
+ size 14918708
preprocessor_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "SegformerFeatureExtractor",
5
+ "image_mean": [
6
+ 0.485,
7
+ 0.456,
8
+ 0.406
9
+ ],
10
+ "image_std": [
11
+ 0.229,
12
+ 0.224,
13
+ 0.225
14
+ ],
15
+ "reduce_labels": true,
16
+ "resample": 2,
17
+ "size": 512
18
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c516b9889debc5ed54e4bff6791efea11a2d7e5399e3021bcb1dc034246da56
3
+ size 14976927