未验证 提交 d72d1b51 编写于 作者: F FlyingQianMM 提交者: GitHub

add retinanet_r101 (#2581)

* test=develop add retinanet_r101 and delete needless configures in data feeder

* test=develop
add retinanet_r101 and delete needless configures in data feeder
上级 f489ca5d
architecture: RetinaNet
train_feed: FasterRCNNTrainFeed
eval_feed: FasterRCNNEvalFeed
test_feed: FasterRCNNTestFeed
max_iters: 90000
use_gpu: True
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet101_pretrained.tar
weights: output/retinanet_r101_fpn_1x/model_final
log_smooth_window: 20
snapshot_iter: 10000
metric: COCO
save_dir: output
RetinaNet:
backbone: ResNet
fpn: FPN
retina_head: RetinaHead
ResNet:
norm_type: affine_channel
norm_decay: 0.
depth: 101
feature_maps: [3, 4, 5]
freeze_at: 2
FPN:
max_level: 7
min_level: 3
num_chan: 256
spatial_scale: [0.03125, 0.0625, 0.125]
has_extra_convs: true
RetinaHead:
num_convs_per_octave: 4
num_chan: 256
max_level: 7
min_level: 3
prior_prob: 0.01
base_scale: 4
num_scales_per_octave: 3
num_classes: 81
anchor_generator:
aspect_ratios: [1.0, 2.0, 0.5]
variance: [1.0, 1.0, 1.0, 1.0]
target_assign:
positive_overlap: 0.5
negative_overlap: 0.4
gamma: 2.0
alpha: 0.25
sigma: 3.0151134457776365
output_decoder:
score_thresh: 0.05
nms_thresh: 0.5
pre_nms_top_n: 1000
detections_per_im: 100
nms_eta: 1.0
LearningRate:
base_lr: 0.01
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [60000, 80000]
values: null
- !LinearWarmup
start_factor: 0.3333333333333333
steps: 500
OptimizerBuilder:
optimizer:
momentum: 0.9
type: Momentum
regularizer:
factor: 0.0001
type: L2
FasterRCNNTrainFeed:
batch_size: 2
batch_transforms:
- !PadBatch
pad_to_stride: 128
dataset:
dataset_dir: data/coco
annotation: annotations/instances_train2017.json
image_dir: train2017
num_workers: 2
shuffle: True
FasterRCNNEvalFeed:
batch_size: 2
batch_transforms:
- !PadBatch
pad_to_stride: 128
dataset:
dataset_dir: data/coco
annotation: annotations/instances_val2017.json
image_dir: val2017
num_workers: 2
FasterRCNNTestFeed:
batch_size: 1
batch_transforms:
- !PadBatch
pad_to_stride: 128
dataset:
annotation: annotations/instances_val2017.json
num_workers: 2
shuffle: False
......@@ -3,7 +3,7 @@ train_feed: FasterRCNNTrainFeed
eval_feed: FasterRCNNEvalFeed
test_feed: FasterRCNNTestFeed
max_iters: 90000
use_gpu: yes
use_gpu: True
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_pretrained.tar
weights: output/retinanet_r50_fpn_1x/model_final
log_smooth_window: 20
......@@ -18,12 +18,10 @@ RetinaNet:
ResNet:
norm_type: affine_channel
freeze_norm: true
norm_decay: 0.0001
norm_decay: 0.
depth: 50
feature_maps: [3, 4, 5]
freeze_at: 2
variant: b
FPN:
max_level: 7
......@@ -85,31 +83,8 @@ FasterRCNNTrainFeed:
dataset_dir: data/coco
annotation: annotations/instances_train2017.json
image_dir: train2017
drop_last: false
image_shape: [3, 1333, 800]
num_workers: 2
sample_transforms:
- !DecodeImage
to_rgb: true
with_mixup: false
- !RandomFlipImage
is_mask_flip: false
is_normalized: false
prob: 0.5
- !NormalizeImage
is_channel_first: false
is_scale: true
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
- !ResizeImage
interp: 1
max_size: 1333
target_size: 800
use_cv2: true
- !Permute
channel_first: true
to_bgr: false
shuffle: true
shuffle: True
FasterRCNNEvalFeed:
batch_size: 2
......@@ -120,27 +95,7 @@ FasterRCNNEvalFeed:
dataset_dir: data/coco
annotation: annotations/instances_val2017.json
image_dir: val2017
shuffle: false
image_shape: [3, 1333, 800]
num_workers: 2
sample_transforms:
- !DecodeImage
to_rgb: true
with_mixup: false
- !NormalizeImage
is_channel_first: false
is_scale: true
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
- !ResizeImage
interp: 1
max_size: 1333
target_size: 800
use_cv2: true
- !Permute
channel_first: true
to_bgr: false
shuffle: false
FasterRCNNTestFeed:
batch_size: 1
......@@ -149,24 +104,5 @@ FasterRCNNTestFeed:
pad_to_stride: 128
dataset:
annotation: annotations/instances_val2017.json
drop_last: false
image_shape: [3, 1333, 800]
num_workers: 2
sample_transforms:
- !DecodeImage
to_rgb: true
with_mixup: false
- !NormalizeImage
is_channel_first: false
is_scale: true
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
- !ResizeImage
interp: 1
max_size: 1333
target_size: 800
use_cv2: true
- !Permute
channel_first: true
to_bgr: false
shuffle: false
shuffle: False
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册