提交 5e90c3f1 编写于 作者: L liuhui29

set use_fine_grained_loss=True as default, and remove use_fine_grained_loss=True from config

上级 ee780976
...@@ -2,7 +2,6 @@ TrainReader: ...@@ -2,7 +2,6 @@ TrainReader:
inputs_def: inputs_def:
fields: ['image', 'gt_bbox', 'gt_class', 'gt_score'] fields: ['image', 'gt_bbox', 'gt_class', 'gt_score']
num_max_boxes: 50 num_max_boxes: 50
use_fine_grained_loss: true
dataset: dataset:
!COCODataSet !COCODataSet
image_dir: train2017 image_dir: train2017
......
...@@ -8,12 +8,10 @@ metric: COCO ...@@ -8,12 +8,10 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar
weights: output/yolov3_r50vd_dcn_db_iouaware_obj365_pretrained_coco/model_final weights: output/yolov3_r50vd_dcn_db_iouaware_obj365_pretrained_coco/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -47,7 +45,6 @@ YOLOv3Loss: ...@@ -47,7 +45,6 @@ YOLOv3Loss:
batch_size: 8 batch_size: 8
ignore_thresh: 0.7 ignore_thresh: 0.7
label_smooth: false label_smooth: false
use_fine_grained_loss: true
iou_loss: IouLoss iou_loss: IouLoss
iou_aware_loss: IouAwareLoss iou_aware_loss: IouAwareLoss
......
...@@ -8,12 +8,10 @@ metric: COCO ...@@ -8,12 +8,10 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar
weights: output/yolov3_r50vd_dcn_db_iouloss_obj365_pretrained_coco/model_final weights: output/yolov3_r50vd_dcn_db_iouloss_obj365_pretrained_coco/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -49,7 +47,6 @@ YOLOv3Loss: ...@@ -49,7 +47,6 @@ YOLOv3Loss:
batch_size: 8 batch_size: 8
ignore_thresh: 0.7 ignore_thresh: 0.7
label_smooth: false label_smooth: false
use_fine_grained_loss: true
iou_loss: IouLoss iou_loss: IouLoss
IouLoss: IouLoss:
......
...@@ -8,12 +8,10 @@ metric: COCO ...@@ -8,12 +8,10 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar
weights: output/yolov3_r50vd_dcn_db_obj365_pretrained_coco/model_final weights: output/yolov3_r50vd_dcn_db_obj365_pretrained_coco/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -50,7 +48,6 @@ YOLOv3Loss: ...@@ -50,7 +48,6 @@ YOLOv3Loss:
batch_size: 8 batch_size: 8
ignore_thresh: 0.7 ignore_thresh: 0.7
label_smooth: false label_smooth: false
use_fine_grained_loss: true
LearningRate: LearningRate:
base_lr: 0.001 base_lr: 0.001
......
...@@ -8,12 +8,10 @@ metric: COCO ...@@ -8,12 +8,10 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/ResNet50_vd_dcn_db_obj365_pretrained.tar
weights: output/yolov3_r50vd_dcn_db_obj365_pretrained_coco/model_final weights: output/yolov3_r50vd_dcn_db_obj365_pretrained_coco/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -48,7 +46,6 @@ YOLOv3Loss: ...@@ -48,7 +46,6 @@ YOLOv3Loss:
batch_size: 8 batch_size: 8
ignore_thresh: 0.7 ignore_thresh: 0.7
label_smooth: false label_smooth: false
use_fine_grained_loss: true
LearningRate: LearningRate:
base_lr: 0.001 base_lr: 0.001
......
...@@ -9,14 +9,12 @@ metric: COCO ...@@ -9,14 +9,12 @@ metric: COCO
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
weights: output/ppyolo/model_final weights: output/ppyolo/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
use_ema: true use_ema: true
ema_decay: 0.9998 ema_decay: 0.9998
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -48,7 +46,6 @@ YOLOv3Loss: ...@@ -48,7 +46,6 @@ YOLOv3Loss:
ignore_thresh: 0.7 ignore_thresh: 0.7
scale_x_y: 1.05 scale_x_y: 1.05
label_smooth: false label_smooth: false
use_fine_grained_loss: true
iou_loss: IouLoss iou_loss: IouLoss
iou_aware_loss: IouAwareLoss iou_aware_loss: IouAwareLoss
......
...@@ -9,14 +9,12 @@ metric: COCO ...@@ -9,14 +9,12 @@ metric: COCO
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
weights: output/ppyolo/model_final weights: output/ppyolo/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
use_ema: true use_ema: true
ema_decay: 0.9998 ema_decay: 0.9998
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -48,7 +46,6 @@ YOLOv3Loss: ...@@ -48,7 +46,6 @@ YOLOv3Loss:
ignore_thresh: 0.7 ignore_thresh: 0.7
scale_x_y: 1.05 scale_x_y: 1.05
label_smooth: false label_smooth: false
use_fine_grained_loss: true
iou_loss: IouLoss iou_loss: IouLoss
iou_aware_loss: IouAwareLoss iou_aware_loss: IouAwareLoss
......
...@@ -9,14 +9,12 @@ metric: COCO ...@@ -9,14 +9,12 @@ metric: COCO
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet18_vd_pretrained.tar pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet18_vd_pretrained.tar
weights: output/ppyolo_tiny/model_final weights: output/ppyolo_tiny/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
use_ema: true use_ema: true
ema_decay: 0.9998 ema_decay: 0.9998
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
...@@ -43,7 +41,6 @@ YOLOv3Loss: ...@@ -43,7 +41,6 @@ YOLOv3Loss:
ignore_thresh: 0.7 ignore_thresh: 0.7
scale_x_y: 1.05 scale_x_y: 1.05
label_smooth: false label_smooth: false
use_fine_grained_loss: true
iou_loss: IouLoss iou_loss: IouLoss
IouLoss: IouLoss:
......
...@@ -11,7 +11,6 @@ metric: COCO ...@@ -11,7 +11,6 @@ metric: COCO
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
weights: output/ppyolo/model_final weights: output/ppyolo/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
use_ema: true use_ema: true
ema_decay: 0.9998 ema_decay: 0.9998
save_prediction_only: True save_prediction_only: True
...@@ -19,7 +18,6 @@ save_prediction_only: True ...@@ -19,7 +18,6 @@ save_prediction_only: True
YOLOv3: YOLOv3:
backbone: ResNet backbone: ResNet
yolo_head: YOLOv3Head yolo_head: YOLOv3Head
use_fine_grained_loss: true
ResNet: ResNet:
norm_type: sync_bn norm_type: sync_bn
......
...@@ -8,7 +8,6 @@ metric: COCO ...@@ -8,7 +8,6 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/yolov4_cspdarknet.pdparams pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/yolov4_cspdarknet.pdparams
weights: output/yolov4_cspdarknet/model_final weights: output/yolov4_cspdarknet/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
save_prediction_only: True save_prediction_only: True
YOLOv4: YOLOv4:
......
...@@ -8,7 +8,6 @@ metric: COCO ...@@ -8,7 +8,6 @@ metric: COCO
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/CSPDarkNet53_pretrained.pdparams pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/CSPDarkNet53_pretrained.pdparams
weights: output/yolov4_cspdarknet_coco/model_final weights: output/yolov4_cspdarknet_coco/model_final
num_classes: 80 num_classes: 80
use_fine_grained_loss: true
YOLOv4: YOLOv4:
backbone: CSPDarkNet backbone: CSPDarkNet
......
...@@ -8,7 +8,6 @@ metric: VOC ...@@ -8,7 +8,6 @@ metric: VOC
pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/yolov4_cspdarknet.pdparams pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/yolov4_cspdarknet.pdparams
weights: output/yolov4_cspdarknet_voc/model_final weights: output/yolov4_cspdarknet_voc/model_final
num_classes: 20 num_classes: 20
use_fine_grained_loss: true
YOLOv4: YOLOv4:
backbone: CSPDarkNet backbone: CSPDarkNet
......
...@@ -199,7 +199,7 @@ class Reader(object): ...@@ -199,7 +199,7 @@ class Reader(object):
class_aware_sampling=False, class_aware_sampling=False,
worker_num=-1, worker_num=-1,
use_process=False, use_process=False,
use_fine_grained_loss=False, use_fine_grained_loss=True,
num_classes=80, num_classes=80,
bufsize=-1, bufsize=-1,
memsize='3G', memsize='3G',
......
...@@ -43,7 +43,7 @@ class YOLOv3(object): ...@@ -43,7 +43,7 @@ class YOLOv3(object):
def __init__(self, def __init__(self,
backbone, backbone,
yolo_head='YOLOv3Head', yolo_head='YOLOv3Head',
use_fine_grained_loss=False): use_fine_grained_loss=True):
super(YOLOv3, self).__init__() super(YOLOv3, self).__init__()
self.backbone = backbone self.backbone = backbone
self.yolo_head = yolo_head self.yolo_head = yolo_head
...@@ -182,7 +182,7 @@ class YOLOv4(YOLOv3): ...@@ -182,7 +182,7 @@ class YOLOv4(YOLOv3):
def __init__(self, def __init__(self,
backbone, backbone,
yolo_head='YOLOv4Head', yolo_head='YOLOv4Head',
use_fine_grained_loss=False): use_fine_grained_loss=True):
super(YOLOv4, self).__init__( super(YOLOv4, self).__init__(
backbone=backbone, backbone=backbone,
yolo_head=yolo_head, yolo_head=yolo_head,
......
...@@ -45,7 +45,7 @@ class YOLOv3Loss(object): ...@@ -45,7 +45,7 @@ class YOLOv3Loss(object):
batch_size=8, batch_size=8,
ignore_thresh=0.7, ignore_thresh=0.7,
label_smooth=True, label_smooth=True,
use_fine_grained_loss=False, use_fine_grained_loss=True,
iou_loss=None, iou_loss=None,
iou_aware_loss=None, iou_aware_loss=None,
downsample=[32, 16, 8], downsample=[32, 16, 8],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册