deepsort_ppyoloe_resnet.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. _BASE_: [
  2. 'detector/ppyoloe_crn_l_36e_640x640_mot17half.yml',
  3. '_base_/mot17.yml',
  4. '_base_/deepsort_reader_1088x608.yml',
  5. ]
  6. metric: MOT
  7. num_classes: 1
  8. EvalMOTDataset:
  9. !MOTImageFolder
  10. dataset_dir: dataset/mot
  11. data_root: MOT17/images/half
  12. keep_ori_im: True # set as True in DeepSORT
  13. det_weights: https://paddledet.bj.bcebos.com/models/mot/deepsort/ppyoloe_crn_l_36e_640x640_mot17half.pdparams
  14. reid_weights: https://paddledet.bj.bcebos.com/models/mot/deepsort/deepsort_resnet.pdparams
  15. # reader
  16. EvalMOTReader:
  17. sample_transforms:
  18. - Decode: {}
  19. - Resize: {target_size: [640, 640], keep_ratio: False, interp: 2}
  20. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  21. - Permute: {}
  22. batch_size: 1
  23. TestMOTReader:
  24. inputs_def:
  25. image_shape: [3, 640, 640]
  26. sample_transforms:
  27. - Decode: {}
  28. - Resize: {target_size: [640, 640], keep_ratio: False, interp: 2}
  29. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  30. - Permute: {}
  31. batch_size: 1
  32. # DeepSORT configuration
  33. architecture: DeepSORT
  34. pretrain_weights: None
  35. DeepSORT:
  36. detector: YOLOv3 # PPYOLOe version
  37. reid: ResNetEmbedding
  38. tracker: DeepSORTTracker
  39. # reid and tracker configuration
  40. # see 'configs/mot/deepsort/reid/deepsort_resnet.yml'
  41. ResNetEmbedding:
  42. model_name: "ResNet50"
  43. DeepSORTTracker:
  44. input_size: [64, 192]
  45. min_box_area: 0
  46. vertical_ratio: -1
  47. budget: 100
  48. max_age: 70
  49. n_init: 3
  50. metric_type: cosine
  51. matching_threshold: 0.2
  52. max_iou_distance: 0.9
  53. motion: KalmanFilter
  54. # detector configuration: PPYOLOe version
  55. # see 'configs/mot/deepsort/detector/ppyoloe_crn_l_300e_640x640_mot17half.yml'
  56. YOLOv3:
  57. backbone: CSPResNet
  58. neck: CustomCSPPAN
  59. yolo_head: PPYOLOEHead
  60. post_process: ~
  61. CSPResNet:
  62. layers: [3, 6, 6, 3]
  63. channels: [64, 128, 256, 512, 1024]
  64. return_idx: [1, 2, 3]
  65. use_large_stem: True
  66. CustomCSPPAN:
  67. out_channels: [768, 384, 192]
  68. stage_num: 1
  69. block_num: 3
  70. act: 'swish'
  71. spp: true
  72. # Tracking requires higher quality boxes, so NMS score_threshold will be higher
  73. PPYOLOEHead:
  74. fpn_strides: [32, 16, 8]
  75. grid_cell_scale: 5.0
  76. grid_cell_offset: 0.5
  77. static_assigner_epoch: -1 # 100
  78. use_varifocal_loss: True
  79. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5}
  80. static_assigner:
  81. name: ATSSAssigner
  82. topk: 9
  83. assigner:
  84. name: TaskAlignedAssigner
  85. topk: 13
  86. alpha: 1.0
  87. beta: 6.0
  88. nms:
  89. name: MultiClassNMS
  90. nms_top_k: 1000
  91. keep_top_k: 100
  92. score_threshold: 0.4 # 0.01 in original detector
  93. nms_threshold: 0.6