From c86c91c96157a74eb5c2686916bf5fcc918ce8af Mon Sep 17 00:00:00 2001 From: soumajm Date: Wed, 25 May 2022 17:12:49 +0800 Subject: [PATCH] Remove redundant variables in Yolox Signed-off-by: Vittorio Cozzolino --- .../detection/yolox/exps/yolox_s_mix_det.py | 14 +------ .../detection/yolox/yolox/exp/base_exp.py | 4 +- .../detection/yolox/yolox/exp/yolox_base.py | 39 +------------------ 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py b/examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py index 7b8d386e..33e6e4ec 100644 --- a/examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py +++ b/examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py @@ -10,16 +10,4 @@ class Exp(MyExp): self.depth = 0.33 self.width = 0.50 self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] - self.train_ann = "train.json" - self.val_ann = "train.json" - self.input_size = (608, 1088) - self.test_size = (608, 1088) - self.random_size = (12, 26) - self.max_epoch = 80 - self.print_interval = 20 - self.eval_interval = 5 - self.test_conf = 0.001 - self.nmsthre = 0.7 - self.no_aug_epochs = 10 - self.basic_lr_per_img = 0.001 / 64.0 - self.warmup_epochs = 1 + diff --git a/examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py b/examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py index 6fd79bc5..7e42a892 100644 --- a/examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py +++ b/examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py @@ -16,9 +16,6 @@ class BaseExp(metaclass=ABCMeta): def __init__(self): self.seed = None - self.output_dir = "./YOLOX_outputs" - self.print_interval = 100 - self.eval_interval = 10 @abstractmethod def get_model(self) -> Module: @@ -32,3 +29,4 @@ class BaseExp(metaclass=ABCMeta): if not k.startswith("_") ] return None + diff --git a/examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py b/examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py index 02dec64e..fcb09884 100644 --- a/examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py +++ b/examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py @@ -20,43 +20,6 @@ class Exp(BaseExp): self.depth = 1.00 self.width = 1.00 - # ---------------- dataloader config ---------------- # - # set worker to 4 for shorter dataloader init time - self.data_num_workers = 4 - self.input_size = (640, 640) - self.random_size = (14, 26) - self.train_ann = "instances_train2017.json" - self.val_ann = "instances_val2017.json" - - # --------------- transform config ----------------- # - self.degrees = 10.0 - self.translate = 0.1 - self.scale = (0.1, 2) - self.mscale = (0.8, 1.6) - self.shear = 2.0 - self.perspective = 0.0 - self.enable_mixup = True - - # -------------- training config --------------------- # - self.warmup_epochs = 5 - self.max_epoch = 300 - self.warmup_lr = 0 - self.basic_lr_per_img = 0.01 / 64.0 - self.scheduler = "yoloxwarmcos" - self.no_aug_epochs = 15 - self.min_lr_ratio = 0.05 - self.ema = True - - self.weight_decay = 5e-4 - self.momentum = 0.9 - self.print_interval = 10 - self.eval_interval = 10 - self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] - - # ----------------- testing config ------------------ # - self.test_size = (640, 640) - self.test_conf = 0.001 - self.nmsthre = 0.65 def get_model(self): from yolox.yolox.models import YOLOPAFPN, YOLOX, YOLOXHead @@ -75,4 +38,4 @@ class Exp(BaseExp): self.model.apply(init_yolo) self.model.head.initialize_biases(1e-2) - return self.model \ No newline at end of file + return self.model