Global:
  checkpoints: null
  pretrained_model: https://videotag.bj.bcebos.com/PaddleVideo-release2.3/YOWO_epoch_00005.pdparams
  output_dir: ./output/
  device: gpu
  use_visualdl: False
  save_inference_dir: ./inference
  # training model under @to_static
  to_static: False
  algorithm: YOWO

MODEL: #MODEL field
    framework: "YOWOLocalizer" #Mandatory, indicate the type of network, associate to the 'paddlevideo/modeling/framework/' .
    backbone: #Mandatory, indicate the type of backbone, associate to the 'paddlevideo/modeling/backbones/' .
        name: "YOWO" #Mandatory, The name of backbone.
        num_class: 24
    loss:
        name: "RegionLoss"
        num_classes: 24
        num_anchors: 5
        anchors: [0.70458, 1.18803, 1.26654, 2.55121, 1.59382, 4.08321, 2.30548, 4.94180, 3.52332, 5.91979]
        object_scale: 5
        noobject_scale: 1
        class_scale: 1
        coord_scale: 1

DATASET: #DATASET field
    batch_size: 8 #Mandatory, bacth size
    num_workers: 4 #Mandatory, XXX the number of subprocess on each GPU.
    test_batch_size: 4
    valid_batch_size: 4
    train:
        format: "UCF24Dataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
        image_dir: "data/ucf24" #Mandatory, raw data folder path
        file_path: "data/ucf24/trainlist.txt" #Mandatory, train data index file path
    valid:
        format: "UCF24Dataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
        image_dir: "data/ucf24" #Mandatory, raw data folder path
        file_path: "data/ucf24/testlist.txt" #Mandatory, test data index file path
    test:
        format: "UCF24Dataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
        image_dir: "data/ucf24" 
        file_path: "data/ucf24/testlist.txt" #Mandatory, test data index file path

PIPELINE: #PIPELINE field TODO.....
    train: #Mandotary, indicate the pipeline to deal with the training data, associate to the 'paddlevideo/loader/pipelines/'
        sample:
            name: "SamplerUCF24"
            num_frames: 16
            valid_mode: False
        transform: #Mandotary, image transform operator.
            - YowoAug:
                valid_mode: False
    valid: #Mandotary, indicate the pipeline to deal with the training data, associate to the 'paddlevideo/loader/pipelines/'
        sample:
            name: "SamplerUCF24"
            num_frames: 16
            valid_mode: True
        transform: #Mandotary, image transform operator.
            - YowoAug:
                valid_mode: True
    test:
        sample:
            name: "SamplerUCF24"
            num_frames: 16
            valid_mode: True
        transform: #Mandotary, image transform operator.
            - YowoAug:
                valid_mode: True

OPTIMIZER: #OPTIMIZER field
    name: Adam
    learning_rate:
        learning_rate: 0.0001
        name: 'MultiStepDecay'
        milestones: [1, 2, 3, 4]
        gamma: 0.5
    weight_decay:
        name: "L2"
        value: 0.0005

GRADIENT_ACCUMULATION:
    global_batch_size: 128 # Specify the sum of batches to be calculated by all GPUs

METRIC:
    name: 'YOWOMetric'
    gt_folder: 'data/ucf24/groundtruths_ucf'
    result_path: 'output/detections_test'
    threshold: 0.5
    log_interval: 100
    for_paddlex: True

INFERENCE:
    name: 'YOWO_Inference_helper'
    num_seg: 16
    target_size: 224

Infer:
    transforms:
        - ReadVideo:
            num_seg: 16
        - ResizeVideo:
            target_size: 224
        - Image2Array:
            data_format: 'tchw'
        - NormalizeVideo:
            scale: 255.0
    PostProcess:
        - DetVideoPostProcess:
            nms_thresh: 0.5
            score_thresh: 0.4
label_list:
    - Basketball
    - BasketballDunk
    - Biking
    - CliffDiving
    - CricketBowling
    - Diving
    - Fencing
    - FloorGymnastics
    - GolfSwing
    - HorseRiding
    - IceDancing
    - LongJump
    - PoleVault
    - RopeClimbing
    - SalsaSpin
    - SkateBoarding
    - Skiing
    - Skijet
    - SoccerJuggling
    - Surfing
    - TennisSwing
    - TrampolineJumping
    - VolleyballSpiking
    - WalkingWithDog

model_name: "YOWO"
log_interval: 20 #Optional, the interval of logger, default:10
save_interval: 1
epochs: 5 #Mandatory, total epoch
log_level: "INFO" #Optional, the logger level. default: "INFO"
val_interval: 1
label_dict_path: data/ucf24/label_map.txt
