From feb96d47f05db47a1f24ab4521e31cbf40a35d2b Mon Sep 17 00:00:00 2001 From: Ivan Pelizon <24814264+peiva-git@users.noreply.github.com> Date: Thu, 14 Dec 2023 23:16:24 +0100 Subject: [PATCH] Added configs for rancrop models trained with wce loss --- README.md | 8 +-- ..._liteseg_rancrop10_stdc1_ohem_1024x512.yml | 0 ...p_liteseg_rancrop1_stdc1_ohem_1024x512.yml | 0 ...p_liteseg_rancrop2_stdc1_ohem_1024x512.yml | 0 ...p_liteseg_rancrop5_stdc1_ohem_1024x512.yml | 0 ...p_liteseg_rancrop10_stdc1_wce_1024x512.yml | 72 +++++++++++++++++++ ...pp_liteseg_rancrop1_stdc1_wce_1024x512.yml | 72 +++++++++++++++++++ ...pp_liteseg_rancrop2_stdc1_wce_1024x512.yml | 72 +++++++++++++++++++ ...pp_liteseg_rancrop5_stdc1_wce_1024x512.yml | 72 +++++++++++++++++++ 9 files changed, 292 insertions(+), 4 deletions(-) rename configs/{ => rancrop_ohem_10000}/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml (100%) rename configs/{ => rancrop_ohem_10000}/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml (100%) rename configs/{ => rancrop_ohem_10000}/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml (100%) rename configs/{ => rancrop_ohem_10000}/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml (100%) create mode 100644 configs/rancrop_wce_0.01/pp_liteseg_rancrop10_stdc1_wce_1024x512.yml create mode 100644 configs/rancrop_wce_0.01/pp_liteseg_rancrop1_stdc1_wce_1024x512.yml create mode 100644 configs/rancrop_wce_0.01/pp_liteseg_rancrop2_stdc1_wce_1024x512.yml create mode 100644 configs/rancrop_wce_0.01/pp_liteseg_rancrop5_stdc1_wce_1024x512.yml diff --git a/README.md b/README.md index e3e3e62..38fe5bf 100644 --- a/README.md +++ b/README.md @@ -111,10 +111,10 @@ In the following table you can find the summarized results of the obtained model | Model | Backbone | Random Crops | Train Resolution | Test Resolution | Training Iters | Ball class IoU | Ball class Precision | Ball class Recall | Kappa | Dice | Links | |--------------|----------|--------------|-------------------|------------------|----------------|----------------|----------------------|-------------------|--------|--------|----------------------------------------------------------------| | PP-LiteSeg-T | STDC1 | 0 | 1024x512 | 2048x1024 | 50000 | 0.6542 | 0.909 | 0.7 | 0.7909 | 0.8954 | [config](configs/pp_liteseg_base_stdc1_ohem_1024x512.yml) | -| PP-LiteSeg-T | STDC1 | 1 | 1024x512 | 2048x1024 | 50000 | 0.5561 | 0.9035 | 0.5913 | 0.7147 | 0.8574 | [config](configs/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml) | -| PP-LiteSeg-T | STDC1 | 2 | 1024x512 | 2048x1024 | 50000 | 0.5459 | 0.8999 | 0.5811 | 0.7062 | 0.8531 | [config](configs/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml) | -| PP-LiteSeg-T | STDC1 | 5 | 1024x512 | 2048x1024 | 50000 | 0.5627 | 0.9053 | 0.5979 | 0.7201 | 0.8600 | [config](configs/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml) | -| PP-LiteSeg-T | STDC1 | 10 | 1024x512 | 2048x1024 | 50000 | 0.5539 | 0.9042 | 0.5884 | 0.7128 | 0.8564 | [config](configs/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml) | +| PP-LiteSeg-T | STDC1 | 1 | 1024x512 | 2048x1024 | 50000 | 0.5561 | 0.9035 | 0.5913 | 0.7147 | 0.8574 | [config](configs/rancrop_ohem_10000/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml) | +| PP-LiteSeg-T | STDC1 | 2 | 1024x512 | 2048x1024 | 50000 | 0.5459 | 0.8999 | 0.5811 | 0.7062 | 0.8531 | [config](configs/rancrop_ohem_10000/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml) | +| PP-LiteSeg-T | STDC1 | 5 | 1024x512 | 2048x1024 | 50000 | 0.5627 | 0.9053 | 0.5979 | 0.7201 | 0.8600 | [config](configs/rancrop_ohem_10000/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml) | +| PP-LiteSeg-T | STDC1 | 10 | 1024x512 | 2048x1024 | 50000 | 0.5539 | 0.9042 | 0.5884 | 0.7128 | 0.8564 | [config](configs/rancrop_ohem_10000/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml) | ## Credits diff --git a/configs/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml b/configs/rancrop_ohem_10000/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml similarity index 100% rename from configs/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml rename to configs/rancrop_ohem_10000/pp_liteseg_rancrop10_stdc1_ohem_1024x512.yml diff --git a/configs/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml b/configs/rancrop_ohem_10000/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml similarity index 100% rename from configs/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml rename to configs/rancrop_ohem_10000/pp_liteseg_rancrop1_stdc1_ohem_1024x512.yml diff --git a/configs/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml b/configs/rancrop_ohem_10000/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml similarity index 100% rename from configs/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml rename to configs/rancrop_ohem_10000/pp_liteseg_rancrop2_stdc1_ohem_1024x512.yml diff --git a/configs/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml b/configs/rancrop_ohem_10000/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml similarity index 100% rename from configs/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml rename to configs/rancrop_ohem_10000/pp_liteseg_rancrop5_stdc1_ohem_1024x512.yml diff --git a/configs/rancrop_wce_0.01/pp_liteseg_rancrop10_stdc1_wce_1024x512.yml b/configs/rancrop_wce_0.01/pp_liteseg_rancrop10_stdc1_wce_1024x512.yml new file mode 100644 index 0000000..23c7250 --- /dev/null +++ b/configs/rancrop_wce_0.01/pp_liteseg_rancrop10_stdc1_wce_1024x512.yml @@ -0,0 +1,72 @@ +batch_size: 4 +iters: 50000 # ~ 200 epochs for 1002 training images + +train_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + train_path: /home/ubuntu/dataset_paddleseg/train.txt + num_classes: 2 + mode: train + transforms: + - type: Resize + target_size: [1024, 512] + - type: ResizeStepScaling + min_scale_factor: 0.5 + max_scale_factor: 2.0 + scale_step_size: 0.25 + - type: RandomPaddingCrop + crop_size: [1024, 512] + - type: RandomHorizontalFlip + - type: RandomDistort + brightness_range: 0.5 + contrast_range: 0.5 + saturation_range: 0.5 + - type: Normalize + +val_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + val_path: /home/ubuntu/dataset_paddleseg/val.txt + num_classes: 2 + mode: val + transforms: + - type: Resize + target_size: [2048, 1024] + - type: Normalize + +test_config: + aug_eval: True + scales: 1.0 + +loss: + types: + - type: CrossEntropyLoss + weight: [0.01, 0.99] # the ball pixels represent ~ 0.004 of the pixels on a 1024x512 image + - type: CrossEntropyLoss + weight: [0.01, 0.99] + - type: CrossEntropyLoss + weight: [0.01, 0.99] + coef: [1, 1, 1] + +optimizer: + type: SGD + momentum: 0.9 + weight_decay: 5.0e-4 + +lr_scheduler: + type: PolynomialDecay + warmup_iters: 1000 + warmup_start_lr: 1.0e-5 + learning_rate: 0.005 + end_lr: 0 + power: 0.9 + +model: + type: PPLiteSegRandomCrops + num_classes: 2 + backbone: + type: STDC1 + pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz + arm_out_chs: [32, 64, 128] + seg_head_inter_chs: [32, 64, 128] + random_crops: 10 diff --git a/configs/rancrop_wce_0.01/pp_liteseg_rancrop1_stdc1_wce_1024x512.yml b/configs/rancrop_wce_0.01/pp_liteseg_rancrop1_stdc1_wce_1024x512.yml new file mode 100644 index 0000000..e929ab7 --- /dev/null +++ b/configs/rancrop_wce_0.01/pp_liteseg_rancrop1_stdc1_wce_1024x512.yml @@ -0,0 +1,72 @@ +batch_size: 4 +iters: 50000 # ~ 200 epochs for 1002 training images + +train_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + train_path: /home/ubuntu/dataset_paddleseg/train.txt + num_classes: 2 + mode: train + transforms: + - type: Resize + target_size: [1024, 512] + - type: ResizeStepScaling + min_scale_factor: 0.5 + max_scale_factor: 2.0 + scale_step_size: 0.25 + - type: RandomPaddingCrop + crop_size: [1024, 512] + - type: RandomHorizontalFlip + - type: RandomDistort + brightness_range: 0.5 + contrast_range: 0.5 + saturation_range: 0.5 + - type: Normalize + +val_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + val_path: /home/ubuntu/dataset_paddleseg/val.txt + num_classes: 2 + mode: val + transforms: + - type: Resize + target_size: [2048, 1024] + - type: Normalize + +test_config: + aug_eval: True + scales: 1.0 + +loss: + types: + - type: CrossEntropyLoss + weight: [0.01, 0.99] # the ball pixels represent ~ 0.004 of the pixels on a 1024x512 image + - type: CrossEntropyLoss + weight: [0.01, 0.99] + - type: CrossEntropyLoss + weight: [0.01, 0.99] + coef: [1, 1, 1] + +optimizer: + type: SGD + momentum: 0.9 + weight_decay: 5.0e-4 + +lr_scheduler: + type: PolynomialDecay + warmup_iters: 1000 + warmup_start_lr: 1.0e-5 + learning_rate: 0.005 + end_lr: 0 + power: 0.9 + +model: + type: PPLiteSegRandomCrops + num_classes: 2 + backbone: + type: STDC1 + pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz + arm_out_chs: [32, 64, 128] + seg_head_inter_chs: [32, 64, 128] + random_crops: 1 diff --git a/configs/rancrop_wce_0.01/pp_liteseg_rancrop2_stdc1_wce_1024x512.yml b/configs/rancrop_wce_0.01/pp_liteseg_rancrop2_stdc1_wce_1024x512.yml new file mode 100644 index 0000000..12df10c --- /dev/null +++ b/configs/rancrop_wce_0.01/pp_liteseg_rancrop2_stdc1_wce_1024x512.yml @@ -0,0 +1,72 @@ +batch_size: 4 +iters: 50000 # ~ 200 epochs for 1002 training images + +train_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + train_path: /home/ubuntu/dataset_paddleseg/train.txt + num_classes: 2 + mode: train + transforms: + - type: Resize + target_size: [1024, 512] + - type: ResizeStepScaling + min_scale_factor: 0.5 + max_scale_factor: 2.0 + scale_step_size: 0.25 + - type: RandomPaddingCrop + crop_size: [1024, 512] + - type: RandomHorizontalFlip + - type: RandomDistort + brightness_range: 0.5 + contrast_range: 0.5 + saturation_range: 0.5 + - type: Normalize + +val_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + val_path: /home/ubuntu/dataset_paddleseg/val.txt + num_classes: 2 + mode: val + transforms: + - type: Resize + target_size: [2048, 1024] + - type: Normalize + +test_config: + aug_eval: True + scales: 1.0 + +loss: + types: + - type: CrossEntropyLoss + weight: [0.01, 0.99] # the ball pixels represent ~ 0.004 of the pixels on a 1024x512 image + - type: CrossEntropyLoss + weight: [0.01, 0.99] + - type: CrossEntropyLoss + weight: [0.01, 0.99] + coef: [1, 1, 1] + +optimizer: + type: SGD + momentum: 0.9 + weight_decay: 5.0e-4 + +lr_scheduler: + type: PolynomialDecay + warmup_iters: 1000 + warmup_start_lr: 1.0e-5 + learning_rate: 0.005 + end_lr: 0 + power: 0.9 + +model: + type: PPLiteSegRandomCrops + num_classes: 2 + backbone: + type: STDC1 + pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz + arm_out_chs: [32, 64, 128] + seg_head_inter_chs: [32, 64, 128] + random_crops: 2 diff --git a/configs/rancrop_wce_0.01/pp_liteseg_rancrop5_stdc1_wce_1024x512.yml b/configs/rancrop_wce_0.01/pp_liteseg_rancrop5_stdc1_wce_1024x512.yml new file mode 100644 index 0000000..a6c16bc --- /dev/null +++ b/configs/rancrop_wce_0.01/pp_liteseg_rancrop5_stdc1_wce_1024x512.yml @@ -0,0 +1,72 @@ +batch_size: 4 +iters: 50000 # ~ 200 epochs for 1002 training images + +train_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + train_path: /home/ubuntu/dataset_paddleseg/train.txt + num_classes: 2 + mode: train + transforms: + - type: Resize + target_size: [1024, 512] + - type: ResizeStepScaling + min_scale_factor: 0.5 + max_scale_factor: 2.0 + scale_step_size: 0.25 + - type: RandomPaddingCrop + crop_size: [1024, 512] + - type: RandomHorizontalFlip + - type: RandomDistort + brightness_range: 0.5 + contrast_range: 0.5 + saturation_range: 0.5 + - type: Normalize + +val_dataset: + type: Dataset + dataset_root: /home/ubuntu/dataset_paddleseg/ + val_path: /home/ubuntu/dataset_paddleseg/val.txt + num_classes: 2 + mode: val + transforms: + - type: Resize + target_size: [2048, 1024] + - type: Normalize + +test_config: + aug_eval: True + scales: 1.0 + +loss: + types: + - type: CrossEntropyLoss + weight: [0.01, 0.99] # the ball pixels represent ~ 0.004 of the pixels on a 1024x512 image + - type: CrossEntropyLoss + weight: [0.01, 0.99] + - type: CrossEntropyLoss + weight: [0.01, 0.99] + coef: [1, 1, 1] + +optimizer: + type: SGD + momentum: 0.9 + weight_decay: 5.0e-4 + +lr_scheduler: + type: PolynomialDecay + warmup_iters: 1000 + warmup_start_lr: 1.0e-5 + learning_rate: 0.005 + end_lr: 0 + power: 0.9 + +model: + type: PPLiteSegRandomCrops + num_classes: 2 + backbone: + type: STDC1 + pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz + arm_out_chs: [32, 64, 128] + seg_head_inter_chs: [32, 64, 128] + random_crops: 5