-
Notifications
You must be signed in to change notification settings - Fork 16
/
config.py
63 lines (45 loc) · 1.58 KB
/
config.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import os
from easydict import EasyDict as edict
import time
import torch
# init
__C = edict()
cfg = __C
__C.DATA = edict()
__C.TRAIN = edict()
__C.VAL = edict()
__C.VIS = edict()
#------------------------------DATA------------------------
__C.DATA.STD_SIZE = (576,768)
__C.DATA.DATA_PATH = '/media/D/DataSet/CC/' +str(__C.DATA.STD_SIZE[0]) + 'x' + str(__C.DATA.STD_SIZE[1]) + '/shanghaitech_part_B'
__C.DATA.MEAN_STD = ([0.444637000561], [0.226200059056]) # part B
__C.DATA.DEN_ENLARGE = 1.
#------------------------------TRAIN------------------------
__C.TRAIN.INPUT_SIZE = (512,680)
__C.TRAIN.SEED = 640
__C.TRAIN.RESUME = ''#model path
__C.TRAIN.BATCH_SIZE = 6 #imgs
__C.TRAIN.BCE_WIEGHT = 1e-4
__C.TRAIN.SEG_LR = 1e-2
__C.TRAIN.SEG_WIEGHT = 1e-4
__C.TRAIN.NUM_BOX = 20 #boxes
__C.TRAIN.GPU_ID = [1]
# base lr
__C.TRAIN.LR = 1e-4
__C.TRAIN.LR_DECAY = 1
__C.TRAIN.NUM_EPOCH_LR_DECAY = 1 # epoches
__C.TRAIN.MAX_EPOCH = 2000
# output
__C.TRAIN.PRINT_FREQ = 10
now = time.strftime("%m-%d_%H-%M", time.localtime())
__C.TRAIN.EXP_NAME = 'PCC_Net' + now
__C.TRAIN.EXP_PATH = './exp'
#------------------------------VAL------------------------
__C.VAL.BATCH_SIZE = 1 # imgs
__C.VAL.FREQ = 1
#------------------------------VIS------------------------
__C.VIS.VISIBLE_NUM_IMGS = 20
#------------------------------MISC------------------------
#================================================================================
#================================================================================
#================================================================================