JinHyeong99 commited on
Commit
cd60cf8
·
1 Parent(s): bef3ba2
Files changed (5) hide show
  1. app.py +2 -2
  2. config.json +8 -8
  3. preprocessor_config.json +1 -1
  4. pytorch_model.bin +2 -2
  5. tf_model.h5 +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ import numpy as np
5
 
6
 
7
  # 모델과 특징 추출기 불러오기
8
- feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b5-finetuned-cityscapes-1024-1024")
9
- model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b5-finetuned-cityscapes-1024-1024")
10
 
11
  def segment_image(image):
12
  # 이미지를 처리하고 모델에 전달하기
 
5
 
6
 
7
  # 모델과 특징 추출기 불러오기
8
+ feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-512-1024")
9
+ model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-cityscapes-512-1024")
10
 
11
  def segment_image(image):
12
  # 이미지를 처리하고 모델에 전달하기
config.json CHANGED
@@ -4,12 +4,12 @@
4
  ],
5
  "attention_probs_dropout_prob": 0.0,
6
  "classifier_dropout_prob": 0.1,
7
- "decoder_hidden_size": 768,
8
  "depths": [
9
- 3,
10
- 6,
11
- 40,
12
- 3
13
  ],
14
  "downsampling_rates": [
15
  1,
@@ -21,10 +21,10 @@
21
  "hidden_act": "gelu",
22
  "hidden_dropout_prob": 0.0,
23
  "hidden_sizes": [
 
24
  64,
25
- 128,
26
- 320,
27
- 512
28
  ],
29
  "id2label": {
30
  "0": "road",
 
4
  ],
5
  "attention_probs_dropout_prob": 0.0,
6
  "classifier_dropout_prob": 0.1,
7
+ "decoder_hidden_size": 256,
8
  "depths": [
9
+ 2,
10
+ 2,
11
+ 2,
12
+ 2
13
  ],
14
  "downsampling_rates": [
15
  1,
 
21
  "hidden_act": "gelu",
22
  "hidden_dropout_prob": 0.0,
23
  "hidden_sizes": [
24
+ 32,
25
  64,
26
+ 160,
27
+ 256
 
28
  ],
29
  "id2label": {
30
  "0": "road",
preprocessor_config.json CHANGED
@@ -14,5 +14,5 @@
14
  ],
15
  "reduce_labels": false,
16
  "resample": 2,
17
- "size": 1024
18
  }
 
14
  ],
15
  "reduce_labels": false,
16
  "resample": 2,
17
+ "size": 512
18
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bdefc7b5bf4b548d347e6bcbe3ab1a0ff4370047211ae9e56c9e53dfb1f78033
3
- size 338896453
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec0a4ad8388261a33e9fad6045feabf8b0f764bba6fc5511397fe39714400a91
3
+ size 14957601
tf_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e210af2d6d0dfb7eabecfcb1831845830b762a04d65d69e879cfc17288a11540
3
- size 339967916
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:296ed1fbafabfe8ed5a1875c5a42bdcb0d22d552145e610f4f6fa4215123af5a
3
+ size 15151028