ShiqiYu / OpenGait

A flexible and extensible framework for gait recognition. You can focus on designing your own models and comparing with state-of-the-arts easily with the help of OpenGait.
741 stars 168 forks source link

Questions about gaitgraph2_Gait3D.yaml #254

Open Terminal-K opened 1 week ago

Terminal-K commented 1 week ago

Detailed description

I processed the Gait3D dataset as Data Pretreatment and set "gait3d-merged-pkl" to dataset_root, which produced an error: ValueError: The number of types of input data and transform should be same. But got 2 and 1

Steps to reproduce

data_cfg:
  dataset_name: Gait3D
  dataset_root: Gait3D-merged-pkl
  dataset_partition: ./datasets/Gait3D/Gait3D.json
  test_dataset_name: Gait3D
  num_workers: 8
  remove_no_gallery: false

evaluator_cfg:
  enable_float16: false
  restore_ckpt_strict: true
  restore_hint: 2000
  save_name: GaitGraph2
  sampler:
    batch_size: 256
    frames_num_fixed: 60
    frames_num_max: 50
    frames_num_min: 25
    sample_type: fixed_ordered
    frames_skip_num: 0
  metric: cos
  eval_func: evaluate_Gait3D
  transform:
    - type: GaitGraphMultiInput

loss_cfg:
  - loss_term_weight: 1
    temperature: 0.01
    type:  SupConLoss_Lp
    log_prefix: SupConLoss

model_cfg:
  model: GaitGraph2
  joint_format: coco
  input_num: 3
  reduction: 8
  block: Bottleneck # Basic, initial
  input_branch:
    - 5
    - 64
    - 32
  main_stream:
    - 32
    - 128
    - 256
  num_class: 128
  tta: true

optimizer_cfg:
  lr: 0.005 #0.005
  solver: AdamW
  weight_decay: 0.00001

scheduler_cfg:
  max_lr: 0.005
  total_steps: 2000
  scheduler: OneCycleLR

trainer_cfg:
  enable_float16: false
  log_iter: 20
  with_test: true
  restore_ckpt_strict: false
  restore_hint: 0
  save_iter: 200
  save_name: GaitGraph2
  sync_BN: true
  total_iter: 2000
  sampler:
    batch_shuffle: true
    frames_num_fixed: 60
    frames_num_max: 50
    frames_num_min: 25
    sample_type: fixed_ordered #Repeat sample
    frames_skip_num: 0
    batch_size: 768
    type: CommonSampler
  transform:
    - type: Compose
      trf_cfg:
        - type: FlipSequence
          probability: 0.5
        - type: InversePosesPre
          probability: 0.1
        - type:  JointNoise
          std: 0.25
        - type: PointNoise
          std: 0.05
        - type: RandomMove
          random_r:
                    - 4
                    - 1
        - type: GaitGraphMultiInput

run command: CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --nproc_per_node=1 opengait/main.py --cfgs ./configs/gaitgraph2/gaitgraph2_Gait3D.yaml --phase train

Issue submission checklist

Terminal-K commented 1 week ago

I tried to add a NoOperation transform like smpl_gait.yaml, but the program again reported an error in InversePosesPre: ValueError: could not broadcast input array from shape (17,64) into shape (64,64) The above errors seem to indicate that there is something wrong with the raw data. Is dataset_root in gaitgraph2_Gait3D.yaml Gait-merged-pkl?