-
Notifications
You must be signed in to change notification settings - Fork 80
/
config.py
57 lines (51 loc) · 1.54 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
import os.path as osp
from cvpods.configs.rcnn_fpn_config import RCNNFPNConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="detectron2://ImageNetPretrained/MSRA/R-50.pkl",
MASK_ON=False,
RESNETS=dict(DEPTH=50),
ROI_HEADS=dict(NUM_CLASSES=20),
),
DATASETS=dict(
TRAIN=("voc_2007_trainval", "voc_2012_trainval"),
TEST=("voc_2007_test",),
),
SOLVER=dict(
IMS_PER_BATCH=16,
CHECKPOINT_PERIOD=3000,
LR_SCHEDULER=dict(
STEPS=(12000, 16000),
MAX_ITER=18000,
WARMUP_ITERS=100,
),
OPTIMIZER=dict(
BASE_LR=0.02,
),
),
INPUT=dict(
AUG=dict(
TRAIN_PIPELINES=[
("ResizeShortestEdge",
dict(short_edge_length=(480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800),
max_size=1333, sample_style="choice")),
("RandomFlip", dict()),
],
TEST_PIPELINES=[
("ResizeShortestEdge",
dict(short_edge_length=800, max_size=1333, sample_style="choice")),
],
)
),
TEST=dict(
EVAL_PERIOD=3000,
),
OUTPUT_DIR=osp.join(
'/data/Outputs/model_logs/cvpods_playground',
osp.split(osp.realpath(__file__))[0].split("playground/")[-1]),
)
class FasterRCNNConfig(RCNNFPNConfig):
def __init__(self):
super(FasterRCNNConfig, self).__init__()
self._register_configuration(_config_dict)
config = FasterRCNNConfig()