From 08e27331999f783800ba6d74f879418325caccb2 Mon Sep 17 00:00:00 2001 From: gaotingquan Date: Thu, 9 Jun 2022 06:29:55 +0000 Subject: [PATCH] fix: threshold of output --- .../PULC/safety_helmet/inference_safety_helmet.yaml | 2 +- ...large_x0_35.yaml => MobileNetV3_small_x0_35.yaml} | 12 ++++++------ ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0.yaml | 6 +++--- .../safety_helmet/PPLCNet_x1_0_distillation.yaml | 6 +++--- .../PULC/safety_helmet/PPLCNet_x1_0_search.yaml | 6 +++--- .../PULC/safety_helmet/Res2Net200_vd_26w_4s.yaml | 7 ++++--- .../SwinTransformer_tiny_patch4_window7_224.yaml | 4 ++-- 7 files changed, 22 insertions(+), 21 deletions(-) rename ppcls/configs/PULC/safety_helmet/{MobileNetV3_large_x0_35.yaml => MobileNetV3_small_x0_35.yaml} (95%) diff --git a/deploy/configs/PULC/safety_helmet/inference_safety_helmet.yaml b/deploy/configs/PULC/safety_helmet/inference_safety_helmet.yaml index 5f128e18..66a4cebb 100644 --- a/deploy/configs/PULC/safety_helmet/inference_safety_helmet.yaml +++ b/deploy/configs/PULC/safety_helmet/inference_safety_helmet.yaml @@ -29,7 +29,7 @@ PreProcess: PostProcess: main_indicator: ThreshOutput ThreshOutput: - threshold: 0.9 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet SavePreLabel: diff --git a/ppcls/configs/PULC/safety_helmet/MobileNetV3_large_x0_35.yaml b/ppcls/configs/PULC/safety_helmet/MobileNetV3_small_x0_35.yaml similarity index 95% rename from ppcls/configs/PULC/safety_helmet/MobileNetV3_large_x0_35.yaml rename to ppcls/configs/PULC/safety_helmet/MobileNetV3_small_x0_35.yaml index 3f945e49..fd181710 100644 --- a/ppcls/configs/PULC/safety_helmet/MobileNetV3_large_x0_35.yaml +++ b/ppcls/configs/PULC/safety_helmet/MobileNetV3_small_x0_35.yaml @@ -16,7 +16,7 @@ Global: # model architecture Arch: - name: MobileNetV3_large_x0_35 + name: MobileNetV3_small_x0_35 pretrained: True class_num: 2 @@ -36,7 +36,7 @@ Optimizer: momentum: 0.9 lr: name: Cosine - learning_rate: 0.050 + learning_rate: 0.015 warmup_epoch: 5 regularizer: name: 'L2' @@ -67,7 +67,7 @@ DataLoader: sampler: name: DistributedBatchSampler - batch_size: 256 + batch_size: 64 drop_last: False shuffle: True loader: @@ -120,16 +120,16 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet Metric: Train: - TopkAcc: - topk: [1, 2] + topk: [1] Eval: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] diff --git a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0.yaml b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0.yaml index bbc3c141..3ad59e2e 100644 --- a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0.yaml +++ b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0.yaml @@ -119,16 +119,16 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet Metric: Train: - TopkAcc: - topk: [1, 2] + topk: [1] Eval: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] diff --git a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_distillation.yaml b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_distillation.yaml index 7d47ef07..254db5df 100644 --- a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_distillation.yaml +++ b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_distillation.yaml @@ -169,7 +169,7 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet @@ -177,9 +177,9 @@ Metric: Train: - DistillationTopkAcc: model_key: "Student" - topk: [1, 2] + topk: [1] Eval: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] diff --git a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_search.yaml b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_search.yaml index d5f8b455..58cc3300 100644 --- a/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_search.yaml +++ b/ppcls/configs/PULC/safety_helmet/PPLCNet_x1_0_search.yaml @@ -133,16 +133,16 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet Metric: Train: - TopkAcc: - topk: [1, 2] + topk: [1] Eval: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] diff --git a/ppcls/configs/PULC/safety_helmet/Res2Net200_vd_26w_4s.yaml b/ppcls/configs/PULC/safety_helmet/Res2Net200_vd_26w_4s.yaml index b9660d6f..5ab2f484 100644 --- a/ppcls/configs/PULC/safety_helmet/Res2Net200_vd_26w_4s.yaml +++ b/ppcls/configs/PULC/safety_helmet/Res2Net200_vd_26w_4s.yaml @@ -121,16 +121,17 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet Metric: Train: - TopkAcc: - topk: [1, 2] + topk: [1] Eval: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] + diff --git a/ppcls/configs/PULC/safety_helmet/SwinTransformer_tiny_patch4_window7_224.yaml b/ppcls/configs/PULC/safety_helmet/SwinTransformer_tiny_patch4_window7_224.yaml index dcc53734..666ad6be 100644 --- a/ppcls/configs/PULC/safety_helmet/SwinTransformer_tiny_patch4_window7_224.yaml +++ b/ppcls/configs/PULC/safety_helmet/SwinTransformer_tiny_patch4_window7_224.yaml @@ -139,7 +139,7 @@ Infer: - ToCHWImage: PostProcess: name: ThreshOutput - threshold: 0.9235 + threshold: 0.5 label_0: wearing_helmet label_1: unwearing_helmet @@ -148,4 +148,4 @@ Metric: - TprAtFpr: max_fpr: 0.0001 - TopkAcc: - topk: [1, 2] + topk: [1] -- GitLab