Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.7版本似乎训练不了MCMOT #9067

Open
2 of 3 tasks
zouhan6806504 opened this issue Jul 23, 2024 · 0 comments
Open
2 of 3 tasks

2.7版本似乎训练不了MCMOT #9067

zouhan6806504 opened this issue Jul 23, 2024 · 0 comments
Assignees

Comments

@zouhan6806504
Copy link

问题确认 Search before asking

  • 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

Training

Bug描述 Describe the Bug

来自于ikcest2024 baseline https://aistudio.baidu.com/projectdetail/7933300
在aistudio上运行,配置我全部放到一个文件里


use_gpu: true
use_xpu: false
use_mlu: false
use_npu: false
log_iter: 100
save_dir: output
snapshot_epoch: 1
print_flops: false
print_params: false

# Exporting the model
export:
  post_process: True  # Whether post-processing is included in the network when export model.
  nms: True           # Whether NMS is included in the network when export model.
  benchmark: False    # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  fuse_conv_bn: False


metric: MCMOT

num_classes: 228

# for MCMOT training
TrainDataset:
  !MCMOTDataSet
    dataset_dir: /home/aistudio/work/dataset # 需要更改为自己对应的文件目录下
    image_lists: ['IKCEST.train']
    data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_ide']
    label_list: /home/aistudio/work/dataset/label_list.txt

EvalMOTDataset:
  !MOTImageFolder
    dataset_dir: /home/aistudio/work/dataset
    data_root: IKCEST/images/test/
    keep_ori_im: False # set True if save visualization images or video, or used in DeepSORT
    anno_path: /home/aistudio/work/dataset/label_list.txt

# for MCMOT video inference
#TestMOTDataset:
#  !MOTImageFolder
#    dataset_dir: /home/aistudio/work/dataset
#    keep_ori_im: True # set True if save visualization images or video
#    anno_path: /home/aistudio/work/dataset/label_list.txt


pretrain_weights: https://paddledet.bj.bcebos.com/models/centernet_dla34_140e_coco.pdparams

architecture: FairMOT
for_mot: True

FairMOT:
  detector: CenterNet
  reid: FairMOTEmbeddingHead
  loss: FairMOTLoss
  tracker: JDETracker # multi-class tracker

CenterNet:
  backbone: DLA
  neck: CenterNetDLAFPN
  head: CenterNetHead
  post_process: CenterNetPostProcess

CenterNetDLAFPN:
  down_ratio: 4
  last_level: 5
  out_channel: 0
  dcn_v2: True
  with_sge: False

CenterNetHead:
  head_planes: 256
  prior_bias: -2.19
  regress_ltrb: False
  size_loss: 'L1'
  loss_weight: {'heatmap': 1.0, 'size': 0.1, 'offset': 1.0, 'iou': 0.0}
  add_iou: False

FairMOTEmbeddingHead:
  ch_head: 256
  ch_emb: 128

CenterNetPostProcess:
  max_per_img: 200
  down_ratio: 4
  regress_ltrb: False

JDETracker:
  min_box_area: 0
  vertical_ratio: 0 # no need to filter bboxes according to w/h
  use_byte: True
  match_thres: 0.8
  conf_thres: 0.4
  low_conf_thres: 0.2
  tracked_thresh: 0.4
  metric_type: cosine

weights: output/mcfairmot_dla34_30e_1088x608_visdrone_vehicle_bytetracker/model_final

epoch: 30
LearningRate:
  base_lr: 0.0005
  schedulers:
  - !PiecewiseDecay
    gamma: 0.1
    milestones: [10, 20]
    use_warmup: False

OptimizerBuilder:
  optimizer:
    type: Adam
  regularizer: NULL

worker_num: 4
TrainReader:
  inputs_def:
    image_shape: [3, 608, 1088]
  sample_transforms:
    - Decode: {}
    - RGBReverse: {}
    - AugmentHSV: {}
    - LetterBoxResize: {target_size: [608, 1088]}
    - MOTRandomAffine: {reject_outside: False}
    - RandomFlip: {}
    - BboxXYXY2XYWH: {}
    - NormalizeBox: {}
    - NormalizeImage: {mean: [0, 0, 0], std: [1, 1, 1]}
    - RGBReverse: {}
    - Permute: {}
  batch_transforms:
    - Gt2FairMOTTarget: {}
  batch_size: 2
  shuffle: True
  drop_last: True
  use_shared_memory: True

EvalMOTReader:
  sample_transforms:
    - Decode: {}
    - LetterBoxResize: {target_size: [608, 1088]}
    - NormalizeImage: {mean: [0, 0, 0], std: [1, 1, 1], is_scale: True}
    - Permute: {}
  batch_size: 1


#TestMOTReader:
#  inputs_def:
#    image_shape: [3, 608, 1088]
#  sample_transforms:
#    - Decode: {}
#    - LetterBoxResize: {target_size: [608, 1088]}
#    - NormalizeImage: {mean: [0, 0, 0], std: [1, 1, 1], is_scale: True}
#    - Permute: {}
#  batch_size: 1

运行时报异常,

Traceback (most recent call last):
  File "/home/aistudio/PaddleDetection/tools/train.py", line 209, in <module>
    main()
  File "/home/aistudio/PaddleDetection/tools/train.py", line 205, in main
    run(FLAGS, cfg)
  File "/home/aistudio/PaddleDetection/tools/train.py", line 158, in run
    trainer.train(FLAGS.eval)
  File "/home/aistudio/PaddleDetection/ppdet/engine/trainer.py", line 463, in train
    self.cfg['EvalDataset'] = self.cfg.EvalDataset = create(
  File "/home/aistudio/PaddleDetection/ppdet/core/workspace.py", line 292, in create
    return cls(**cls_kwargs)
  File "/home/aistudio/PaddleDetection/ppdet/data/source/dataset.py", line 278, in __init__
    type = dataset_args.pop("name")
KeyError: 'name'

感觉就是EvalMOTDataset没能正确创建出来,而且我看代码里面对metrics MCMOT也没处理

复现环境 Environment

aistudio环境,直接运行项目就能复现

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants