未验证 提交 94f02683 编写于 作者: W wangxinxin08 提交者: GitHub

correct RandomFlipOp (#1796)

Co-authored-by: Nroot <root@bjyz-sys-gpu-kongming0.bjyz.baidu.com>
上级 ea8e8ebd
......@@ -3,6 +3,7 @@ pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/DarkNet53_pr
weights: output/yolov3_darknet/model_final
use_fine_grained_loss: false
load_static_weights: True
norm_type: sync_bn
YOLOv3:
backbone: DarkNet
......@@ -13,7 +14,6 @@ YOLOv3:
DarkNet:
depth: 53
return_idx: [2, 3, 4]
norm_type: sync_bn
YOLOv3FPN:
feat_channels: [1024, 768, 384]
......@@ -28,7 +28,7 @@ YOLOv3Head:
YOLOv3Loss:
ignore_thresh: 0.7
downsample: [32, 16, 8]
label_smooth: true
label_smooth: false
BBoxPostProcess:
decode:
......
use_gpu: true
log_iter: 50
log_iter: 20
save_dir: output
snapshot_epoch: 2
......@@ -523,7 +523,10 @@ class RandomFlipOp(BaseOperator):
return image[:, ::-1, :]
def apply_bbox(self, bbox, width):
bbox[:, 0::2] = width - bbox[:, 0::2] - 1
oldx1 = bbox[:, 0].copy()
oldx2 = bbox[:, 2].copy()
bbox[:, 0] = width - oldx2 - 1
bbox[:, 2] = width - oldx1 - 1
return bbox
def apply(self, sample, context=None):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册