| #!/usr/bin/env python3 | |
| # -*- coding:utf-8 -*- | |
| # Copyright (c) Megvii, Inc. and its affiliates. | |
| import os | |
| from yolox.exp import Exp as MyExp | |
| class Exp(MyExp): | |
| def __init__(self): | |
| super(Exp, self).__init__() | |
| self.depth = 1.0 # indicate size yolo model | |
| self.width = 1.0 # | |
| self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] | |
| self.data_dir = '' | |
| self.train_ann = '' | |
| self.val_ann = '' | |
| self.test_ann = '' | |
| self.num_classes = 2 | |
| self.data_num_workers = 32 # number of cpu for splitting batch | |
| self.input_size = (800, 800) | |
| self.print_interval = 100 | |
| self.eval_interval = 1 | |
| self.test_size = (800, 800) | |
| self.enable_mixup = True | |
| self.mosaic_scale = (0.5, 1.5) | |
| self.max_epoch = 300 | |
| self.hsv_prob = 1.0 | |
| self.degrees = 20.0 | |
| self.translate = 0.2 | |
| self.shear = 2.0 | |
| # Turn off mosaic | |
| self.mosaic_prob = 1.0 | |
| # Turn off Mixup | |
| self.mixup_prob = 1.0 | |
| # Change SGD by ADAM | |
| self.basic_lr_per_img = 0.01 / 28.0 | |
| self.no_aug_epochs = 15 | |
| self.min_lr_ratio = 0.05 | |
| self.ema = True | |
| self.nmsthre = 0.3 | |