PP-Vehicle-Attr.yml 2.2 KB
Newer Older
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
image_shape: &image_shape 640

ENV:
  min_subgraph_size: 3
  trt_calib_mode: False
  cpu_threads: 1
  trt_use_static: False
  save_img: True
  save_res: True
  return_res: True


MODEL:
  - DetectionOp:
      name: det
      param_path: paddlecv://models/mot_ppyoloe_l_36e_ppvehicle/model.pdiparams
      model_path: paddlecv://models/mot_ppyoloe_l_36e_ppvehicle/model.pdmodel
      batch_size: 1
      image_shape: [3, *image_shape, *image_shape]
      PreProcess:
        - Resize:
            interp: 2
            keep_ratio: false
            target_size: [*image_shape, *image_shape]
        - Permute:
      PostProcess:
        - ParserDetResults:
            label_list:
              - vehicle
            threshold: 0.1
      Inputs:
        - input.image

  - TrackerOP:
      name: tracker
      type: OCSORTTracker
      tracker_configs:
        det_thresh: 0.4
        max_age: 30
        min_hits: 3
        iou_threshold: 0.3
        delta_t: 3
        inertia: 0.2
        vertical_ratio: 0
        min_box_area: 0
        use_byte: False
      PostProcess:
        - ParserTrackerResults:
            label_list:
              - vehicle
      Inputs:
        - det.dt_bboxes
        - det.dt_scores
        - det.dt_class_ids
  - BboxCropOp:
      name: bbox_crop
      Inputs:
        - input.image
        - tracker.tk_bboxes
  - ClassificationOp:
      name: cls
      param_path: paddlecv://models/vehicle_attribute/inference.pdiparams
      model_path: paddlecv://models/vehicle_attribute/inference.pdmodel
      batch_size: 8
      PreProcess:
        - ResizeImage:
            size: [256, 192]
        - NormalizeImage:
            scale: 0.00392157
            mean: [ 0.485, 0.456, 0.406 ]
            std: [ 0.229, 0.224, 0.225 ]
            order: ''
            channel_num: 3
        - ToCHWImage:
        - ExpandDim:
            axis: 0
      PostProcess:
        - VehicleAttribute:
      Inputs:
        - bbox_crop.crop_image
  - TrackerOutput:
      name: vis
      Inputs:
        - input.fn
        - input.image
        - tracker.tk_bboxes
        - tracker.tk_scores
        - tracker.tk_ids
        - tracker.tk_cls_ids
        - tracker.tk_cls_names
        - cls.class_ids
        - cls.scores
        - cls.label_names