PP-TSMv2-LCNetV2_16frames_uniform.yaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Global:
  2. checkpoints: null
  3. pretrained_model: "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-TSMv2-LCNetV2_16frames_uniform_pretrained.pdparams"
  4. output_dir: ./output/
  5. device: gpu
  6. use_visualdl: False
  7. save_inference_dir: ./inference
  8. # training model under @to_static
  9. to_static: False
  10. algorithm: PP-TSMv2-LCNetV2_16frames_uniform
  11. MODEL: #MODEL field
  12. framework: "Recognizer2D" #Mandatory, indicate the type of network, associate to the 'paddlevideo/modeling/framework/' .
  13. backbone: #Mandatory, indicate the type of backbone, associate to the 'paddlevideo/modeling/backbones/' .
  14. name: "PPTSM_v2" #Mandatory, The name of backbone.
  15. pretrained: null #Optional, pretrained model path.
  16. num_seg: 16
  17. class_num: 400
  18. head:
  19. name: "MoViNetHead" #Mandatory, indicate the type of head, associate to the 'paddlevideo/modeling/heads'
  20. DATASET: #DATASET field
  21. batch_size: 16 #Mandatory, bacth size
  22. num_workers: 4 #Mandatory, the number of subprocess on each GPU.
  23. train:
  24. format: "VideoDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
  25. data_prefix: "K400_dataset/K400/videos" #Mandatory, train data root path
  26. file_path: "K400_dataset/K400/train.txt" #Mandatory, train data index file path
  27. valid:
  28. format: "VideoDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
  29. data_prefix: "K400_dataset/K400/videos" #Mandatory, valid data root path
  30. file_path: "K400_dataset/K400/val.txt" #Mandatory, valid data index file path
  31. test:
  32. format: "VideoDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
  33. data_prefix: "K400_dataset/K400/videos" #Mandatory, valid data root path
  34. file_path: "K400_dataset/K400/val.txt" #Mandatory, valid data index file path
  35. PIPELINE: #PIPELINE field
  36. train: #Mandotary, indicate the pipeline to deal with the training data, associate to the 'paddlevideo/loader/pipelines/'
  37. decode:
  38. name: "VideoDecoder"
  39. backend: "decord"
  40. sample:
  41. name: "Sampler"
  42. num_seg: 16
  43. seg_len: 1
  44. valid_mode: False
  45. transform: #Mandotary, image transform operator
  46. - Scale:
  47. short_size: 256
  48. - MultiScaleCrop:
  49. target_size: 256
  50. - RandomCrop:
  51. target_size: 224
  52. - RandomFlip:
  53. - Image2Array:
  54. - Normalization:
  55. mean: [0.485, 0.456, 0.406]
  56. std: [0.229, 0.224, 0.225]
  57. valid: #Mandatory, indicate the pipeline to deal with the validating data. associate to the 'paddlevideo/loader/pipelines/'
  58. decode:
  59. name: "VideoDecoder"
  60. backend: "decord"
  61. sample:
  62. name: "Sampler"
  63. num_seg: 16
  64. seg_len: 1
  65. valid_mode: True
  66. transform:
  67. - Scale:
  68. short_size: 256
  69. - CenterCrop:
  70. target_size: 224
  71. - Image2Array:
  72. - Normalization:
  73. mean: [0.485, 0.456, 0.406]
  74. std: [0.229, 0.224, 0.225]
  75. test: #Mandatory, indicate the pipeline to deal with the validating data. associate to the 'paddlevideo/loader/pipelines/'
  76. decode:
  77. name: "VideoDecoder"
  78. backend: "decord"
  79. sample:
  80. name: "Sampler"
  81. num_seg: 16
  82. seg_len: 1
  83. valid_mode: True
  84. transform:
  85. - Scale:
  86. short_size: 256
  87. - CenterCrop:
  88. target_size: 224
  89. - Image2Array:
  90. - Normalization:
  91. mean: [0.485, 0.456, 0.406]
  92. std: [0.229, 0.224, 0.225]
  93. OPTIMIZER: #OPTIMIZER field
  94. name: 'Momentum'
  95. momentum: 0.9
  96. learning_rate:
  97. iter_step: True
  98. name: 'CustomWarmupCosineDecay'
  99. max_epoch: 120
  100. warmup_epochs: 10
  101. warmup_start_lr: 0.005
  102. cosine_base_lr: 0.01
  103. weight_decay:
  104. name: 'L2'
  105. value: 1e-4
  106. use_nesterov: True
  107. MIX:
  108. name: "Mixup"
  109. alpha: 0.2
  110. METRIC:
  111. name: 'CenterCropMetric'
  112. INFERENCE:
  113. name: 'ppTSM_Inference_helper'
  114. num_seg: 16
  115. target_size: 224
  116. Infer:
  117. transforms:
  118. - ReadVideo:
  119. num_seg: 16
  120. sample_type: 'uniform'
  121. - Scale:
  122. short_size: 256
  123. - CenterCrop:
  124. target_size: 224
  125. - Image2Array:
  126. data_format: 'tchw'
  127. - NormalizeVideo:
  128. mean: [0.485, 0.456, 0.406]
  129. std: [0.229, 0.224, 0.225]
  130. PostProcess:
  131. name: Topk
  132. topk: 1
  133. class_id_map_file: data/k400/Kinetics-400_label_list.txt
  134. model_name: "ppTSMv2"
  135. log_interval: 10 #Optional, the interval of logger, default:10
  136. epochs: 120 #Mandatory, total epoch
  137. log_level: "INFO" #Optional, the logger level. default: "INFO"