-
Notifications
You must be signed in to change notification settings - Fork 80
/
config.py
61 lines (55 loc) · 1.62 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
import os.path as osp
from cvpods.configs.solo_config import SOLOConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="detectron2://ImageNetPretrained/MSRA/R-50.pkl",
SOLO=dict(HEAD=dict(TYPE="DecoupledSOLOHead"))
),
DATASETS=dict(
TRAIN=("coco_2017_train",),
TEST=("coco_2017_val",),
),
SOLVER=dict(
LR_SCHEDULER=dict(
NAME="WarmupMultiStepLR",
MAX_ITER=90000,
STEPS=(60000, 80000),
WARMUP_FACTOR=1.0 / 1000,
WARMUP_ITERS=500,
WARMUP_METHOD="linear",
GAMMA=0.1,
),
OPTIMIZER=dict(
NAME="SGD",
BASE_LR=0.01,
WEIGHT_DECAY=0.0001,
MOMENTUM=0.9,
),
CHECKPOINT_PERIOD=5000,
IMS_PER_BATCH=16,
IMS_PER_DEVICE=2,
BATCH_SUBDIVISIONS=1,
),
INPUT=dict(
AUG=dict(
TRAIN_PIPELINES=[
("ResizeShortestEdge",
dict(short_edge_length=(800,), max_size=1333, sample_style="choice")),
("RandomFlip", dict()),
],
TEST_PIPELINES=[
("ResizeShortestEdge",
dict(short_edge_length=800, max_size=1333, sample_style="choice")),
],
)
),
OUTPUT_DIR=osp.join(
'/data/Outputs/model_logs/cvpods_playground',
osp.split(osp.realpath(__file__))[0].split("playground/")[-1]
),
)
class CustomSOLOConfig(SOLOConfig):
def __init__(self):
super(CustomSOLOConfig, self).__init__()
self._register_configuration(_config_dict)
config = CustomSOLOConfig()