Skip to content

Commit

Permalink
Lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicElephant committed Jun 29, 2020
1 parent 3e59739 commit 4f24fa1
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 165 deletions.
41 changes: 17 additions & 24 deletions configs/yolo/yolov3_ms_aug_273e.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
type='Darknet',
depth=53,
out_indices=(3, 4, 5),
),
neck=dict(
type='YoloNeck',),
bbox_head=dict(
type='YoloHead',))
),
neck=dict(type='YoloNeck', ),
bbox_head=dict(type='YoloHead', ))
# training and testing settings
train_cfg = dict(
one_hot_smoother=0.,
ignore_config=0.5,
xy_use_logit=False,
debug=False)
one_hot_smoother=0., ignore_config=0.5, xy_use_logit=False, debug=False)
test_cfg = dict(
nms_pre=1000,
min_bbox_size=0,
Expand All @@ -29,22 +24,21 @@
# dataset settings
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
img_norm_cfg = dict(
mean=[0, 0, 0], std=[255., 255., 255.], to_rgb=True)
img_norm_cfg = dict(mean=[0, 0, 0], std=[255., 255., 255.], to_rgb=True)
# TODO: Add PhotoMetricDistortion
train_pipeline = [
dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True),
dict(type='PhotoMetricDistortion'),
dict(type='Expand',
mean=img_norm_cfg['mean'],
to_rgb=img_norm_cfg['to_rgb'],
ratio_range=(1, 2)
),
dict(type='MinIoURandomCrop',
min_ious=(0.4, 0.5, 0.6, 0.7, 0.8, 0.9),
min_crop_size=0.3
),
dict(
type='Expand',
mean=img_norm_cfg['mean'],
to_rgb=img_norm_cfg['to_rgb'],
ratio_range=(1, 2)),
dict(
type='MinIoURandomCrop',
min_ious=(0.4, 0.5, 0.6, 0.7, 0.8, 0.9),
min_crop_size=0.3),
dict(type='Resize', img_scale=[(320, 320), (608, 608)], keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
Expand Down Expand Up @@ -87,10 +81,9 @@
ann_file=data_root + 'annotations/instances_val2017.json',
img_prefix=data_root + 'val2017/',
pipeline=test_pipeline,
)
)
))
# optimizer
optimizer = dict(type='SGD', lr=2e-3, momentum=0.9, weight_decay=0.0005)
optimizer = dict(type='SGD', lr=5e-4, momentum=0.9, weight_decay=0.0005)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
Expand All @@ -117,4 +110,4 @@
workflow = [('train', 1)]
evaluation = dict(interval=1, metric=['bbox'])
# TODO: Remove hot fix
find_unused_parameters=True
find_unused_parameters = True
Loading

0 comments on commit 4f24fa1

Please sign in to comment.