File size: 1,111 Bytes
4a582ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
batch_size: 4
iters: 50000

train_dataset:
  type: MattingDataset
  dataset_root: data/PPM-100
  train_file: train.txt
  transforms:
    - type: LoadImages
    - type: RandomResize
      size: [2048, 2048]
      scale: [0.3, 1.5]
    - type: RandomCrop
      crop_size: [2048, 2048]
    - type: RandomDistort
    - type: RandomBlur
      prob: 0.1
    - type: RandomHorizontalFlip
    - type: Padding
      target_size: [2048, 2048]
    - type: Normalize
  mode: train

val_dataset:
  type: MattingDataset
  dataset_root: data/PPM-100
  val_file: val.txt
  transforms:
    - type: LoadImages
    - type: ResizeByShort
      short_size: 2048
    - type: ResizeToIntMult
      mult_int: 128
    - type: Normalize
  mode: val
  get_trimap: False

model:
  type: HumanMatting
  backbone:
    type: ResNet34_vd
    # pretrained: https://paddleseg.bj.bcebos.com/matting/models/ResNet34_vd_pretrained/model.pdparams
  pretrained: Null
  if_refine: True

optimizer:
  type: sgd
  momentum: 0.9
  weight_decay: 4.0e-5

lr_scheduler:
  type: PiecewiseDecay
  boundaries: [30000, 40000]
  values: [0.001, 0.0001, 0.00001]