Browse Source

Remove redundant variables in Yolox

Signed-off-by: Vittorio Cozzolino <vittorio.cozzolino@huawei.com>
tags/v0.5.0
soumajm Vittorio Cozzolino 3 years ago
parent
commit
c86c91c961
3 changed files with 3 additions and 54 deletions
  1. +1
    -13
      examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py
  2. +1
    -3
      examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py
  3. +1
    -38
      examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py

+ 1
- 13
examples/multiedgetracking/detection/yolox/exps/yolox_s_mix_det.py View File

@@ -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


+ 1
- 3
examples/multiedgetracking/detection/yolox/yolox/exp/base_exp.py View File

@@ -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


+ 1
- 38
examples/multiedgetracking/detection/yolox/yolox/exp/yolox_base.py View File

@@ -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
return self.model

Loading…
Cancel
Save