File size: 1,272 Bytes
dd090c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/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