Skip to content
Snippets Groups Projects
Commit ff2f1f3c authored by Cao Yuhang's avatar Cao Yuhang Committed by Kai Chen
Browse files

Fix ssd bug (#1288)

* fix bug of ssd

* clean
parent bfce31c4
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ train_pipeline = [ ...@@ -65,7 +65,7 @@ train_pipeline = [
type='MinIoURandomCrop', type='MinIoURandomCrop',
min_ious=(0.1, 0.3, 0.5, 0.7, 0.9), min_ious=(0.1, 0.3, 0.5, 0.7, 0.9),
min_crop_size=0.3), min_crop_size=0.3),
dict(type='Resize', img_scale=(300, 300), keep_ratio=False), dict(type='Resize', img_scale=(512, 512), keep_ratio=False),
dict(type='Normalize', **img_norm_cfg), dict(type='Normalize', **img_norm_cfg),
dict(type='RandomFlip', flip_ratio=0.5), dict(type='RandomFlip', flip_ratio=0.5),
dict(type='DefaultFormatBundle'), dict(type='DefaultFormatBundle'),
...@@ -75,7 +75,7 @@ test_pipeline = [ ...@@ -75,7 +75,7 @@ test_pipeline = [
dict(type='LoadImageFromFile'), dict(type='LoadImageFromFile'),
dict( dict(
type='MultiScaleFlipAug', type='MultiScaleFlipAug',
img_scale=(300, 300), img_scale=(512, 512),
flip=False, flip=False,
transforms=[ transforms=[
dict(type='Resize', keep_ratio=False), dict(type='Resize', keep_ratio=False),
......
...@@ -527,7 +527,7 @@ class Expand(object): ...@@ -527,7 +527,7 @@ class Expand(object):
left = int(random.uniform(0, w * ratio - w)) left = int(random.uniform(0, w * ratio - w))
top = int(random.uniform(0, h * ratio - h)) top = int(random.uniform(0, h * ratio - h))
expand_img[top:top + h, left:left + w] = img expand_img[top:top + h, left:left + w] = img
boxes = boxes + np.tile((left, top), 2) boxes = boxes + np.tile((left, top), 2).astype(boxes.dtype)
results['img'] = expand_img results['img'] = expand_img
results['gt_bboxes'] = boxes results['gt_bboxes'] = boxes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment