Browse Source

adapt SeaFormer series (#3457)

* fix docs

* adapt seaformer
Zhang Zelun 8 tháng trước cách đây
mục cha
commit
fb17edcea9

+ 1 - 1
paddlex/configs/modules/semantic_segmentation/SeaFormer_base.yaml

@@ -19,7 +19,7 @@ Train:
   num_classes: 2
   batch_size: 2
   learning_rate: 0.01
-  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_base_pretrained.pdparams
+  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_base_backbone_imagenet_pretrained.pdparams
   warmup_steps: 0
   resume_path: null
   log_interval: 10

+ 1 - 1
paddlex/configs/modules/semantic_segmentation/SeaFormer_large.yaml

@@ -19,7 +19,7 @@ Train:
   num_classes: 2
   batch_size: 2
   learning_rate: 0.01
-  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_large_pretrained.pdparams
+  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_large_backbone_imagenet_pretrained.pdparams
   warmup_steps: 0
   resume_path: null
   log_interval: 10

+ 1 - 1
paddlex/configs/modules/semantic_segmentation/SeaFormer_small.yaml

@@ -19,7 +19,7 @@ Train:
   num_classes: 19
   batch_size: 2
   learning_rate: 0.01
-  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_small_pretrained.pdparams
+  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_small_backbone_imagenet_pretrained.pdparams
   warmup_steps: 0
   resume_path: null
   log_interval: 10

+ 1 - 1
paddlex/configs/modules/semantic_segmentation/SeaFormer_tiny.yaml

@@ -19,7 +19,7 @@ Train:
   num_classes: 2
   batch_size: 2
   learning_rate: 0.01
-  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_tiny_pretrained.pdparams
+  pretrain_weight_path: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/SeaFormer_tiny_backbone_imagenet_pretrained.pdparams
   warmup_steps: 0
   resume_path: null
   log_interval: 10

+ 13 - 0
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_base.yaml

@@ -39,6 +39,10 @@ val_dataset:
   val_path: datasets/Cityscapes/val.txt
   num_classes: 150
   transforms:
+    - type: Resize
+      target_size: [2048, 512]
+      keep_ratio: True
+      size_divisor: 32
     - type: Normalize
   mode: val
 
@@ -67,3 +71,12 @@ loss:
   types:
     - type: CrossEntropyLoss
   coef: [1]
+
+test_config:
+  crop_size:
+  - 512
+  - 512
+  is_slide: true
+  stride:
+  - 512
+  - 512

+ 13 - 0
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_large.yaml

@@ -36,6 +36,10 @@ val_dataset:
   val_path: datasets/Cityscapes/val.txt
   num_classes: 150
   transforms:
+    - type: Resize
+      target_size: [2048, 512]
+      keep_ratio: True
+      size_divisor: 32
     - type: Normalize
   mode: val
 
@@ -64,3 +68,12 @@ loss:
   types:
     - type: CrossEntropyLoss
   coef: [1]
+
+test_config:
+  crop_size:
+  - 512
+  - 512
+  is_slide: true
+  stride:
+  - 512
+  - 512

+ 13 - 0
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_small.yaml

@@ -39,6 +39,10 @@ val_dataset:
   val_path: datasets/Cityscapes/val.txt
   num_classes: 150
   transforms:
+    - type: Resize
+      target_size: [2048, 512]
+      keep_ratio: True
+      size_divisor: 32
     - type: Normalize
   mode: val
 
@@ -67,3 +71,12 @@ loss:
   types:
     - type: CrossEntropyLoss
   coef: [1]
+
+test_config:
+  crop_size:
+  - 512
+  - 512
+  is_slide: true
+  stride:
+  - 512
+  - 512

+ 13 - 0
paddlex/repo_apis/PaddleSeg_api/configs/SeaFormer_tiny.yaml

@@ -39,6 +39,10 @@ val_dataset:
   val_path: datasets/Cityscapes/val.txt
   num_classes: 150
   transforms:
+    - type: Resize
+      target_size: [2048, 512]
+      keep_ratio: True
+      size_divisor: 32
     - type: Normalize
   mode: val
 
@@ -67,3 +71,12 @@ loss:
   types:
     - type: CrossEntropyLoss
   coef: [1]
+
+test_config:
+  crop_size:
+  - 512
+  - 512
+  is_slide: true
+  stride:
+  - 512
+  - 512